Re[2]: How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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: Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken. By whom, I don’t know, but it is taken. Do you have Bluetooth software installed? Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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

Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?

Regards,

Tan Teik Chuan

 





From: Robert Newton
Reply-To: “Windows System Software Devs Interest List”
To: “Windows System Software Devs Interest List”
CC: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use
Date: Wed, 19 Apr 2006 08:00:43 -0600
>I’m afraid I don’t know how how COM ports are handled but I seem to
>recall that, in the old days at least, you could boot into safe mode
>and get rid of all these previously claimed COM ports. On the other
>hand, I may have just been using too many controlled substances.
>
> > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > recommend as to figuring out who
claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?
> >
> > d


Get an advanced look at the new version of MSN Messenger

Use the com db apis and manually release the port names in a small app that you write. There is an important lesson here: always uninstall your driver using the documented apis, otherwise weird stuff like this happens

d

– I can spell, I just can’t type.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Wednesday, April 19, 2006 7:33 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?
Regards,
Tan Teik Chuan
?


From: Robert Newton
Reply-To: “Windows System Software Devs Interest List”
To: “Windows System Software Devs Interest List”
CC: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use
Date: Wed, 19 Apr 2006 08:00:43 -0600
>I’m afraid I don’t know how how COM ports are handled but I seem to
>recall that, in the old days at least, you could boot into safe mode
>and get rid of all these previously claimed COM ports. On the other
>hand, I may have just been using too many controlled substances.
>
> > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?
> >
> > d

________________________________________
Get an advanced look at the new version of MSN Messenger

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

The devicemap key is not important, if properly uninstalled (ie not manually deleting reg values), the ports class installer will free the name

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: Wednesday, April 19, 2006 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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

What do you mean by getting rid of the previously claimed ports? You don’t need to go into safe mode for that.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Robert Newton
Sent: Wednesday, April 19, 2006 7:01 AM
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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

Wasn’t talking about devicemap… Was talking about the ComDB bit map.

I say this as we’ve seen other vendors devices do this…

Btw. I know you keep saying “use the ComDB APIs” and I agree they should be used… but they haven’t always been documented.

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 Doron Holan
Sent: 19 April 2006 16:13
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

The devicemap key is not important, if properly uninstalled (ie not manually deleting reg values), the ports class installer will free the name

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: Wednesday, April 19, 2006 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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


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

But they are now :wink: so there is no reason not to use them.

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: Wednesday, April 19, 2006 8:49 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Wasn’t talking about devicemap… Was talking about the ComDB bit map.

I say this as we’ve seen other vendors devices do this…

Btw. I know you keep saying “use the ComDB APIs” and I agree they should be used… but they haven’t always been documented.

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 Doron Holan
Sent: 19 April 2006 16:13
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

The devicemap key is not important, if properly uninstalled (ie not manually deleting reg values), the ports class installer will free the name

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: Wednesday, April 19, 2006 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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


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

Course… It is also worth checking something else isnt already using a port a you’ve actually allocated via COMDB (by looking under the devicemap key) when your drivers loads…

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 Doron Holan
Sent: 19 April 2006 17:14
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

But they are now :wink: so there is no reason not to use them.

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: Wednesday, April 19, 2006 8:49 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Wasn’t talking about devicemap… Was talking about the ComDB bit map.

I say this as we’ve seen other vendors devices do this…

Btw. I know you keep saying “use the ComDB APIs” and I agree they should be used… but they haven’t always been documented.

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 Doron Holan
Sent: 19 April 2006 16:13
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

The devicemap key is not important, if properly uninstalled (ie not manually deleting reg values), the ports class installer will free the name

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: Wednesday, April 19, 2006 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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


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


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

If someone else is camping out on your com port name, the creation of the symbolic link will fail so there is no need to check the map. And what if it exists in the map? You can’t just go off and claim a new port in the driver, that would be a weird user experience.

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: Wednesday, April 19, 2006 9:36 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Course… It is also worth checking something else isnt already using a port a you’ve actually allocated via COMDB (by looking under the devicemap key) when your drivers loads…

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 Doron Holan
Sent: 19 April 2006 17:14
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

