10-18-2009 12:32 PM
Hi Guenter Mueller
Now i have exported all the main functions relating to loading of mpusbapi.dll file . I have exported the Load Dll () ,
AbrirTAD () function which is for opening operation and CerrarTAD () function which is for closing operation. Now i am calling all these three functions from my VI.
Now as i run my program again error 1097 occurs , when i press continue, this error again occurs and when i again press continue , a new error occurs which is in the attached doc file.
10-18-2009 12:33 PM - edited 10-18-2009 12:35 PM
10-18-2009 12:42 PM
10-18-2009 02:53 PM
Hi
Now when i am exporting all functions by using Std Call , the compiler gives 3 errors . I am now using module definition .def method for exporting functions to avoid name mangling but i cant understand why there are errors while compiling.
10-18-2009 03:18 PM
10-18-2009 05:31 PM
10-19-2009 09:45 AM
Hi
Thanks for the sent file , now the 3 errors are removed and dll is made successfully. In labview , i am using std calling convention but still the same errors occur which i sent you before in the doc file . First error 1097 occurs , when i continue again error 1097 occurs . If i again press continue the visual studio compiler gives the errors.
Now all the functions in my dll code have the same calling convention that is std calling convention then why the visual studio compiler gives the error of wrong calling convention?
One more thing that please check the function Invalid error handle () and send receive packet ().
Do i have to export these functions also?
I can't understand where the problem is. Why the daq is not communicating with labview. On the other hand the code in the pic controller of daq card is correct .Ihave checked .
The attached file mhsdll +def contains the correct code and i am also sending the VI. The errors are the same as in the above doc file.
10-19-2009 10:33 AM
You may want to consider looking at the return types in the dll calling parameters. Are you sure they should be return by value rather than Pointer to Value ?
Also, make sure that the variable being used to store the returning value has been initialized.
Additionally, I believe that a return value for each of the parameters being passed must be declared in the call to the dll.
10-19-2009 11:25 AM
Hi
I dont think that the error is arising because of any of the incorrect data types. Please reply to my last post .
10-19-2009 01:25 PM
I have a question to ask that the code of my dll which is mhsdlldef.zip . In this code , i have exported all the main functions such as salidasdigitalesByteTAD() for digital outputs, salidasanalogicasTAD() for pwm output etc.
Almost all of the functions use sendReceivePacket() functions in them , but i did not export sendReceivePacket() function .
The Question is
1) Do i need to export SendReceivePacket() function ? This function is used in every other functions body.
If i have to export this function also then the second question is
2) What values will i give to its parameters in the labview VI ? Because this function has six arguments and a return value , whose values are continuouly changing depending on the function in which this function is called.
Regards
mhs100