Author Topic: Multiple connections with nrHid in one program  (Read 124 times)

Norbert

  • Newbie
  • *
  • Posts: 1
    • View Profile
Multiple connections with nrHid in one program
« on: March 06, 2017, 04:42:52 pm »
Hello

I try to establish more than one connection of TnrHid in the same program.
There are several Hid-Device with the same pid and ven.
There are different instances of TnrHid, each for every Hid-Device.
Every nrHid uses his own DeviceIndex. I's no problem
to set every Hid to Active. But it's not possible to communicate
with more than one device at the same time.
E.g.:
Hid1->DeviceIndex = 1; Hid1->Active = true;
Hid2->DeviceIndex = 2; Hid2->Active = true;
Only on Hid1 works Send and AfterReceive.

If i use reverse sequence:
Hid2->DeviceIndex = 2; Hid2->Active = true;
Hid1->DeviceIndex = 1; Hid1->Active = true;
Only on Hid2 works Send an AfterReceive.

I tried differend settings with SharedMode and UseMainThread, but no success.

Any idea ?


Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Multiple connections with nrHid in one program
« Reply #1 on: April 19, 2017, 12:30:45 pm »
Hello

It is strange to wish such things :-)

Let me explain:

Real Hid Device will not work correctly in multi-usage mode.
I several clients use one device at same time the current state and behaviour of device will    
uncertain.

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.