Ports
May 22, 2013, 10:42:56 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: unmanaged HID lib  (Read 2162 times)
Tispe
Member
*
Posts: 3


« on: November 01, 2010, 09: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 Sad

« Last Edit: November 01, 2010, 09:14:01 am by Tispe » Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1629


WWW
« Reply #1 on: November 01, 2010, 10:10:07 am »

I have VB6 and VC++ applications for HID communications here:

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

Jan
Logged
Tispe
Member
*
Posts: 3


« Reply #2 on: November 01, 2010, 11:55:40 am »

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.
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1629


WWW
« Reply #3 on: November 01, 2010, 12: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 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!