AW: How to find those disabled devices?

There exist no device object for a disabled device and no device
interface is registered for it. So you can’t obtain a device path and -
of course - can’t open, read, write the device. But I would expect that
you can get/set device information properties like friendly name etc. I
haven’t tried this however.


Von: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Im Auftrag von Yiping Han
Gesendet: Mittwoch, 10. Mai 2006 00:28
An: Windows System Software Devs Interest List
Betreff: RE: [ntdev] How to find those disabled devices?

I mean I can get the Device ID, but I cannot get the device properties
since it’s disabled, I cannot open and read write it. Is there a way I
can do that?


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Tuesday, May 09, 2006 6:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to find those disabled devices?

In device manager, user can disable a device (not uninstall it). But
when I enumerate the devices by SetupDiGetClassDevs(), I cannot get
them. So, can anyone tell me how can I enumerate those disabled devices?

Thanks!


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

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties since
> it’s disabled, I cannot open and read write it. Is there a way I can do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But when I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So, can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so I
know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and then
check if it is not the desired one then disable it again. This will mess up
the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So, can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

Check the location property

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

Peter,

Mostly the second situation. Since the instance ID might change. What I can
guarantee is the scsi address. Yes. If the location information is
associated with the scsi address, that should work and I’m looking at it
right now.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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 think Peter means to save it before disable it if it was your program who
disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it. But
for the second situation, no way you can save it. But parsing the location
string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

*sigh*

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 12:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it.
But for the second situation, no way you can save it. But parsing the
location string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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 got you. You fall into the problem I had at the beginning. I was trying to
achieve the device instance id. There is a way to do that if you have know
which device you are working with, you may google for it. But later, I gave
it up since I find an alternative way.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 12:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

*sigh*

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 12:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it.
But for the second situation, no way you can save it. But parsing the
location string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

Why would the instance ID change? It’s based on the location of the
device and the location of the controller it’s attached to?

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 8:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Peter,

Mostly the second situation. Since the instance ID might change. What I
can guarantee is the scsi address. Yes. If the location information is
associated with the scsi address, that should work and I’m looking at it
right now.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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

SetupDiGetDeviceInstanceId()

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 9:20 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

*sigh*

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 12:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it.
But for the second situation, no way you can save it. But parsing the
location string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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 think when peter said the “device instance id”, he might have meant
the entire device instance path (which is constant for the device as
long as the topology remains the same), e.g. the string
<device instance id><instance id>

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 9:32 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I got you. You fall into the problem I had at the beginning. I was
trying to
achieve the device instance id. There is a way to do that if you have
know
which device you are working with, you may google for it. But later, I
gave
it up since I find an alternative way.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 12:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

sigh

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 12:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it.
But for the second situation, no way you can save it. But parsing the
location string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

BTW - the lack of instance ID support in SetupDiGetDeviceRegistryProperty
and IoGetDeviceProperty is really nasty.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Peter Wieland”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 8:49 PM
Subject: RE: [ntdev] How to find those disabled devices?

Why would the instance ID change? It’s based on the location of the
device and the location of the controller it’s attached to?

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 8:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Peter,

Mostly the second situation. Since the instance ID might change. What I
can guarantee is the scsi address. Yes. If the location information is
associated with the scsi address, that should work and I’m looking at it
right now.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

Well now I feel silly. I was looking for it in the wrong place.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 12:51 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

SetupDiGetDeviceInstanceId()

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 9:20 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

*sigh*

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 12:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. Peter illustrated two situations. The first situation, you have the
device enabled at the beginning so you can save it before disable it.
But for the second situation, no way you can save it. But parsing the
location string can work, I’ve just done this.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

But how do you get it to begin with? I can’t save info I don’t have.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 11:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

I think Peter means to save it before disable it if it was your program
who disabled that device.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

How does one get the device instance ID? I did not see that as an option
in SetupDiGetDeviceRegistryProperty.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

Is SetupDiGetDeviceInstanceId() what you are looking for?

Philip D. Barila
Seagate Technology LLC
(720) 684-1842

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 10:20 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

*sigh*

In that first situation, how do you get the instance ID to begin with?
You mention saving it. I don’t have it yet. How can I save it? Assume
the device is enabled. How do I get the device instance ID in an
application? I can get its HW ID. I can get its device interfaces. I can
get a whole lot of other info about it. But I don’t know how to get its
device instance ID. That particulr property is unobtainable as far as I
can tell, but since someone metioned saving it, I guess there must be a
way to obtain it. How do you obtain it?

Beverly

Looks like the different groups of Microsoft develop team do not cooperate
well, there are so many different so called "id"s for devices.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, May 10, 2006 1:29 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

BTW - the lack of instance ID support in
SetupDiGetDeviceRegistryProperty
and IoGetDeviceProperty is really nasty.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Peter Wieland”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 8:49 PM
Subject: RE: [ntdev] How to find those disabled devices?

Why would the instance ID change? It’s based on the location of the
device and the location of the controller it’s attached to?

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 8:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Peter,

Mostly the second situation. Since the instance ID might change. What I
can guarantee is the scsi address. Yes. If the location information is
associated with the scsi address, that should work and I’m looking at it
right now.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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

Peter,

It is a virtual device. The only thing keeps static is the scsi id which is
associate with the disk serial number. The instance id changes if the
virtual disks are brought up in different orders.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 12:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Why would the instance ID change? It’s based on the location of the
device and the location of the controller it’s attached to?

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 8:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Peter,

Mostly the second situation. Since the instance ID might change. What I
can guarantee is the scsi address. Yes. If the location information is
associated with the scsi address, that should work and I’m looking at it
right now.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 10:46 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Actually let me ask a question first …

You want to enable a “specific SCSI disk”. How is that disk specified?
Is it one that you’ve seen before? Or are you letting the user specify
this by using the SCSI address?

If you’re trying to enable the same device you were using before, you
can save away the device instance ID and use that instance ID to locate
the device a second time. If, on the other hand, you’re trying to
enable an arbitrary disk using the address you may need to try and parse
the location information.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
Sent: Wednesday, May 10, 2006 7:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to find those disabled devices?

Yes. That’s the dilemma I have as you two described. I want to enable a
specific scsi disk in a user program. And I need to know its scsi id so
I know that’s the one I want to enable. Is there a way to retrieve this
information without open the device? I don’t think I can enable it and
then check if it is not the desired one then disable it again. This will
mess up the things.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Wednesday, May 10, 2006 9:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to find those disabled devices?

No, you cannot open or read the disabled devices. They have no names
suitable for CreateFile.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yiping Han”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 2:28 AM
Subject: RE: [ntdev] How to find those disabled devices?

> I mean I can get the Device ID, but I cannot get the device properties
since
> it’s disabled, I cannot open and read write it. Is there a way I can
do
> that?
>
>
>
> _____
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yiping Han
> Sent: Tuesday, May 09, 2006 6:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to find those disabled devices?
>
>
>
> In device manager, user can disable a device (not uninstall it). But
when
I
> enumerate the devices by SetupDiGetClassDevs(), I cannot get them. So,
can
> anyone tell me how can I enumerate those disabled devices?
>
>
>
> Thanks!
>
>
> —
> 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


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