I briefly remember pointers in C++ but I still need some
understanding because the following code I can't get to
run correctly. What I am wanting to do is actually read the
bytes of a function in memory.
this causes a GPF, windows 2000 tells me it can't call the
memory address. But if I do a call dword on the address
it executes fine. Am I doing something wrong?
This is just some stuff I've been messing with just to
understand pointers a little better. I am trying to
understand how to implement self modifying code. But mainly
I want to be able to do this with PB/DLL.
Thanks
------------------
-Greg
understanding because the following code I can't get to
run correctly. What I am wanting to do is actually read the
bytes of a function in memory.
Code:
#COMPILE EXE 'test SUB example() MSGBOX "o" MSGBOX "hi" END SUB FUNCTION PBMAIN() AS LONG DIM PrtMySubCall AS DWORD DIM Ptr1 AS STRING PTR DIM thedata AS STRING PrtMySubCall = CODEPTR(example) Ptr1 = PrtMySubCall thedata = @Ptr1 MSGBOX thedata END FUNCTION
memory address. But if I do a call dword on the address
it executes fine. Am I doing something wrong?
This is just some stuff I've been messing with just to
understand pointers a little better. I am trying to
understand how to implement self modifying code. But mainly
I want to be able to do this with PB/DLL.
Thanks
------------------
-Greg
Comment