But they are now :wink: so there is no reason not to use them.

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: Wednesday, April 19, 2006 8:49 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Wasn’t talking about devicemap… Was talking about the ComDB bit map.

I say this as we’ve seen other vendors devices do this…

Btw. I know you keep saying “use the ComDB APIs” and I agree they should be used… but they haven’t always been documented.

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 Doron Holan
Sent: 19 April 2006 16:13
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

The devicemap key is not important, if properly uninstalled (ie not manually deleting reg values), the ports class installer will free the name

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: Wednesday, April 19, 2006 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: Re[2]: [ntdev] How Windows select which COM port to use

Could it be that the device isnt removing itself from the map on uninstall…

So that when installed at COM8, uninstalled, then reinstalled its then allocated at COM9 ?

And that this has been done a few times?

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 Robert Newton
Sent: 19 April 2006 15:01
To: Windows System Software Devs Interest List
Cc: Bob Midden
Subject: Re[2]: [ntdev] How Windows select which COM port to use

I’m afraid I don’t know how how COM ports are handled but I seem to
recall that, in the old days at least, you could boot into safe mode
and get rid of all these previously claimed COM ports. On the other
hand, I may have just been using too many controlled substances.

Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Tuesday, April 18, 2006 8:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

The contents show:
\Device\ltmodem0 COM3
\Device\Serial0 COM1
\Device\Serial1 COM2
\Device\USBSER000 COM9
I do not have Bluetooth software installed.

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:??Tue, 18 Apr 2006 19:41:36 -0700
>>COM3 is taken.??By whom, I don’t know, but it is taken.??Do you have Bluetooth software installed???Bth software typically
>>creates a bunch of COM ports for you, so that could be why com3-8 is taken.
>>
>>What does the contents of HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM say?
>>
>>d
>>

Robert Newton


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


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


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

I went to device manager and only found out that COM1-8 are indeed ‘in use’! Could you pleae tell me where I can find the documentation about the APIs to use, as I am still not sure how to release the port name?

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: Wed, 19 Apr 2006 08:12:34 -0700
>Use the com db apis and manually release the port names in a small app that you write. There is an important lesson here: always uninstall your driver using the documented apis, otherwise weird stuff like this happens
>
>d
>
>– I can spell, I just can’t type.
>
>From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
>Sent: Wednesday, April 19, 2006 7:33 AM
>To: Windows System Software
Devs Interest List
>Subject: RE: [ntdev] How Windows select which COM port to use
>
>Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?
>Regards,
>Tan Teik Chuan
>
>

>From: Robert Newton
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>CC: Bob Midden
>Subject: Re[2]: [ntdev] How Windows select which COM port to use
>Date: Wed, 19 Apr 2006 08:00:43 -0600
> >I’m afraid I don’t know how how COM ports are handled but I seem to
> >recall that, in the old days at least, you could boot into safe mode
> >and get rid
of all these previously claimed COM ports. On the other
> >hand, I may have just been using too many controlled substances.
> >
> > > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > > recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?
> > >
> > > d
>
>
> ________________________________________
>Get an advanced look at the new version of MSN Messenger
>—
>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


Get your ringtones, operator logos and picture messages from MSN Mobile.

In the server 2003 SP1 DDK, look up the functions that start with “ComDB”. In particular you will want
ComDBOpen
ComDBGetCurrentPortUsage
ComDBReleasePort
ComDBClose

d

– I can spell, I just can’t type.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Wednesday, April 19, 2006 10:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

I went to device manager and only found out that COM1-8 are indeed ‘in use’! Could you pleae tell me where I can find the documentation about the APIs to use, as I am still not sure how to release the port name?
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: Wed, 19 Apr 2006 08:12:34 -0700
>Use the com db apis and manually release the port names in a small app that you write. There is an important lesson here: always uninstall your driver using the documented apis, otherwise weird stuff like this happens
>
>d
>
>– I can spell, I just can’t type.
>
>From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
>Sent: Wednesday, April 19, 2006 7:33 AM
>To: Windows System Software Devs Interest List
>Subject: RE: [ntdev] How Windows select which COM port to use
>
>Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?
>Regards,
>Tan Teik Chuan
>?
>

