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

How to identify between 2 idenditical devices? your opinion?

Started by chedges, January 28, 2009, 01:41:53 pm

Previous topic - Next topic

chedges

HI,

I have a situation where I could potentially have two identical devices (printers) installed on my machine and I would need to be able
to tell which device I should be writing to via some kind of Id.

I can see the devices have VendorId, ProductId and SerialNo (this doesn't seem to be populated). As the devices are identical
I presume the ProductId and VendorId will be the same on both devices.

Is there some other identification Id that I could use to tell the two devices instances apart? I need to do this as my app will not have a UI
and no user intervention is allowed (NTService). This id needs to be persistent and not session based as it will be used as a permanent key to id the device!

Bit of a odd question, so I'm just wondering what you think?

Roman Novgorodov

Hello

You can try the following string properties of device:

nrHid1.HidDevice.InstanceId
nrHid1.HidDevice.NamePDO

I think they are unique.

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


hid1

Hello Roman,

PDO means?  Sorry, current chm help cant explains it.  May be help file mising.

TnrHid component (nrComm Lib) properties in help copied another section?


nrHid  can read another USB device strings from device?  How?

our device  can store any custom string

Roman Novgorodov

Hello

PDO is physical device object. You need read Microsoft DDK/WDK for understand it.

About device properties. You can take a look public interfaces of the TnrHidDevice and TnrDevice classes.
See HIDDemo sources.

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