Child device not showing in device manager tree

Folks,

I am creating some child devices upon receiving a user request (through
IOCTLs) in my bus driver (these are sort of virtual devices).
When I create these devices, I pass the devid, hwid, comp_id, device
description, etc information from the user app. and write these informations
into the service key of
bus driver so that on next reboot, my driver can create those devices by
reading the information from the registry.

Problem:–

My device is not showing in the device manager tree.
I have provided the dispatcher routines for handling QueryID requests,
MN_TEXT requests for the PDO.
I can see that my handler QueryID handlers are getting called and they
return the appropriate responses with STATUS_SUCCESS.
But still my device is not getting popped up device tree.

However, since all this information is recorded into registry and when I do
a reboot, my bus driver while initializing reads the child devices info from
registry and creates
those devices and this time I can see all my devices into the device manager
tree.

I am sure I am doing some trivial mistake.
Few things that I want to confirm are:–

  1. Device ID, Device Desc and Unique ID string should always be NULL
    terminated?
  2. Hardware IDs and Compatible ID strings should always be terminated with
    two NULLs (as they are MULTI_SZ string)?

I am doing both of the above things.

If any one can point out any trivial mistakes on this, It would be
appreciated.

Regards
Deepak

When you are in this state where you think a child should be enumerated break into the debugger and run

!devnode 0 1

And find your FDO and see if it has child devnodes. For each that is there run

!devnode (devnode pointer from previous output)

To see what its current state is

d

Sent from my phone with no t9, all spilling mistakes are not intentional.


From: Deepak Gupta
Sent: Saturday, March 07, 2009 8:56 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Child device not showing in device manager tree

Folks,

I am creating some child devices upon receiving a user request (through IOCTLs) in my bus driver (these are sort of virtual devices).
When I create these devices, I pass the devid, hwid, comp_id, device description, etc information from the user app. and write these informations into the service key of
bus driver so that on next reboot, my driver can create those devices by reading the information from the registry.

Problem:–

My device is not showing in the device manager tree.
I have provided the dispatcher routines for handling QueryID requests, MN_TEXT requests for the PDO.
I can see that my handler QueryID handlers are getting called and they return the appropriate responses with STATUS_SUCCESS.
But still my device is not getting popped up device tree.

However, since all this information is recorded into registry and when I do a reboot, my bus driver while initializing reads the child devices info from registry and creates
those devices and this time I can see all my devices into the device manager tree.

I am sure I am doing some trivial mistake.
Few things that I want to confirm are:–

1) Device ID, Device Desc and Unique ID string should always be NULL terminated?
2) Hardware IDs and Compatible ID strings should always be terminated with two NULLs (as they are MULTI_SZ string)?

I am doing both of the above things.

If any one can point out any trivial mistakes on this, It would be appreciated.

Regards
Deepak

— 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

All,

Please ignore this.
Obviously it was my stupid mistake, I was using a bogus pointer somewhere
and to my surprise it didn’t even bugcheck since last 3 days of continuous
testing.

Frustration of not getting the desired results forced me to think that I
should take advices of the people on the list.
Anyways, Apologies for spamming.

Regards
Deepak

On Sat, Mar 7, 2009 at 6:11 PM, Deepak Gupta wrote:

> Folks,
>
> I am creating some child devices upon receiving a user request (through
> IOCTLs) in my bus driver (these are sort of virtual devices).
> When I create these devices, I pass the devid, hwid, comp_id, device
> description, etc information from the user app. and write these informations
> into the service key of
> bus driver so that on next reboot, my driver can create those devices by
> reading the information from the registry.
>
> Problem:–
>
> My device is not showing in the device manager tree.
> I have provided the dispatcher routines for handling QueryID requests,
> MN_TEXT requests for the PDO.
> I can see that my handler QueryID handlers are getting called and they
> return the appropriate responses with STATUS_SUCCESS.
> But still my device is not getting popped up device tree.
>
> However, since all this information is recorded into registry and when I do
> a reboot, my bus driver while initializing reads the child devices info from
> registry and creates
> those devices and this time I can see all my devices into the device
> manager tree.
>
> I am sure I am doing some trivial mistake.
> Few things that I want to confirm are:–
>
> 1) Device ID, Device Desc and Unique ID string should always be NULL
> terminated?
> 2) Hardware IDs and Compatible ID strings should always be terminated with
> two NULLs (as they are MULTI_SZ string)?
>
> I am doing both of the above things.
>
> If any one can point out any trivial mistakes on this, It would be
> appreciated.
>
> Regards
> Deepak
>
>
>

Doron,

Thanks a lot.
Will take a note of this.

Regards
Deepak

On 3/7/09, Doron Holan wrote:
> When you are in this state where you think a child should be enumerated
> break into the debugger and run
>
> !devnode 0 1
>
> And find your FDO and see if it has child devnodes. For each that is there
> run
>
> !devnode (devnode pointer from previous output)
>
> To see what its current state is
>
> d
>
> Sent from my phone with no t9, all spilling mistakes are not intentional.
>
> ________________________________
> From: Deepak Gupta
> Sent: Saturday, March 07, 2009 8:56 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Child device not showing in device manager tree
>
> Folks,
>
> I am creating some child devices upon receiving a user request (through
> IOCTLs) in my bus driver (these are sort of virtual devices).
> When I create these devices, I pass the devid, hwid, comp_id, device
> description, etc information from the user app. and write these informations
> into the service key of
> bus driver so that on next reboot, my driver can create those devices by
> reading the information from the registry.
>
> Problem:–
>
> My device is not showing in the device manager tree.
> I have provided the dispatcher routines for handling QueryID requests,
> MN_TEXT requests for the PDO.
> I can see that my handler QueryID handlers are getting called and they
> return the appropriate responses with STATUS_SUCCESS.
> But still my device is not getting popped up device tree.
>
> However, since all this information is recorded into registry and when I do
> a reboot, my bus driver while initializing reads the child devices info from
> registry and creates
> those devices and this time I can see all my devices into the device manager
> tree.
>
> I am sure I am doing some trivial mistake.
> Few things that I want to confirm are:–
>
> 1) Device ID, Device Desc and Unique ID string should always be NULL
> terminated?
> 2) Hardware IDs and Compatible ID strings should always be terminated with
> two NULLs (as they are MULTI_SZ string)?
>
> I am doing both of the above things.
>
> If any one can point out any trivial mistakes on this, It would be
> appreciated.
>
> Regards
> Deepak
>
>
> — 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
>
> —
> 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