Author Topic: Select directly hid device  (Read 1097 times)

pgerbet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Select directly hid device
« on: September 21, 2012, 10:37:47 am »
Hello

is it possible to select device hid directly ?
is possible to use :

nrHid1->HidDevice->VendorId
 nrHid1->HidDevice->ProductId
for select device
thank you
regards

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Select directly hid device
« Reply #1 on: September 21, 2012, 11:16:03 am »
Hello

Please check this:
http://forums.nrcommlib.com/index.php?topic=230.0

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

pgerbet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Select directly hid device
« Reply #2 on: September 21, 2012, 03:16:43 pm »
and select directly via nrHid1
or nrDeviceBox1

is it possible

pgerbet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Select directly hid device
« Reply #3 on: September 21, 2012, 03:26:39 pm »
hello,
i have test the exemple delphi, try to convert in c++ but don't work !

pgerbet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Select directly hid device
« Reply #4 on: September 21, 2012, 04:14:32 pm »
hello,

it's my contribution

select directly device

code:
 AnsiString   Vid;
 AnsiString   Pid;


 for (int i = 0; i < nrHid1->DeviceCount; i++)
 {
  nrHid1->DeviceIndex = i;
  Vid =  (IntToHex(nrHid1->HidDevice->VendorId, 4));
  Pid =  (IntToHex(nrHid1->HidDevice->ProductId, 4));
     if(Vid == "XXXX" && Pid == "XXXX")
     {
      ShowMessage ( "VendorID = " + Vid + " ; " + "ProductID = " + Pid);
      nrHid1->DeviceIndex = i;
      nrHid1->Active = true ;
      break;
     }

 }