• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Select directly hid device

Started by pgerbet, September 21, 2012, 07:37:47 am

Previous topic - Next topic

pgerbet

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

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

pgerbet

and select directly via nrHid1
or nrDeviceBox1

is it possible

pgerbet

hello,
i have test the exemple delphi, try to convert in c++ but don't work !

pgerbet

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;
     }

}