|
|
| Author |
Message |
christek Newbie
Joined: 23 May 2008
Posts: 1
|
Posted: Fri May 23, 2008 6:09 pm Post subject: UsbAdc11.dll VB .NET usage |
|
|
I'm Using a Usb ADC11 and the UsbAdc11.dll, I created an encapsulating module based on the USBADC11api.h file provided with the example code.
I replaced all the pointer passes (*) with ByRef and all others with ByVal. One of the functions declared with a ByRef parramiter works fine:
Declare Function UsbAdc11MaxValue Lib "UsbAdc11.dll" (ByVal handle As Short, ByRef maxValue As UShort) As Short
The rest throw an AccessViolationException :
Declare Function UsbAdc11GetUnitInfo Lib "UsbAdc11.dll" (ByVal handle As Short, ByRef S As String, ByVal stringLength As Short, ByVal info As Short) As Short
Declare Function UsbAdc11GetValues Lib "UsbAdc11.dll" (ByVal handle As Short, ByRef values As UShort(), ByVal no_of_values As ULong) As ULong
Declare Function UsbAdc11GetTimesAndValues Lib "UsbAdc11.dll" (ByVal handle As Short, ByRef times As Long(), ByRef values As UShort(), ByVal no_of_values As ULong) As ULong
Declare Function UsbAdc11OpenUnitProgress Lib "UsbAdc11.dll" (ByRef handle As Short, ByRef progress As Short) As Short
Can anyone give me some insight into what i may have done wrong or what I'm missing? |
|
| Back to top |
|
 |
MatrixCow Active User

Joined: 09 Apr 2008
Posts: 7
Location: Belgium
|
Posted: Thu May 29, 2008 2:59 pm Post subject: |
|
|
| Are you sure the datatypes are correct? The datatypes for c or c++ are not the same as for VB.NET or C#.NET. |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|