Hello,

I have a USB DD that carries data from a simple data collection device
to the Windows software. Each device can collect data for a few points
and subsequently some users will want to plug multiple devices in.

All of this works fine...well, there are problems but it wouldn't be
software if it worked perfectly.

My question is: I would like to be able to alter the string that shows
up in the 'remove device' list (in the system tray) so that it says (for
example)

Stop DataRecorder (345)
Stop DataRecorder (346)

Currently it shows simply:

Stop DataRecorder
Stop DataRecorder

All of physical devices have unique serial numbers. That number is
displayed prominently on the device. That is what I am showing in the
braces.

Thank you in advance

Kevin

Re: Unique Identification in 'Remove Device' list by Ray

Ray
Mon Feb 07 12:58:35 CST 2005

One (perhaps bad) way that comes to mind is to have the device report a
different "friendly name" in its descriptors... one that includes the
extra info you want shown.

Kevin wrote:
> Hello,
>
> I have a USB DD that carries data from a simple data collection device
> to the Windows software. Each device can collect data for a few points
> and subsequently some users will want to plug multiple devices in.
>
> All of this works fine...well, there are problems but it wouldn't be
> software if it worked perfectly.
>
> My question is: I would like to be able to alter the string that shows
> up in the 'remove device' list (in the system tray) so that it says (for
> example)
>
> Stop DataRecorder (345)
> Stop DataRecorder (346)
>
> Currently it shows simply:
>
> Stop DataRecorder
> Stop DataRecorder
>
> All of physical devices have unique serial numbers. That number is
> displayed prominently on the device. That is what I am showing in the
> braces.
>
> Thank you in advance
>
> Kevin

--
../ray\..

Re: Unique Identification in 'Remove Device' list by Kevin

Kevin
Mon Feb 07 15:23:40 CST 2005

Thanks Ray,

I am sure there must be a better way. Other vendors have done this sort
of thing. Look at the mass storage devices. They all end up showing
the drive letter they are mounted to. This helps the user to know which
device they want to unplug.

Kevin

Ray Trent wrote:
> One (perhaps bad) way that comes to mind is to have the device report a
> different "friendly name" in its descriptors... one that includes the
> extra info you want shown.
>
> Kevin wrote:
>
>> Hello,
>>
>> I have a USB DD that carries data from a simple data collection device
>> to the Windows software. Each device can collect data for a few
>> points and subsequently some users will want to plug multiple devices in.
>>
>> All of this works fine...well, there are problems but it wouldn't be
>> software if it worked perfectly.
>>
>> My question is: I would like to be able to alter the string that shows
>> up in the 'remove device' list (in the system tray) so that it says
>> (for example)
>>
>> Stop DataRecorder (345)
>> Stop DataRecorder (346)
>>
>> Currently it shows simply:
>>
>> Stop DataRecorder
>> Stop DataRecorder
>>
>> All of physical devices have unique serial numbers. That number is
>> displayed prominently on the device. That is what I am showing in the
>> braces.
>>
>> Thank you in advance
>>
>> Kevin
>
>

Re: Unique Identification in 'Remove Device' list by Doron

Doron
Mon Feb 07 23:02:58 CST 2005

the driver letter association is a part of the hot plug applet b/c it has
special code to handle storage. i would recommend a device co installer for
your device. it can set the device friendly name at install time. it can
create the name that appears in the stop dialog (it will also be the name
shown in device manager as well).

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Kevin" <klm@morwood.ca> wrote in message
news:%23G2NftVDFHA.3376@TK2MSFTNGP12.phx.gbl...
> Thanks Ray,
>
> I am sure there must be a better way. Other vendors have done this sort
> of thing. Look at the mass storage devices. They all end up showing the
> drive letter they are mounted to. This helps the user to know which
> device they want to unplug.
>
> Kevin
>
> Ray Trent wrote:
>> One (perhaps bad) way that comes to mind is to have the device report a
>> different "friendly name" in its descriptors... one that includes the
>> extra info you want shown.
>>
>> Kevin wrote:
>>
>>> Hello,
>>>
>>> I have a USB DD that carries data from a simple data collection device
>>> to the Windows software. Each device can collect data for a few points
>>> and subsequently some users will want to plug multiple devices in.
>>>
>>> All of this works fine...well, there are problems but it wouldn't be
>>> software if it worked perfectly.
>>>
>>> My question is: I would like to be able to alter the string that shows
>>> up in the 'remove device' list (in the system tray) so that it says (for
>>> example)
>>>
>>> Stop DataRecorder (345)
>>> Stop DataRecorder (346)
>>>
>>> Currently it shows simply:
>>>
>>> Stop DataRecorder
>>> Stop DataRecorder
>>>
>>> All of physical devices have unique serial numbers. That number is
>>> displayed prominently on the device. That is what I am showing in the
>>> braces.
>>>
>>> Thank you in advance
>>>
>>> Kevin
>>


