Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 13  
03 Jan 17 08:24
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Hi, I am newbie in windows device drivers. we have a driver which is running as a service and creating two virtual serial ports in system. this driver not have any .inf file and .cat files. it has only the .sys files. which is running as service and creating virtual serial ports in system. But this virtual ports are not listed/shown/enumerated in the device manger. similarly we have one Application developed in MFC, which is listing in the virtual serial com ports, like what are com port numbers allocated to our device (COM3, COM4). But these are not listing in device manager after running the application also. By using this port number we are able to communicate to device through the any application like hyper terminal or tera term. i have seen the driver is listed in "Non Plug and Play" section in device manager but No virtual serial ports. Now i want to enumerate/list these virtual serial ports inside the device manager. For this i googled and found adding serenum.sys as a upper filter driver for our drivers. Based on that i written one .inf file which will install our driver as well as serenum.sys as upper filter driver to our driver and created the .cat file also. but i was failed in installing the driver our device since ours in not a "Plug and play" driver its 'Non- plug ans play" driver. please guide me , am i going in the right way or else any other way is there to enumerate the virtual serial ports under device manager. Please guide me to do this. Many thanks in advance. --
  Message 2 of 13  
03 Jan 17 10:14
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

Device manager shows pnp devices. A virtual serial port can be a pnp device, but it needs the inf which you are forgoing. Device manager does not really show non pnp devices in any effective way,over the years this part has been reduced as their is no real value in it as there are other ways to manage non pnp kernel services. What bigger problem are you trying to solve! Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of johnny basha <xxxxx@gmail.com> Sent: Tuesday, January 3, 2017 5:22:22 AM To: Windows System Software Devs Interest List Subject: [ntdev] Enumerating virtual serial ports under Device Manger Hi, I am newbie in windows device drivers. we have a driver which is running as a service and creating two virtual serial ports in system. this driver not have any .inf file and .cat files. it has only the .sys files. which is running as service and creating virtual serial ports in system. But this virtual ports are not listed/shown/enumerated in the device manger. similarly we have one Application developed in MFC, which is listing in the virtual serial com ports, like what are com port numbers allocated to our device (COM3, COM4). But these are not listing in device manager after running the application also. By using this port number we are able to communicate to device through the any application like hyper terminal or tera term. i have seen the driver is listed in "Non Plug and Play" section in device manager but No virtual serial ports. Now i want to enumerate/list these virtual serial ports inside the device manager. For this i googled and found adding serenum.sys as a upper filter driver for our drivers. Based on that i written one .inf file which will install our driver as well as serenum.sys as upper filter driver to our driver and created the .cat file also. but i was failed in installing the driver our device since ours in not a "Plug and play" driver its 'Non- plug ans play" driver. please guide me , am i going in the right way or else any other way is there to enumerate the virtual serial ports under device manager. Please guide me to do this. Many thanks in advance. --- NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at --
  Message 3 of 13  
04 Jan 17 07:27
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Hi Doron thank u for reply. we just want to show com ports numbers in device manager instead of seeing ports from the MFC application. Till now we have not done any changes in driver source, do i need to do any changes in drivers sources in order to enumerate serial ports in device manager like adding Plug and Play functionality in driver sources. i have only tried writing both .inf and .cat files and loading serenum.sys as upper filter drivers to our drivers based on googled information. but didn't succeed. even i tried adding serenum.sys as upper filters driver to our drivers with help of "filterman" utility from the OSR in window xp machine in order to confirm serial port enumeration under device manager can be done or not with the help serenum.sys. but didn't succeed. i am not getting am i going in a right way or not.since i am newbie in windows device drivers what ever driver we are using now is written long back and running as service even in latest window OS's. now i want to show generated virtual serial ports into device manager. do we need to do any huge design changes in drivers sources or any other way is there to do this. please let me know if any additional details required related to our device and driver. please guide to me to achieve this.
  Message 4 of 13  
04 Jan 17 10:12
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

