LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The problem about call dll from VB....

Dear All.
I have a device and  VB dll file.I want to use labview to call  dll.But Labview show "An Exception occurred within the external code ..."
Below is  to call this dll details.

1FindHardware
Call it at beginning when load program first, it can let program auto detect printer port address and model of dso scope.
parament
winversion

winversion = 2  "Windows NT,XP"
UIP:
open UIP(2048) array
UCP:
open  UCP(1023, 1023 + 11, 6)  array
return

board_model

dso2902_128 = 27
Then is my program
Could somebody tell me what's wrong?
Thanks.

由 Samyang 在 10-09-2005 07:14 AM 上編輯的訊息

0 Kudos
Message 1 of 3
(2,423 Views)
I can't say I understand the documentation snippet you provides, and I also can't access the DLL, but here are a couple things...
 
1. I doubt very highly that a VB DLL is built with the C calling convension. I believe you should try the stdcall instead.
2. You have the winversion being passed by pointer, but the docs make it look like a regular integer. Is that correct?
3. Your board model is being passed by value, but it is listed as a return value in the docs. That would indicate an actual return value or a parameter passed by reference.
 
My guess is that one or more of the above is causing the stack to get corrupted or an invalid pointer to be accessed and that is generating the error. Is there anyway to see the document (pdf or webpage)?
0 Kudos
Message 2 of 3
(2,405 Views)
Dear Lycangeek
Thanks for your suggestion.I had already call dll success.
0 Kudos
Message 3 of 3
(2,383 Views)