Ports
May 21, 2013, 06:09:30 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 [2]
  Print  
Author Topic: Serial numbers  (Read 3451 times)
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1626


WWW
« Reply #15 on: March 08, 2011, 09:27:57 am »

This is off the top of my head and likely isn't 100% complete and correct but should give you a general idea.

For each of these, create copies for the multiple devices, for example hidHandle, hidHandle2:

    Private deviceNotificationHandle As IntPtr
    Private exclusiveAccess As Boolean
    Private hidHandle As SafeFileHandle
    Private hidUsage As String
    Private myDeviceDetected As Boolean
    Private myDevicePathName As String
    Private readHandle As SafeFileHandle
    Private writeHandle As SafeFileHandle

Then you can either edit the FindTheHid routine to search for multiple devices or copy the routine (call it FindTheHid2) and search for a different device. In the routines that read and write to devices, use the handle, etc. for the device you want to communicate with.

Jan
Logged
Pages: 1 [2]
  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!