PORTS Forum

Ports and Interfaces => USB => Topic started by: Tispe on November 01, 2010, 10:03:35 am

Title: unmanaged HID lib
Post by: Tispe on November 01, 2010, 10:03:35 am
USB existed before 2002, and thus before .NET. There must be a library that supports unmanaged implementation of PC software.

Take the "HID class.dll" provided by microchip which has these four functions:
void USBHIDClassInit (VID, PID, Size)
bool USBHIDWriteReport (buffer, len)
bool USBHIDReadReport (buffer)
bool IsConnected()

I am looking for a way to use these functions in a simple console or win32 c++ program, completly unmanaged.

I can't find a solution anywhere :(

Title: Re: unmanaged HID lib
Post by: Jan Axelson on November 01, 2010, 11:10:07 am
I have VB6 and VC++ applications for HID communications here:

http://www.lvr.com/hidpage.htm#MyExampleCode

Jan
Title: Re: unmanaged HID lib
Post by: Tispe on November 01, 2010, 12:55:40 pm
Hi Jan

How can I port this to a simple console application? I want to initUSB and have a main loop with read/write operations.
Title: Re: unmanaged HID lib
Post by: Jan Axelson on November 01, 2010, 01:05:38 pm
Take a look at the code that calls the HID functions. Instead of reading from and writing to a GUI, you would read and write from the console.

Jan