PCS10 / K8047.dll and Visual Studio 2008 - VB.net

Software Information
IDE : Microsoft Visual Studio 2008 Express Edition Version 9.0
Language : Microsoft Visual Basic .Net
.Net Version 3.5

Hello all

I am use the k8047d.dll in my VB.net application. I am having trouble getting even the simplest thing to work, such as turning the record LED on.

After many hours trawling the net for the solution, I am hoping someone can help me, as I am sure it is a trivial problem.

What I Have Done
I have run the setup program found in k8047_pcs10_dll.zip, and included k8047d.dll and k8047E.exe in project folder, and the project bin folder.

To simplify matters, I am attempting the most basic problem I could think of. I have a blank form with a checkbox, hoping to toggle the record LED when the box is clicked.

What happens when program is run
When the program is run, and the box is clicked, I receive no errors, and have a succesful compilation. However, the LED does not turn on. When I run the demo program found in the k8047_pcs10_dll.zip, the LED works when the checkbox is clicked.

Please find below the entirety of my code. The main function is the checkbox changed procedure.

[code]Public Class UsbDatalogger
Public Declare Sub StartDevice Lib “k8047d.dll” ()
Public Declare Sub StopDevice Lib “k8047d.dll” ()
Public Declare Sub LEDon Lib “k8047d.dll” ()
Public Declare Sub LEDoff Lib “k8047d.dll” ()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load

    Debug.Print("device started")
End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged

    If CheckBox1.Checked Then
        Debug.Print("led on")
        Debug.Print("led off")
    End If
End Sub

Private Sub Form1_Close(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.FormClosing

    Debug.Print("device Stopped")
End Sub

End Class[/code]

Many thanks in advance for any help offered.

Hello All,

I have solved the problem, it was simple as I thought.

The setup.exe included in the k8047_pcs10_dll.zip copied k8047D.dll and FastTime32.dll to System32 directory, however it did not copy k8047E.exe to the System32 directory.

When I copied k8047E.exe to the System32 directory the above code worked fine.

Hopefully no-one else makes the same silly mistake that I did.


Thank you for this comment.
Indeed, there seems to be a bug in the setup program – should be corrected.