Anyone knows the direct correct equivalence of the following C++ declaration:
DWORD CopyToPc( LPCSTR szFileName, const DWORD& dwOno )
DWORD RmConnect( LPCSTR szHostName, WORD wPortNo )
I am trying to access these two functions from a C++ dll using Delphi "external" keyword (Static Integration of the DLL).
I was able to decipher the actual "name" or "index" in the dll using third party "PE Explorer".
function RmConnect( szHostName: LPCSTR; wPortNo: WORD ): LongInt; overload; stdcall;
external 'RM.dll' name '?RmConnect@CRmTcp@@UAEKPBDG@Z';//index 114; Is the function parameters correct?
The project was compiled and start-up fine. But when I tried to call the RmConnect activated with the button,
runtime error occurs with the following message:
Debugger Exception Notification:
Project XXX.exe raised exception class EAccessViolation with message 'Access violation at address
77E20315 in module 'user32.dll'. Write of address 00002713'. Process stopped. Use Step or Run to continue.
I used the return data type of DWORD or Longword for RmConnect but still have this
runtime error. Anyone has any idea on this?
Thanks in advance.