Another way is to enumerate the serial port device interface guid.
Hopefully the usb driver enables this interface. For each interface
instance, you can use the HDEVINFO and SetupDi functions to retrieve
either
The
- enumerator of the device. I would do a case insensitive compare
against “USB”. If it fails, you know it is not USB. I would not
compare against a hw based serial ports enumerator b/c it must less
deterministic (ACPI, ISA, PCI, PCMCIA)
- service of the device. This would be a case insensitive compare
against “serial”
I would go with 1) b/c that would be less fragile in terms of volatility
of service names.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rob Linegar
Sent: Monday, January 17, 2005 8:21 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] serial port provider ?
You could look in the HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
key and
see if the symlink matches is one for the driver for the CP101 driver.
(slabser01?)
Hope that helps,
Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
Sent: 17 January 2005 15:46
To: Windows System Software Devs Interest List
Subject: [ntdev] serial port provider ?
Hi ,
i got a serial device with a CP2101 chips on it , so i can use the
serial or
usb .
my driver opens a serial port anyway as the usb chip emulate a serial
port .
in my user mode config panel , i made an auto detect feature which scans
all
serial ports and then configure the device .
my question is , is there any way to know in the user mode config panel
, if
the serial port used by the driver is a standard one or the USB
emulation ?
i looked into the COMMPROP , but both appears as PST_RS232 when free and
PST_UNSPECIFIED when used by my driver .
when using Portmon , i can see the provider of the serial port , either
Serial0 to X or slabser0 to X ( the CP2101 driver ) how to get that
property
?
thanks
R.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@des.co.uk
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com