Using the Library


Using the Library
HID Class DLL provides a interface to the HID class device.

The DLL encapsulates the bridge to unmanaged code and interfacing to the operating system from your program. 
This DLL assumes the device we are attaching to enumerates as a generic HID device. That is the data is passed as an array of bytes (usually 64). See the firmware in the Microchip Applications Library, "USB Device - HID - Custom Demos".
The DLL encapsulates the windows OS calls necessary to search though the list of connected devices and find the device with the specified Vendor and Product ID. Then once it's found it opens a pipeline to the device. It also automatically tries to reopen the device in case it has been disconnected and reconnected. This makes recovering... more 
The DLL is simple and easy to use. Associate the DLL with the project, declare the name space, initialize the DLL and then read and write as necessary:
First Associate the DLL with the application. In Visual C++ 2008 Express Edition, select Project | Properties (Alt-F7). "Framework and References" tab. Add New Reference button, Browse Tab. Then navigate to the DLL location and add it to the project.
Next, Add "using namespace HIDClass;" to the namespace section at the top of your code.
Then you only need three calls to use the library. HIDClassInit, HIDWriteReport and HIDReadReport. Other calls... more 
Microchip HID Class DLL 1.10 - [15 April 2010]
Copyright © 2009, 2010 Microchip Technology, Inc.  All rights reserved.