Author Topic: Serial numbers  (Read 19772 times)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Serial numbers
« 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