JuleZzZ
asked on
Type Conversions
Ok Im Rather New To Delphi So I Ask Of Your Help.
Im Trying To Log Functions Parameters To File By Hooking It, But i aint too sure how to format pointers and hex data into a string.
Heres the function def...
HANDLE hProcess, // handle to process whose memory is written to
LPVOID lpBaseAddress, // address to start writing to
LPVOID lpBuffer, // pointer to buffer to write data to
DWORD nSize, // number of bytes to write
LPDWORD lpNumberOfBytesWritten // actual number of bytes written
handle = cardinal?
dword = cardinal?
lpvoid = pointer?
lpdword = pdword?
i tried..
FmtStr(TheParams,'%d, %.x, %.x, %d, %d', [hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten]);
but still crashes :/
Thanks.
Im Trying To Log Functions Parameters To File By Hooking It, But i aint too sure how to format pointers and hex data into a string.
Heres the function def...
HANDLE hProcess, // handle to process whose memory is written to
LPVOID lpBaseAddress, // address to start writing to
LPVOID lpBuffer, // pointer to buffer to write data to
DWORD nSize, // number of bytes to write
LPDWORD lpNumberOfBytesWritten // actual number of bytes written
handle = cardinal?
dword = cardinal?
lpvoid = pointer?
lpdword = pdword?
i tried..
FmtStr(TheParams,'%d, %.x, %.x, %d, %d', [hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten]);
but still crashes :/
Thanks.
Almost correct.
LPDWORD = PDWORD
Most of these pointer types are declared in Windows.pas
LPDWORD = PDWORD
Most of these pointer types are declared in Windows.pas
ASKER
ok got it workin... changed pointer to cardinal.. :E
np
np
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nice one. explained just about everything i needed to know
Thanks.
Thanks.
dword = DWord
lpvoid = pointer
lpdword = Pointer