Author Topic: unmanaged HID lib  (Read 15544 times)

Tispe

  • Member
  • ***
  • Posts: 3
unmanaged HID lib
« 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 :(

« Last Edit: November 01, 2010, 10:14:01 am by Tispe »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: unmanaged HID lib
« Reply #1 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

Tispe

  • Member
  • ***
  • Posts: 3
Re: unmanaged HID lib
« Reply #2 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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: unmanaged HID lib
« Reply #3 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