PortName under USB Device Parameters key

Under the various USB device keys , there is a “Device Parameters \PortName” REG_SZ value which is something like “COM5” , and under “Device Parameters \SymbolicName” REG_SZ value as “??\USB#Vid_0763&Pid_0033#5&2922bd38&0&6#{a5dcbf10-6530-11d2-901f-00c04fb951ed}”.

I knew that the symbolic name string would be generated when I call WdfDeviceCreateSymbolicLink (Device,L"\DosDevices\COM5") ,

And I would like to know when will the “Device Parameters \PortName” key be generated?
I found that this key was appeared earlier than “Symbolicname” . And I didn’t do anything in INF to register this key

Are there any relevant documents talking about this subject ? I really interested in what is happening with register while install/uninstall driver

Thanks in advance!

By the time your driver’s adddevice() is called, portname is present. The ports class installer writes it there when it assigns you a port name. The symboliclink values is written later by the usb stack, it is private to usb, you shouldn’t use it.

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@hotmail.com
Sent: November 02, 2010 5:43 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PortName under USB Device Parameters key

Under the various USB device keys , there is a “Device Parameters \PortName” REG_SZ value which is something like “COM5” , and under “Device Parameters \SymbolicName” REG_SZ value as “??\USB#Vid_0763&Pid_0033#5&2922bd38&0&6#{a5dcbf10-6530-11d2-901f-00c04fb951ed}”.

I knew that the symbolic name string would be generated when I call WdfDeviceCreateSymbolicLink (Device,L"\DosDevices\COM5") ,

And I would like to know when will the “Device Parameters \PortName” key be generated?
I found that this key was appeared earlier than “Symbolicname” . And I didn’t do anything in INF to register this key

Are there any relevant documents talking about this subject ? I really interested in what is happening with register while install/uninstall driver

Thanks in advance!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> And I would like to know when will the “Device Parameters \PortName” key be generated?

By Ports class coinstaller in user mode, it uses ComDb API to do this.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thanks Doron & Maxim !

I ever seen a case that when I pluged in a device ,It generated a com port number the same as another port (i.e It shows two Com5 in Device Manager ).
Is it unique index while it was generated by class installer?

That should not happen.did you manually uninstall or delete reg keys for the first device?

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@hotmail.com
Sent: November 02, 2010 6:23 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] PortName under USB Device Parameters key

Thanks Doron & Maxim !

I ever seen a case that when I pluged in a device ,It generated a com port number the same as another port (i.e It shows two Com5 in Device Manager ).
Is it unique index while it was generated by class installer?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

>That should not happen.did you manually uninstall or delete reg keys for the

first device?

Nope .

Is it matter with I manually modify the com port number in “Port Settings” of “Device Properties” ?
And It is weird that if I plug in the same device into same usb hardware port ,it appear different COMx.(sometimes COM5 ,Sometimes COM6).

And I want to ask another question, Why some com port device have “Port Settings” tab in Properties, some have not .

The device has to be installed in the ports device class to get that prop page.

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@hotmail.com
Sent: November 02, 2010 8:06 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] PortName under USB Device Parameters key

>That should not happen.did you manually uninstall or delete reg keys for the
>first device?

Nope .

Is it matter with I manually modify the com port number in “Port Settings” of “Device Properties” ?
And It is weird that if I plug in the same device into same usb hardware port ,it appear different COMx.(sometimes COM5 ,Sometimes COM6).

And I want to ask another question, Why some com port device have “Port Settings” tab in Properties, some have not .


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

>The device has to be installed in the ports device class to get that prop page.

I specified the Class in [version] section of INF file
Class=Ports
ClassGUID={4D36E978-E325-11CE-BFC1-08002BE10318}

I didn’t get the prop page . Did I miss anything here?

Do you have an EnumPropPages32 value under the dev instance path under the class key for your device (ie HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e978-e325-11ce-bfc1-08002be10318}\Xxxx where Xxxx is the instance number)?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, November 02, 2010 8:37 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] PortName under USB Device Parameters key

The device has to be installed in the ports device class to get that prop page.

I specified the Class in [version] section of INF file Class=Ports ClassGUID={4D36E978-E325-11CE-BFC1-08002BE10318}

I didn’t get the prop page . Did I miss anything here?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

NO.

So I should do that by myself ,it means Is hould write the registry,or somewhere I can set it ?

You can do this in the INF, take %windir%\infs\msports.inf as an example

[ComPort.NT]
CopyFiles=ComPort.NT.Copy
AddReg=ComPort.AddReg, ComPort.NT.AddReg
LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa
SyssetupPnPFlags = 1

[ComPort.NT.AddReg]
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”
; Uncomment the following line if you want to override the advanced dialog for
; your device. See msports.h for protoype of OverrideAdvancedFunction
; HKR,EnumAdvancedDialog,“yourdll.dll,OverrideAdvancedFunction”

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, November 02, 2010 10:24 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] PortName under USB Device Parameters key

NO.

So I should do that by myself ,it means Is hould write the registry,or somewhere I can set it ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks Doron!

May be I ask a newbie’s question .
I will add the registry .