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

Multiple connections with nrHid in one program

Started by Norbert, March 06, 2017, 01:42:52 pm

Previous topic - Next topic

Norbert

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

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.