News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Recent posts

#61
The Workshop / Re: COM, create rule in Firewa...
Last post by Fraile - June 13, 2024, 01:10:49 AM
With firewall.h, I obtain the methods. According to what I have read, I can refer to them through offsets.

   /* INetFwRule methods */
   HRESULT (STDMETHODCALLTYPE *get_Name)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_Name)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_Description)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_Description)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_ApplicationName)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_ApplicationName)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_serviceName)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_serviceName)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_Protocol)(INetFwRule *This,LONG*);
   HRESULT (STDMETHODCALLTYPE *put_Protocol)(INetFwRule *This,LONG);
   HRESULT (STDMETHODCALLTYPE *get_LocalPorts)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_LocalPorts)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_RemotePorts)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_RemotePorts)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_LocalAddresses)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_LocalAddresses)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_RemoteAddresses)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_RemoteAddresses)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_IcmpTypesAndCodes)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_IcmpTypesAndCodes)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_Direction)(INetFwRule *This,enum NET_FW_RULE_DIRECTION_*);
   HRESULT (STDMETHODCALLTYPE *put_Direction)(INetFwRule *This,enum NET_FW_RULE_DIRECTION_);
   HRESULT (STDMETHODCALLTYPE *get_Interfaces)(INetFwRule *This,VARIANT*);
   HRESULT (STDMETHODCALLTYPE *put_Interfaces)(INetFwRule *This,VARIANT);
   HRESULT (STDMETHODCALLTYPE *get_InterfaceTypes)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_InterfaceTypes)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_Enabled)(INetFwRule *This,VARIANT_BOOL*);
   HRESULT (STDMETHODCALLTYPE *put_Enabled)(INetFwRule *This,VARIANT_BOOL);
   HRESULT (STDMETHODCALLTYPE *get_Grouping)(INetFwRule *This,BSTR*);
   HRESULT (STDMETHODCALLTYPE *put_Grouping)(INetFwRule *This,BSTR);
   HRESULT (STDMETHODCALLTYPE *get_Profiles)(INetFwRule *This,LONG*);
   HRESULT (STDMETHODCALLTYPE *put_Profiles)(INetFwRule *This,LONG);
   HRESULT (STDMETHODCALLTYPE *get_EdgeTraversal)(INetFwRule *This,VARIANT_BOOL*);
   HRESULT (STDMETHODCALLTYPE *put_EdgeTraversal)(INetFwRule *This,VARIANT_BOOL);
   HRESULT (STDMETHODCALLTYPE *get_Action)(INetFwRule *This,enum NET_FW_ACTION_*);
   HRESULT (STDMETHODCALLTYPE *put_Action)(INetFwRule *This,enum NET_FW_ACTION_);

If I want to load a value into the put_name property, I need to find its offset. From what I have seen, this is calculated by enumerating each of the previously mentioned properties and multiplying by 4 if it's a 32-bit application or by 8 if it's a 64-bit application. In my case, I am developing the application with MASM32, so I multiply by 4.

get_Name - index 0
put_Name - index 1 (offset 1 * 4 = 4 bytes or 0x04)
get_Description - index 2
put_Description - index 3 (offset 3 * 4 = 12 bytes or 0x0C)


#62
The Orphanage / Re: I'll be buying a new compu...
Last post by stoo23 - June 13, 2024, 12:30:53 AM
QuoteI has first generation gaming laptop so mobile gpu got hot
I can Imagine  :dazzled:
#63
The Orphanage / Re: I'll be buying a new compu...
Last post by daydreamer - June 13, 2024, 12:19:55 AM
Stewart  :rofl:
I has first generation gaming laptop so mobile gpu got hot
#64
16 bit DOS Programming / Re: Bouncing Square Clipping
Last post by daydreamer - June 13, 2024, 12:17:13 AM
I agree with japhet  :thumbsup:
But like to add, drawing or loading in initialize program sprite map in memory for moving objects simple to copy to screen
More advanced tiles for background objects combined with sprites if any sprites in front of tile before copying
Only need to update the tiles and sprites that changes on screen
#65
MASM64 SDK / Re: cmd_tail
Last post by HSE - June 12, 2024, 11:59:09 PM
Quote from: sinsi on June 12, 2024, 12:01:27 AMDoes len take into account the zero terminator?

:thumbsup: Fantastic Sinsi. That it's the point.

Then must be:
    mov r12, rvcall(GetCommandLine)
    mov r13, len(r12)
    add r13, 1
    mov r14, alloc(r13)
#66
The Workshop / Re: Echo value of offset
Last post by TimoVJL - June 12, 2024, 11:32:00 PM
Quote from: Rockphorr on June 12, 2024, 07:42:19 PM
Quote from: NoCforMe on June 12, 2024, 06:10:10 AM
Quote from: Rockphorr on June 11, 2024, 03:43:01 AMProblems come when using on bounds...
Bounds? as in array bound checking?
Just curious.


As bounds of assembler abilities. A default solution is the immediate value, but i need to get that from the expression of offsets.
masm isn't high level language, just with macro language additions.
#67
The Workshop / Re: Echo value of offset
Last post by Rockphorr - June 12, 2024, 07:42:19 PM
Quote from: NoCforMe on June 12, 2024, 06:10:10 AM
Quote from: Rockphorr on June 11, 2024, 03:43:01 AMProblems come when using on bounds...
Bounds? as in array bound checking?
Just curious.


As bounds of assembler abilities. A default solution is the immediate value, but i need to get that from the expression of offsets.
#68
The Workshop / Re: Echo value of offset
Last post by NoCforMe - June 12, 2024, 06:10:10 AM
Quote from: Rockphorr on June 11, 2024, 03:43:01 AMProblems come when using on bounds...
Bounds? as in array bound checking?
Just curious.
#69
MASM64 SDK / Re: cmd_tail
Last post by jj2007 - June 12, 2024, 03:24:30 AM
The proper solution would clearly be to fix the library source, i.e. cmd_tail.asm
#70
16 bit DOS Programming / Re: Bouncing Square Clipping
Last post by _japheth - June 12, 2024, 02:00:02 AM
Quote from: tda0626 on June 11, 2024, 09:40:40 AMReading up on the subject, to get a smooth moving object, it looks like the only way is to go unchained mode on 320 x 200 or mode X 320 x 240 and do page flipping.

Not necessarily. However, you shouldn't render your items directly in video memory. A better approach is to render the screen contents in a memory buffer , wait for vertical retrace and finally do a quick copy from your buffer to video memory.

Also, to draw a square by using line drawing code isn't very fast, btw.

Attached your modified sample, using a buffer.