Link to home
Start Free TrialLog in
Avatar of JuleZzZ
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.
Avatar of kretzschmar
kretzschmar
Flag of Germany image

handle = THandle
dword = DWord
lpvoid = pointer
lpdword = Pointer

 
Avatar of robert_marquardt
robert_marquardt

Almost correct.
LPDWORD = PDWORD
Most of these pointer types are declared in Windows.pas
Avatar of JuleZzZ

ASKER

ok got it workin... changed pointer to cardinal.. :E

np
ASKER CERTIFIED SOLUTION
Avatar of robert_marquardt
robert_marquardt

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
Avatar of JuleZzZ

ASKER

nice one. explained just about everything i needed to know


Thanks.