PDA

View Full Version : Question about LINKNLOAD



ash
03-05-2009, 03:24 PM
I have a DLL which I am trying to use it in PV-Wave, I am loading the DLL using LINKNLOAD, and I am getting "Segmentation Violation Encountered" error.

Basically, I am trying to load 'My_DLL.dll' and call 'My_C_Function' with 3 strings as parameters

ln = LINKNLOAD('My_DLL.dll', 'My_C_Function', 'String1', 'String2', 'String3')

This is the C API

long WINAPI My_C_Function(const char *szTitle, const char *szText, const char *szControl);

I can successfully load the dll, but I am getting the "Segmentation Violation Encountered" error after this verbose


%%%LINKNLOAD: Processing arguments and calling function: My_DLL.dll,My_C_Function



Can someone please point out what I am doing wrong ?

Thanks for your help
Ash

ash
03-06-2009, 11:49 PM
Thanks everyone, I finally figured it out, I mapped the arguments properly similar to the one in the example.c and now its working.

Thanks again,
Ash