Serenum by itself won't make it show up, it is just a pnp filter that enumerates devices attached to the port. The inf itself won't make it show up as the inf requires a pnp driver. If you want it to show up in device manager the driver itself needs to be pnp. This is no small task, at this point it is probably a 25-50% gutting of the source to convert it to kmdf. And for what? Showing a name in device manager? You are using a nuke to kill a fly, not worth it if your current software is stable and works. Why introduce such a huge change? Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@gmail.com> Sent: Wednesday, January 4, 2017 4:26:49 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Enumerating virtual serial ports under Device Manger Hi Doron thank u for reply. we just want to show com ports numbers in device manager instead of seeing ports from the MFC application. Till now we have not done any changes in driver source, do i need to do any changes in drivers sources in order to enumerate serial ports in device manager like adding Plug and Play functionality in driver sources. i have only tried writing both .inf and .cat files and loading serenum.sys as upper filter drivers to our drivers based on googled information. but didn't succeed. even i tried adding serenum.sys as upper filters driver to our drivers with help of "filterman" utility from the OSR in window xp machine in order to confirm serial port enumeration under device manager can be done or not with the help serenum.sys. but didn't succeed. i am not getting am i going in a right way or not.since i am newbie in windows device drivers what ever driver we are using now is written long back and running as service even in latest window OS's. now i want to show generated virtual serial ports into device manager. do we need to do any huge design changes in drivers sources or any other way is there to do this. please let me know if any additional details required related to our device and driver. please guide to me to achieve this. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 5 of 13  
05 Jan 17 11:31
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Hi Doron thank u for your reply. But we have requirement from the client. they need to have virtual serial ports in device manager. so we have to do changes in the drivers. please suggest me to do this.please do provide any example drivers to follow to achieve this. or is any there ant other way. like writing any kind of application which will show virtual ports in device manager. i am thinking like changing this to PNP drivers by adding some AddDevice routine and PNP handling to this drivers sources. is that is the right way? or else is any other way there? today i have gone through the MFC application Sources and found it is communicating with driver with help of openservice and start service and some other API's. because of our driver is running as service. if we do change the driver as PNP driver, then we need to do changes in the Application also. is it right?, since old driver is running as service. please suggest me how to processed further. thank u
  Message 6 of 13  
05 Jan 17 11:43
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

When you say the old driver is running as a service, do you mean a user or = kernel mode service?=20 Let's be clear, moving to pnp will be a mostly gut and rewrite of large por= tions of your code. If you want a sample, look at the serial sample in the = WDK. You would take it as a template, rip out all of the hw access routines= and then replace them with whatever virtual serial port logic you have tod= ay. It is not as simple as adding AddDevice and supporting some pnp request= s. You want to use KMDF here, otherwise this lengthy project will be 3x as = long and 3x less correct d -----Original Message----- From: xxxxx@lists.osr.com [mailto:bounce-622965-26293@lists.o= sr.com] On Behalf Of xxxxx@gmail.com Sent: Thursday, January 5, 2017 8:29 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: RE:[ntdev] Enumerating virtual serial ports under Device Manger Hi Doron thank u for your reply. But we have requirement from the client. they need to have virtual serial p= orts in device manager. so we have to do changes in the drivers. please suggest me to do this.pleas= e do provide any example drivers to follow to achieve this. or is any there= ant other way. like writing any kind of application which will show virtua= l ports in device manager. i am thinking like changing this to PNP drivers by adding some AddDevice ro= utine and PNP handling to this drivers sources. is that is the right way? o= r else is any other way there? today i have gone through the MFC application Sources and found it is comm= unicating with driver with help of openservice and start service and some o= ther API's. because of our driver is running as service. if we do change the driver as PNP driver, then we need to do changes in = the Application also. is it right?, since old driver is running as service. please suggest me how to processed further. thank u --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=3Dnt= dev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and softwar= e drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.= osronline.com/page.cfm?name=3DListServer>
  Message 7 of 13  
11 Jan 17 10:22
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Hi Doron thank u for tour inputs. our old driver is running as the kernel mode service only. I have started looking into serial port source. Similarly i have some more doubts about our device and driver architecture. i will let u know once i got clarity on that. once again thank u very much Doron.
  Message 8 of 13  
23 Jan 17 09:04
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

here are the some more details about our device. Our Device is like the remote network connected Terminal Servers which is having serial ports. we have a set of utilities in order connect to the network device, which consists of one MFC application to configure the device and one more application converting protocol data and one driver(which i have discussed in above) which is running as kernel mode service and creating serial ports in windows in order to communicate that serial ports from the pc serial ports. as i discussed above we want to enumerate this serial ports under device manager since in old driver we are able to see only from the MFC application. what i am expecting to do is(final output) i want to simulate my remote ports on network connected Terminal Servers to be used like local system serial ports from the device manager serial ports. as our old drivers setup(including application) already doing same form the MFC application and other components. now we want to do same from the device manager also. i am newbie in windows drivers and new to this kind of drivers models. i have doubts like writing PNP driver is going solve my problem, if its PNP driver then how to install the drivers and how the system is going to found the new hardware got connected since our device is connected in the network. please to provide some inputs. it seems to be more architectural changes need to do for solution. i am not getting how to proceed further in this project. please do suggest some approach and some examples to develop this. please forgive me if ask any silly things many thanks in advance
  Message 9 of 13  
23 Jan 17 09:14
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

