After that youre ready to read and write data. To give credit where credit is due, I did not write the code that is in the template the code is based on the code generated by the Easy. HID application from Mecanique and modified for Visual Basic 2. Steve Monfette. I modified his code a little, wrote some documentation and packaged it into a VB template. HID. dll on 6. 4 bit Windowsmc. HID. dll is a 3. 2 bit DLL and so can only be linked with 3. Since all 6. 4 bit versions of Windows come with the WOW6. HID. dll will work on a 6. If you receive runtime errors such as An attempt was made to load a program with an incorrect format or similar messages, then make sure that you are not compiling your program to the x. Any CPU configurations. Any CPU configures your program so that it runs as a native 3. Windows and runs as a native 6. Explore how easy it is to create a program that reads data from a scale connected through an RS232 serial port or USB to a serial port converter. Windows. This means that the same executable compiled using Any CPU will work fine with mc. HID. dll on 3. 2 bit Windows, but will fail on 6. Windows. Make sure to compile using the x. Installing. Installing the template is simple. Download and extract the archive and you will find two files USBTemplate. HID. dll. Copy mc. HID. dll to your windowssystem. USBTemplate. zip copy the actual zip file do not extract it to your My DocumentsVisual Studio 2. TemplatesProject. Templates. Using the Template. After installation, load up Visual Basic 2. When the New Project dialog opens, you should see the USBTemplate option at the bottom. Select it, give your project a name and then click on OK. Visual Basic creates the basic code framework for you. The following files are created and can be found in the Solution Explorer frm. USB This is the main form where USB communication takes place. HIDInterface Contains the underlying code. HOT TO USE Contains instructions on how to use the template. The only file which you need to modify is frm. USB. Updates. 20. Modified the declaration of the PID and VID in the main form from Short to Integer Thanks for Fred Schader. Download. The template and the DLL file can be downloaded below USB HID Template for Visual Basic 2. Serial Port Programming In Visual C 2008© 2017