LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The LV crashed when I call a dll to control my com port

Yaoming wrote:
> Does there nobody be able to help me to solve this problem? 😞

It's very hard to help you here. I gave all possible suggestions I could
think of, and I can't even try out the DLL myself as it is HASP
protected, so my options are all used up.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 15
(1,050 Views)
Thanks for your help any way.

Going on looking for solution.........
0 Kudos
Message 12 of 15
(1,037 Views)
Did you check the calling conventions? Windows uses _stdcall other DLL's may use C calling conventions. You can set this option in the Call Library dialog box. I commonly don't do this correctly myself, so it may be worth a try.
0 Kudos
Message 13 of 15
(1,028 Views)


jpeters 写:
Did you check the calling conventions? Windows uses _stdcall other DLL's may use C calling conventions. You can set this option in the Call Library dialog box. I commonly don't do this correctly myself, so it may be worth a try.




Jpeters,

I have tried the two calling conventions already. If you use standAPI, the LV could crash even when you begin to run the vi. However, if you use C code, the LV only crashed when you tried to close the LV application after the successful running vi.

So the standAPI calling convention is the worse situation.
0 Kudos
Message 14 of 15
(1,021 Views)
Just another thought because we have exhausted all the other options...

When I make dll calls I pass the handle by value rather than pointer to a value. I know with the documentation the DWD_set_comport function says it should be a pointer but have you tried just passing it by value? I am just curious, perhaps the documentation could be wrong, I have seen that before. So, if it is still not working and you get the chance to give it a try see if that changes anything.

Unfortunately without the key were kinda stuck. Best of luck.
-Dave
0 Kudos
Message 15 of 15
(1,014 Views)