USB RAWHID using Visual Basic

Status
Not open for further replies.

Lightning

New member
Hi there,

i started to use the USB RAW HID Lib on my 32U4 breakout board. The software is working fine on my microcontroller.
Now i need to code a programm for the host side.
Is there a DLL for VisualBasic .net available?

Greetings
Stefan
 
Hi there,

i started to use the USB RAW HID Lib on my 32U4 breakout board. The software is working fine on my microcontroller.
Now i need to code a programm for the host side.
Is there a DLL for VisualBasic .net available?

Greetings
Stefan

Do you still need help with this? I wrote a VB .net application to talk to my rawhid device.

Regards,

Les
 
The programm is not working with this example.

it just stops and does not respond anymore.


Public Function ConnectToHID(ByRef targetForm As Form) As Boolean
Dim pHostWin As Integer = targetForm.Handle.ToInt32
FWinHandle = pHostWin
pHostWin = hidConnect(FWinHandle) <---- no more actions after this function!!!
FPrevWinProc = DelegateSetWindowLong(FWinHandle, GWL_WNDPROC, Ref_WinProc)
HostForm = targetForm
End Function
 
The programm is not working with this example.

it just stops and does not respond anymore.


Public Function ConnectToHID(ByRef targetForm As Form) As Boolean
Dim pHostWin As Integer = targetForm.Handle.ToInt32
FWinHandle = pHostWin
pHostWin = hidConnect(FWinHandle) <---- no more actions after this function!!!
FPrevWinProc = DelegateSetWindowLong(FWinHandle, GWL_WNDPROC, Ref_WinProc)
HostForm = targetForm
End Function


I have just tested my sample and it works ok here on Windows 7 Ultimate 64bit. I am sure i didn't change any of the mcHIDInterface.vb code.

A few things to check, but I don't thing it would even run if these were at fault..

  • Make sure the 'mcHID.dll' is in the 'C:\Windows\SysWOW64' folder if you are 64bit
  • Make sure you are compiling as 'x86' not 'AnyCPU'
  • Read throgh the comments on helmPCB

I am using VB 2010 Express in cas eit makes any difference.

Regards,

Les
 
Ok it is working fine now.

The problem was the location of mcHID.dll. I placed the file in the system32 folder instead of syswow64.

Thanks for your help
 
Status
Not open for further replies.
Back
Top