UsbAdc11.dll VB .NET usage

 
Post new topic   Reply to topic    Pico Technology Forum Index -> .Net Languages (C#, VB.Net, .)
Author Message
christek
Newbie


Joined: 23 May 2008
Posts: 1

PostPosted: Fri May 23, 2008 6:09 pm    Post subject: UsbAdc11.dll VB .NET usage Reply with quote

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
Active User


Joined: 09 Apr 2008
Posts: 7
Location: Belgium

PostPosted: Thu May 29, 2008 2:59 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> .Net Languages (C#, VB.Net, .)
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group