Pcs10 / k8047

Hello,

I’m using the .dll files on a procect in ms visual studio 2010 and are having problems.

I can communicate with the device, turn the led on and off.

when i go to do the following:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer
        Dim s As String

        ReadData(DataBuffer(0))
        ch1realvalue.Text = Str(DataBuffer(2))
    End Sub

i run into problems. I get:

Accessviolationexception was undhandled.

any ideas for what i can do go fix this??

Regards

Matt

SetGain do not work either. :frowning:

I get “PinvokeStackImbalance was detected”…

/Matt

This should work:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim DataBuffer(0 To 7) As Integer ReadData(DataBuffer(0)) 'etc... End Sub
Here you can download a working VB 2008 demo:
box.com/s/a8lkb4pkzdg3c4517l6t