Ports
May 21, 2013, 11:40:02 pm *
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: read data from USB keyboard in vb6  (Read 3327 times)
bh.hemanth
Member
*
Posts: 1


« on: July 07, 2010, 05:19:20 am »

hello all Smiley
I am trying to write and read from an usb device like USB mouse and USB keyboard.I am using windows APIs in vb6.The problem is like this :(whenever i call the APIs readfile and writefile, it returns 0 and does not return any data.Before reading data,I have successfully called APIs to detect the device name and its pid. Does any one know the reason why the bytes returned is always 0.Any type of help will be highly appreciated
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1628


WWW
« Reply #1 on: July 07, 2010, 07:46:18 am »

Windows 2000 and later have exclusive read/write access to HIDs that are configured as a system keyboards or mice.

The Windows raw input API enables applications to read Input reports when communicating with system mice and keyboards.

http://msdn.microsoft.com/en-us/library/ms645536%28VS.85%29.aspx

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!