VB.net USB HID Program
Moderators: David Barker, Jerry Messina
VB.net USB HID Program
I made a program that uses the mcHID.dll library (similar to the VB5 code produced by SF), though it works with VB.net (framework 4, can be rolled back if need be)
As it stands now, iHID is a USB HID report manager. Allows you to connect to the desired device and view incoming reports, state changes and send reports.
Downloads can be found on this page
As it stands now, iHID is a USB HID report manager. Allows you to connect to the desired device and view incoming reports, state changes and send reports.
Downloads can be found on this page
Last edited by gramo on Sun Nov 08, 2009 9:57 am, edited 1 time in total.
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.
Australian distributor for the Swordfish Compiler
Australian distributor for the Swordfish Compiler
Not sure what happened there Steve, I've updated the file just in case.
Is it accessible now?
Is it accessible now?
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.
Australian distributor for the Swordfish Compiler
Australian distributor for the Swordfish Compiler
Updated the source code with a few more comments should you find your self wondering what's going on
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.
Australian distributor for the Swordfish Compiler
Australian distributor for the Swordfish Compiler
Re: VB.net USB HID Program
I made a program based on this. It worked fine in Windows 7 and 8.
After the update to windows 8.1 the mcHID.dll does not work anymore.
Does somebody have a solution?
Thanks
Hans Niekus
After the update to windows 8.1 the mcHID.dll does not work anymore.
Does somebody have a solution?
Thanks
Hans Niekus
Re: VB.net USB HID Program
Is the version of windows 8.1 32bit or 64bit? I know that mcHID.dll only supports 32bit..
Re: VB.net USB HID Program
Thanks for your replay
I do use a 32 version. It stopt after the upgrade from 8.0 to 8.1.
I do not get a message it just hangs. So it gets lost in unmanaged code (dll).
Simple tasks that only need the mcHID.dll, such as register the USB device and asking the serial number, work. When the user32.dll get involved, than it does not work.
I did see that the user32.dll (also used here) is much larger than in Windows 8.
I do use a 32 version. It stopt after the upgrade from 8.0 to 8.1.
I do not get a message it just hangs. So it gets lost in unmanaged code (dll).
Simple tasks that only need the mcHID.dll, such as register the USB device and asking the serial number, work. When the user32.dll get involved, than it does not work.
I did see that the user32.dll (also used here) is much larger than in Windows 8.
Re: VB.net USB HID Program
You did not specify if the NET compiled program is in x64 or x86 mode.
In Visual Studio you can set whether to generate an assembly for the x86 or x64 .. if the DLL can only work in x86 then you have to compile the VB program in x86 mode.
A 32 bit system work correctly and when use it on a windows x64 it will run under WOW64 and everything should work without problems. In VS2010 to set the correct x86/x64 generation of the program you have to go into the property of the project and in the Compilation tab at the top select the x86 platform.
In Visual Studio you can set whether to generate an assembly for the x86 or x64 .. if the DLL can only work in x86 then you have to compile the VB program in x86 mode.
A 32 bit system work correctly and when use it on a windows x64 it will run under WOW64 and everything should work without problems. In VS2010 to set the correct x86/x64 generation of the program you have to go into the property of the project and in the Compilation tab at the top select the x86 platform.
Re: VB.net USB HID Program
Everything worked fine until the 8.1 update came via the windows update a year ago.
After that I switched from 2010 to Visual basic express 2013. I also did set the x86.
Nothing helped.
I do use the 32 bit version of windows.
The problem is in the mcHID.dll. That cannot communicate with the new user.dll of windows 8.1 ?
As I mentioned before : Simple tasks that only need the mcHID.dll, such as register the USB device and asking the serial number, work. When the user32.dll get involved, than it does not work.
I do not know how to repair that. I did not write that. Is there a newer version?
Or am I the only one that is having problems with windows 8.1 ???
After that I switched from 2010 to Visual basic express 2013. I also did set the x86.
Nothing helped.
I do use the 32 bit version of windows.
The problem is in the mcHID.dll. That cannot communicate with the new user.dll of windows 8.1 ?
As I mentioned before : Simple tasks that only need the mcHID.dll, such as register the USB device and asking the serial number, work. When the user32.dll get involved, than it does not work.
I do not know how to repair that. I did not write that. Is there a newer version?
Or am I the only one that is having problems with windows 8.1 ???
Re: VB.net USB HID Program
Probably MS has changed the management of USB at level permissions, since it is the USER.DLL to manage it.
I saw on the net that you're not the only one having this problem with USB and this DLL in W8.1 and does not seem to have found the solution.
The only thing that comes to mind is to try to run the program as administrator in compatibility mode with a lower system type like W7 or XP ( if in W8.1 still exists the possibility ).
I'm sorry I have not upgraded to 8.1 because already in version 8.0 I had found very inconvenient to use the mouse and do not have a touchscreen.
I saw on the net that you're not the only one having this problem with USB and this DLL in W8.1 and does not seem to have found the solution.
The only thing that comes to mind is to try to run the program as administrator in compatibility mode with a lower system type like W7 or XP ( if in W8.1 still exists the possibility ).
I'm sorry I have not upgraded to 8.1 because already in version 8.0 I had found very inconvenient to use the mouse and do not have a touchscreen.
Re: VB.net USB HID Program
As administrator and compatibility mode, I tried them without success.
Next year Windows 9 is coming. Windows 7 is support is stopping in 2020. That looks far away.
I wold be nice that the mcHID.dll will also work on the newer versions of Windows (8.1 and up).
The source of that DLL is available. I hoped someone could look into that?
The original link does not work, I do have a copy :
http://www.sysanalyser.com/dl/iHID_VB2008.zip
It is a great DLL.
Next year Windows 9 is coming. Windows 7 is support is stopping in 2020. That looks far away.
I wold be nice that the mcHID.dll will also work on the newer versions of Windows (8.1 and up).
The source of that DLL is available. I hoped someone could look into that?
The original link does not work, I do have a copy :
http://www.sysanalyser.com/dl/iHID_VB2008.zip
It is a great DLL.
Re: VB.net USB HID Program
Hello,
I looked at the source you posted and I saw that in the wrapper of mcHID.dll (which do not have the source code, at least in the zip) refers to the functions CallWindowProc, SetWindowLong and DelegateSetWindowLong who are in the infamous User32.dll
I think we should refer to the call of these 3 functions occurring in MSDN for W8.1 if something has changed.
I looked at the source you posted and I saw that in the wrapper of mcHID.dll (which do not have the source code, at least in the zip) refers to the functions CallWindowProc, SetWindowLong and DelegateSetWindowLong who are in the infamous User32.dll
I think we should refer to the call of these 3 functions occurring in MSDN for W8.1 if something has changed.