c++ written dll
Posted on 2000-02-15
i have a 3rd party c++ written dll. I have the source code and header files for 16 bit of the dll, but i don't have any documentation or header file for the 32 bit one. For a function, in 16 bit header it says:
int FAR PASCAL CallC2 (LPSTR par1,LPSTR par2, LPSTR par3, LPSTR cmd, LPSTR par4) ;
i supposed 32 bit version will have the same type, so i declared it in delphi application as:
function CallC2 (par1,par2,par3:pchar;par4:pointer):integer;
cdecl;external 'g:\dll3011\file01.dll' index 5;
The dll is for some socket connection to a unix OS for db connection. You typically allocate some memory first, send some information and the address for the allocated memory(in par4), and can see the results in the par4 parameter address.
my program sends this information, gets the function result successfully however when i try to end up with end parameter in the code, it gives access violation error. Is it something to do with shared memory, or parameters, or ??? Can you please help??