>From: Robert Newton
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>CC: Bob Midden
>Subject: Re[2]: [ntdev] How Windows select which COM port to use
>Date: Wed, 19 Apr 2006 08:00:43 -0600
> >I’m afraid I don’t know how how COM ports are handled but I seem to
> >recall that, in the old days at least, you could boot into safe mode
> >and get rid of all these previously claimed COM ports. On the other
> >hand, I may have just been using too many controlled substances.
> >
> > > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > > recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?
> > >
> > > d
>
>
>
>Get an advanced look at the new version of MSN Messenger
>—
>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


Get your ringtones, operator logos and picture messages from MSN Mobile.

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

Try this code. It should allow you to see or release all the ComDB ports. I haven’t compiled it so it may not be 100% correct.

  • Steve -

int _tmain(int argc, _TCHAR* argv)
{
HCOMDB comdb;
LONG status = ComDBOpen(&comdb);
if (ERROR_SUCCESS == status)
{
const int bufsize = 1024;
BYTE* buf = new BYTE[bufsize];
DWORD maxports;
status =
ComDBGetCurrentPortUsage(comdb, buf, bufsize,
CDB_REPORT_BYTES, &maxports);
if (ERROR_SUCCESS == status)
{
// Any command line parameters will cause port removal
if (argc > 1)
out << _T(“Removing Ports:”) << endl;
else
out << _T(“Ports in use:”) << endl;

int count = 0;
for (int ii = 0; ii < bufsize; ++ii)
{
// Display all the com ports.
if (1 == buf[ii])
{
out << _T(“COM%d:”) << ii+1;
if (0 == (++count % 10))
out << endl;
else
out << _T(“\t”);
// Don’t remove the first two ports (COM1 and COM2)
if (argc > 1 && ii > 2)
ComDBReleasePort(comdb, ii);
}
}
out << endl;
}
else
out << _T(“Can’t get port usage”) << endl;
}
else
out << _T(“Can’t open DB”) << endl;
return 0;
}


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
Sent: Thursday, April 20, 2006 1:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How Windows select which COM port to use

I went to device manager and only found out that COM1-8 are indeed ‘in use’! Could you pleae tell me where I can find the documentation about the APIs to use, as I am still not sure how to release the port name?
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: Wed, 19 Apr 2006 08:12:34 -0700
>Use the com db apis and manually release the port names in a small app that you write. There is an important lesson here: always uninstall your driver using the documented apis, otherwise weird stuff like this happens
>
>d
>
>– I can spell, I just can’t type.
>
>From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
>Sent: Wednesday, April 19, 2006 7:33 AM
>To: Windows System Software Devs Interest List
>Subject: RE: [ntdev] How Windows select which COM port to use
>
>Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?
>Regards,
>Tan Teik Chuan
>?
>

>From: Robert Newton
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>CC: Bob Midden
>Subject: Re[2]: [ntdev] How Windows select which COM port to use
>Date: Wed, 19 Apr 2006 08:00:43 -0600
> >I’m afraid I don’t know how how COM ports are handled but I seem to
> >recall that, in the old days at least, you could boot into safe mode
> >and get rid of all these previously claimed COM ports. On the other
> >hand, I may have just been using too many controlled substances.
> >
> > > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > > recommend as to figuring out who claimed them. Did you ever manually uninstall the usb dongle by deleting reg values?
> > >
> > > d
>
>
>
>Get an advanced look at the new version of MSN Messenger
>—
>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


Get your ringtones, operator logos and picture messages from MSN Mobile.

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
________________________________________

Spam
Not spam
Forget previous vote

Tan Teik Chuan wrote:

I went to device manager and only found out that COM1-8 are indeed ‘in
use’! Could you pleae tell me where I can find the documentation about
the APIs to use, as I am still not sure how to release the port name?

Why? Why have you spent any time at all worrying about this? What on
earth is the difference in the user experience whether the device is
COM3 or COM9? They still have to pick a device!


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for your help! it works now!

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: Wed, 19 Apr 2006 23:06:14 -0700
>In the server 2003 SP1 DDK, look up the functions that start with “ComDB”. In particular you will want
>ComDBOpen
>ComDBGetCurrentPortUsage
>ComDBReleasePort
>ComDBClose
>
>d
>
>– I can spell, I just can’t type.
>
>From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
>Sent: Wednesday, April 19, 2006 10:46 PM
>To: Windows System Software Devs Interest
List
>Subject: RE: [ntdev] How Windows select which COM port to use
>
>I went to device manager and only found out that COM1-8 are indeed ‘in use’! Could you pleae tell me where I can find the documentation about the APIs to use, as I am still not sure how to release the port name?
>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: Wed, 19 Apr 2006 08:12:34 -0700
> >Use the com db apis and manually release the port names in a small app that you write. There is an important lesson here: always uninstall
your driver using the documented apis, otherwise weird stuff like this happens
> >
> >d
> >
> >– I can spell, I just can’t type.
> >
> >From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tan Teik Chuan
> >Sent: Wednesday, April 19, 2006 7:33 AM
> >To: Windows System Software Devs Interest List
> >Subject: RE: [ntdev] How Windows select which COM port to use
> >
> >Yes. I did manually uninstall by deleting reg values. Is there any way to recover the previously claimed COM ports?
> >Regards,
> >Tan Teik Chuan
> >
> >

> >From: Robert Newton
> >Reply-To: “Windows System Software
Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >CC: Bob Midden
> >Subject: Re[2]: [ntdev] How Windows select which COM port to use
> >Date: Wed, 19 Apr 2006 08:00:43 -0600
> > >I’m afraid I don’t know how how COM ports are handled but I seem to
> > >recall that, in the old days at least, you could boot into safe mode
> > >and get rid of all these previously claimed COM ports. On the other
> > >hand, I may have just been using too many controlled substances.
> > >
> > > > Well, some driver which was previously installed but not currently running claimed those missing ports. Not much more I can
> > > > recommend as to figuring out who claimed them. Did you ever
manually uninstall the usb dongle by deleting reg values?
> > > >
> > > > d
> >
> >
> >
> >Get an advanced look at the new version of MSN Messenger
> >—
> >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
>
>
>

>Get your ringtones, operator logos and picture
messages from MSN Mobile.
>—
>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


Find answers fast with Find just what you are after with the more precise, more powerful new MSN Search. Try it now.

When I worked for serial communication,
I had used other way for port enumeration and installation my private
port.
The problem was, Windows assigns for non serial drivers COMx with x>4
only.
But old (legacy) programs works only for ports <=4. :frowning:

Look into
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM

All enumed ports are here for serials and modems too.
Over more, if you change automatically assigned port number, for example
from COM5 to COM3, after reboot it will work perfect!

I wrote the small program which does this work (enum and setup number <4
for my port) during setup.
My setup went trough WHQL without problems up to Win2000.
I abandoned the subject after and have not info for latest versions, but
it may be checked easy.

Regards,
Michael.

WHQL cannot always validate code that does not do the right thing ;).
The problem with inspecting SERIALCOMM is that it does not take into
account hot pluggable serial devices (like a modem). That is the whole
point of the ComDB, it knows about COM port numbers which have been
claimed even though the device is not currently present. BTW, the ComDB
APIs are available from Win2k onward even though they only showed up in
the server 2003 DDK.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Grabelkovsky,
Michael
Sent: Sunday, April 23, 2006 1:47 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How Windows select which COM port to use

When I worked for serial communication,
I had used other way for port enumeration and installation my private
port.
The problem was, Windows assigns for non serial drivers COMx with x>4
only.
But old (legacy) programs works only for ports <=4. :frowning:

Look into
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM

All enumed ports are here for serials and modems too.
Over more, if you change automatically assigned port number, for example
from COM5 to COM3, after reboot it will work perfect!

I wrote the small program which does this work (enum and setup number <4
for my port) during setup.
My setup went trough WHQL without problems up to Win2000.
I abandoned the subject after and have not info for latest versions, but
it may be checked easy.

Regards,
Michael.


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