Test and Measurement Forum

UsbAdc11.dll VB .NET usage

Post your .Net discussions here

UsbAdc11.dll VB .NET usage

Postby christek » Fri May 23, 2008 6:09 pm

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?
christek
Newbie
 
Posts: 1
Joined: Fri May 23, 2008 5:49 pm

Postby MatrixCow » Thu May 29, 2008 2:59 pm

Are you sure the datatypes are correct? The datatypes for c or c++ are not the same as for VB.NET or C#.NET.
MatrixCow
Active User
Active User
 
Posts: 7
Joined: Wed Apr 09, 2008 12:37 pm
Location: Belgium


Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 1 guest