Does the number of virtual ports change dynamically? Or is it always a fixed number? Do you always have the app running? Do you only want the ports "present" when the app is running? Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@gmail.com> Sent: Monday, January 23, 2017 6:03:57 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Enumerating virtual serial ports under Device Manger here are the some more details about our device. Our Device is like the remote network connected Terminal Servers which is having serial ports. we have a set of utilities in order connect to the network device, which consists of one MFC application to configure the device and one more application converting protocol data and one driver(which i have discussed in above) which is running as kernel mode service and creating serial ports in windows in order to communicate that serial ports from the pc serial ports. as i discussed above we want to enumerate this serial ports under device manager since in old driver we are able to see only from the MFC application. what i am expecting to do is(final output) i want to simulate my remote ports on network connected Terminal Servers to be used like local system serial ports from the device manager serial ports. as our old drivers setup(including application) already doing same form the MFC application and other components. now we want to do same from the device manager also. i am newbie in windows drivers and new to this kind of drivers models. i have doubts like writing PNP driver is going solve my problem, if its PNP driver then how to install the drivers and how the system is going to found the new hardware got connected since our device is connected in the network. please to provide some inputs. it seems to be more architectural changes need to do for solution. i am not getting how to proceed further in this project. please do suggest some approach and some examples to develop this. please forgive me if ask any silly things many thanks in advance --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 10 of 13  
23 Jan 17 09:45
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Many thanks Doron for promt reply the numbers of virtual ports are fixed for a device(but we have boards with different number of virtual ports, if board which is connected in the network is changed then number virtual ports are also be chage).and one application which is kind of socket application running alway. One more MFC application showing the virtual serial ports when we open and the configuring the device. now i too want the virtual ports in device manger when i configure from the MFC application and need to remove from device manager when we remove from the MFC application.
  Message 11 of 13  
23 Jan 17 12:05
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

Your app that adds/removes ports will need to run as admin. You can create virtual pnp devices (also called root enumerated devices). The devcon sample shows how to do this in the "devcon install" path. It also shows how to remove the device. You will need to create a fake hardware id (a GUID as a strong guaranteed no collisions) and an inf to match against. You should use the serial sample as a guide on how to incorporate wdf into your driver Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@gmail.com> Sent: Monday, January 23, 2017 6:44:44 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Enumerating virtual serial ports under Device Manger Many thanks Doron for promt reply the numbers of virtual ports are fixed for a device(but we have boards with different number of virtual ports, if board which is connected in the network is changed then number virtual ports are also be chage).and one application which is kind of socket application running alway. One more MFC application showing the virtual serial ports when we open and the configuring the device. now i too want the virtual ports in device manger when i configure from the MFC application and need to remove from device manager when we remove from the MFC application. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 12 of 13  
24 Jan 17 08:18
johnbasha shiak
xxxxxx@gmail.com
Join Date: 19 Apr 2016
Posts To This List: 31
Enumerating virtual serial ports under Device Manger

Hi doron many thanks for your guidance , i have written inf with fake hardwareId with ports class and class guid. tried in installing the existing driver(old driver) with small changes like adddevice routine. one serial port got enumerated in device manger but not functional. i have used devcon install xxx.inf "hardwareid" .i will look into this more later related to functionality. now you are suggesting that i need to do same from application when the add/remove functionalities in app. is is right? i have gone through the devcon sources "install" cmd and now we need to integrate this in our app sources and need to invoke while doing add/ remove functionality from the app is it right? and finally from the driver side we need to have driver which is capable of creating virtual serial ports with plug and play functionality. is it right? please correct me if i understood any thing wrongly. and also if posible suggest me sample driver which will create virtual serial ports in WDM Architecture. i am not much aware of WDF architecture and our existing driver also there in WDM architecture.
  Message 13 of 13  
25 Jan 17 14:24
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
Enumerating virtual serial ports under Device Manger

These are all right except for sticking with WDM. Pnp and power are not a c= opy/paste or bolt on exercise on top of your existing driver. If you stuck = with WDM you have MAN YEARS to get it correct and functional. And it still = won't be near 100% correct.=20 With WDF you have a correct implementation from the start. There are tutori= als on converting a WDM driver to WDF on MSDN. There is a sample WDF serial= driver. While you may not be familiar with WDF and have to take the time t= o understand it, it is far cheaper to understand WDF than continue with WDM= for your driver d -----Original Message----- From: xxxxx@lists.osr.com [mailto:bounce-624117-26293@lists.o= sr.com] On Behalf Of xxxxx@gmail.com Sent: Tuesday, January 24, 2017 5:17 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: RE:[ntdev] Enumerating virtual serial ports under Device Manger Hi doron many thanks for your guidance , i have written inf with fake hardwareId with ports class and class guid. tr= ied in installing the existing driver(old driver) with small changes like a= dddevice routine. one serial port got enumerated in device manger but not f= unctional. i have used devcon install xxx.inf "hardwareid" .i will look int= o this more later related to functionality. now you are suggesting that i need to do same from application when the add= /remove functionalities in app. is is right? i have gone through the devcon sources "install" cmd and now we need to int= egrate this in our app sources and need to invoke while doing add/ remove f= unctionality from the app is it right? and finally from the driver side we need to have driver which is capable of= creating virtual serial ports with plug and play functionality. is it righ= t? please correct me if i understood any thing wrongly. and also if posible suggest me sample driver which will create virtual ser= ial ports in WDM Architecture. i am not much aware of WDF architecture and = our existing driver also there in WDM architecture. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=3Dnt= dev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and softwar= e drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.= osronline.com/page.cfm?name=3DListServer>
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 01:20.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license