Link to home
Start Free TrialLog in
Avatar of mortonsw
mortonsw

asked on

How call win32 func using pointer?

I want to store the address of a win32 function (for example GetLocalTime) in a pointer var and then
use the pointer var to call GetLocalTime. While assigning the offset of GetLocalTime to pointer var,
I would like to add in an additional value like a random number, say 37, which I'll subtract back off
before calling. My C/C++ is pretty weak but in ASM it looks like:

RNDNUM    = 37
mov       [ptrGLT],offset GetLocalTime + RNDNUM
sub       [ptrGLT],RNDNUM
call      [ptrGLT],offset SystemTime
ASKER CERTIFIED SOLUTION
Avatar of RolandAZ
RolandAZ

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial