10-18-2009 05:47 AM
Hi all
I have made my own dll in visual C++ which calls another dll named mpusbapi.dll . When i run the labview program
Error 1097 occured, exception in the external code "Possible reason(s):
LabVIEW: An
exception occurred within the external code called by a Call Library
Function Node. The exception may have corrupted the LabVIEW memory.
Save any work to a new location and restart LabVIEW."
10-18-2009 08:33 AM
10-18-2009 09:44 AM
Hi
Thanks for your reply
Actually i am trying to communicate with a usb daq card.In the folder mhs VI , there are two dll files one is mpusbapi.dll and the other one which i created is mhs.dll . The coding of mhs.dll is also attached . It is in mhsdll folder. In the coding mpusbapi.dll is called and the functions which i want to export are with the keyword __declspec(dllexport).
In my VI , i have used two features of DAQ card that are digital outputs and pwm outputs and used the functions salidasDigitalesByteTAD() and SalidasAnalogicasTAD() respectively. Every time i run my application , the error 1097occurs.
The data types are also matched. In the coding of mhs.cpp ,the argument of both the above mentioned functions
are DWORD . I used usigned 32 bit integer in labview. I would also like to mention that the VID and PID of my usb daq card is also defined in the coding mhs.cpp. Please Check it.
Any help greatly appreciated.
Regards
mhs100
10-18-2009 10:51 AM
This seems to be the same as this message and this message and this message and this message and this message.
I don't know what more information you expect to get that you haven't already gotten by posting the same question over and over again.
10-18-2009 11:19 AM
Hi smercurio_fc
I am not fond of posting same question again and again. If I am doing this , it means that my problem is still
unsolved. All the time you have gathered my posts instead of answering.
I am not expecting this reply.
10-18-2009 11:19 AM
10-18-2009 11:26 AM
10-18-2009 11:34 AM
mhs100 wrote:Hi smercurio_fc
I am not fond of posting same question again and again. If I am doing this , it means that my problem is still
unsolved.
Then what you should be doing is posting more information in your original thread saying "This didn't work, what else can I do?" instead of starting a new thread. For people who may not have seen your original post (and any of the later ones), you're just forcing them to start at square one when trying to help you instead of picking up at square 4 which is where you have gotten to.
10-18-2009 11:37 AM
Ok.
The function loaddll () has no return type nor any argument. If i want to call this in VI then i have to select it from the list and thats all.
There will be no inputs and outputs of this call library function.
10-18-2009 11:44 AM
Right you are, Simon.
This is an issue that you can improve: This function call loads the mpusbapi.DLL and retrieves the function pointers from the DLL. If anything goes wrong (e.g. DLL not found) it simple uses "exit(1)" without good reason. Better: Use a return value to indicate the result of the function call.
Guenter