Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

I am using a DLL from VC++ labview6.1 crash upon loading the DLL

Labview crashes when I load my DLL from VC++ that calls device net software. It is only _stdcall function. Sometime my whole PC crash upon loading it. I Appreciate any help from anyone......
0 Kudos
Message 1 of 2
(3,309 Views)
Your problem is most likely caused by a memory error. Insure that you are passing the correct data types (especially pointers) into the Call Library Function and make sure that if the DLL is expecting any memory to be allocated that the proper data has been created in LabVIEW (for instance, if the DLL was expecting a string of a certain length, LabVIEW would need to create a string constant which was long enough to satisfy the DLL). Also insure that there are not any race conditions (conditions within LabVIEW in which the order of execution is not defined) which could cause your DLL to access memory which has not yet been allocated. You can generally fix race conditions by using sequence structures. Also, make sure that your DLL cleans up any memory that it all
ocates.

Hopefully that helps,
Ryan
NI Applications Engineer
0 Kudos
Message 2 of 2
(3,309 Views)