I have a DLL that I currently call successfully from a Visual Basic program that I cannot seem to get defined properly in Delphi. I am new to Delphi and I suspect that the different variable types are what are causing my problems. The code declaring the DLL in VB is as follows:
Declare Function utlapi& Lib "PCSUTL32.DLL" (Func&, ByVal DataString$, Length&, RetC&, Xtra1&, Xtra2&)
My code to implement these DLLs in Delphi is as follows:
function utlapi(func:longint; datastring:string; Length, Rcode, Xtra1, Xtra2:longint):longint; external 'PCSUTL32.DLL';
I have tried using different variable types but cannot successfully call this DLL. I get an EAcessViolation error when I attempt to access the exported function utlapi.
I have searched for DLL and read all the posts I could find that may be of help but have found nothing so far that indicates what I am doing wrong with this definition. I don't know what language this DLL was written in but have tried all the various calling methods Delphi has (stdcall, register, cdecl, etc.) to no avail. Any advise or help would be appreciated.
Thank you Bob H.
Declare Function utlapi& Lib "PCSUTL32.DLL" (Func&, ByVal DataString$, Length&, RetC&, Xtra1&, Xtra2&)
My code to implement these DLLs in Delphi is as follows:
function utlapi(func:longint; datastring:string; Length, Rcode, Xtra1, Xtra2:longint):longint; external 'PCSUTL32.DLL';
I have tried using different variable types but cannot successfully call this DLL. I get an EAcessViolation error when I attempt to access the exported function utlapi.
I have searched for DLL and read all the posts I could find that may be of help but have found nothing so far that indicates what I am doing wrong with this definition. I don't know what language this DLL was written in but have tried all the various calling methods Delphi has (stdcall, register, cdecl, etc.) to no avail. Any advise or help would be appreciated.
Thank you Bob H.