Re: Unique Identification in 'Remove Device' list by Kevin

Kevin
Tue Feb 08 07:56:21 CST 2005

Sounds interesting! Do you have any details or references to details
about how I would do this?

Currently the device(s) get their name from the INF file...correct? So
I am therefore assuming that I have to intercept the reading of the INF
as the device is being plugged in?

I read somewhere about providing this info through a string
descriptor...but have not found anywhere that shows what specific string
descriptor it would read.

Thanks,
Kevin

Doron Holan [MS] wrote:
> the driver letter association is a part of the hot plug applet b/c it has
> special code to handle storage. i would recommend a device co installer for
> your device. it can set the device friendly name at install time. it can
> create the name that appears in the stop dialog (it will also be the name
> shown in device manager as well).
>
> d
>

Re: Unique Identification in 'Remove Device' list by Ray

Ray
Tue Feb 08 16:32:07 CST 2005

Doron: I'm guessing that having the coinstaller return
ERROR_POST_PROCESSING_REQUIRED to the DIF_INSTALL code would generate a
callback after the device is started, which would allow the OP to query
the driver for the device's serial number (or whatever) and modify the
FriendlyName using SetupDiSetDeviceRegistryProperty. Is that what you
had in mind?

Alternatively, while I wouldn't normally suggest such a hack, would it
be reasonable for the driver to just use IoOpenDeviceRegistryKey in
StartDevice and just write the FriendlyName out to the device registry
key with the desired appended info?

And to the OP: describing how to write a coinstaller is a bit out of the
scope of this newsgroup. The DDK documentation contains a moderately
reasonable discussion of this topic in the Device Installation section.
Specific questions are more likely to be answered...

Doron Holan [MS] wrote:
> the driver letter association is a part of the hot plug applet b/c it has
> special code to handle storage. i would recommend a device co installer for
> your device. it can set the device friendly name at install time. it can
> create the name that appears in the stop dialog (it will also be the name
> shown in device manager as well).
>
> d
>

--
../ray\..

Re: Unique Identification in 'Remove Device' list by Kevin

Kevin
Tue Feb 08 18:01:49 CST 2005

Thanks Ray,

After I wrote the response I started reading through the documentation I
have...and found some references to co-installers. I will see how far I
get on this road.

Thanks to all for the help.

Kevin

Ray Trent wrote:
> Doron: I'm guessing that having the coinstaller return
> ERROR_POST_PROCESSING_REQUIRED to the DIF_INSTALL code would generate a
> callback after the device is started, which would allow the OP to query
> the driver for the device's serial number (or whatever) and modify the
> FriendlyName using SetupDiSetDeviceRegistryProperty. Is that what you
> had in mind?
>
> Alternatively, while I wouldn't normally suggest such a hack, would it
> be reasonable for the driver to just use IoOpenDeviceRegistryKey in
> StartDevice and just write the FriendlyName out to the device registry
> key with the desired appended info?
>
> And to the OP: describing how to write a coinstaller is a bit out of the
> scope of this newsgroup. The DDK documentation contains a moderately
> reasonable discussion of this topic in the Device Installation section.
> Specific questions are more likely to be answered...
>
> Doron Holan [MS] wrote:
>
>> the driver letter association is a part of the hot plug applet b/c it
>> has special code to handle storage. i would recommend a device co
>> installer for your device. it can set the device friendly name at
>> install time. it can create the name that appears in the stop dialog
>> (it will also be the name shown in device manager as well).
>>
>> d
>>
>