The com name arbiter is not a public structure and you are not supposed
to touch this field directly. You need to use the com name DB APIs in
user mode. There is no API in kernel mode, but as a driver you are not
supposed to assign yourself a name…(for a variety of reasons).
d
– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rob Linegar
Sent: Tuesday, April 18, 2006 2:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use
COM Ports should be allocated via the COM Arbiter map.
It’s a 32 byte (yes byte… NOT bit) value called “ComDB” under
HKEY_LOCAL_MACHINE, “System\CurrentControlSet\Control\COM Name
Arbiter”…
BR,
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 Tan Teik Chuan
Sent: 18 April 2006 07:46
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use
Below is taken from .inf of my device.
[Version]
Signature=“$Windows NT$”
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MCHP%
LayoutFile=layout.inf
DriverVer=03/31/2006,1.0.0000.0
[DriverInstall.nt.AddReg]
HKR,DevLoader,*ntkern
HKR,NTMPDriver,usbser.sys
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
HKR,PortSubClass,1,01
You can see that I’ve set the device class Ports and PortSubClass, but
Windows still cannot assign the next available name for my device. It’s
assigning COM9 to my device. My desktop only have COM1 and COM2.
I am new to Windows Driver. So please bear with me if my question seems
to
be ‘funny’.
Thanks.
Regards,
Tan Teik Chuan
From: “Doron Holan”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] How Windows select which COM port to use
>Date: Mon, 17 Apr 2006 21:22:08 -0700
>
>Windows maintains a list of assigned com port names and assigns the new
>port the next available name. for this to happen, the device must be
>installed in the “Ports” device class with the correct “PortSubClass”
>value in the INF. There is no way to know ahead of time which COM port
>name will be assigned. You have to let the user choose the com port.
>For instance, what if the user wants to use another com port with the
>application? If you know/can find the device instance for your
>particular device, you can read the “PortName” value from the device
>node.
>
>Windows can support an infinite number of COM ports, but after COM9,
you
>must open up the port with the “\.\COMX” syntax instead of COMX (the
>\.\COMX syntax works from COM1-9).
>
>d
>
>
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
>Sent: Monday, April 17, 2006 9:15 PM
>To: Windows System Software Devs Interest List
>Subject: [ntdev] How Windows select which COM port to use
>
>Hi,
>I’ve one USB-to-RS232 device connected to Windows. May I know how
>Windows select which COM port this device used?
>I’ve one Windows application that will use the virtual COM port. The
>user might not know the COM port used. So, in the application, I need
to
>auto select the virtual COM port for the user. In order to do this, I
>need to know how Windows selects(assigns) the COM port number to the
>device.
>By the way, how many virtual COM port that Windows can support?
>PS: Windows = WinXP,Win2K,WinME
>Thanks.
>
>Regards,
>Tan Teik Chuan
>
>
>
>Find love online with MSN Personals.
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer
_________________________________________________________________
Block pop-up ads with MSN Toolbar. http://toolbar.msn.com.my/
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer