No devices in device manager

Hi.
I’m not sure how this happened, but when opening devmgmt.msc on my machine I
cannot see any devices.
Also:

SetupDiGetClassDevsEx(NULL, NULL, NULL, DIGCF_ALLCLASSES, NULL, NULL, NULL);
returns INVALID_HANDLE_VALUE !

One more thing I noticed is that the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB contains the following
subkeys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-.
.
.
.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0

Still, my machine seems to function properly (for example, I have no problem
with my USB head-set), it seems the only problem is with the SetupDiXxxx()
API.
Can anyone tell me how did the machine get into this situation and how can I
fix it so I can use the SetupDiXxxx() API again?

I am working on a machine running Windows XP + SP2 with all the latest
updates.

Thanks,
Shahar

Shahar Talmi wrote:

Hi.
I’m not sure how this happened, but when opening devmgmt.msc on my machine I
cannot see any devices.
Also:

SetupDiGetClassDevsEx(NULL, NULL, NULL, DIGCF_ALLCLASSES, NULL, NULL, NULL);
returns INVALID_HANDLE_VALUE !

One more thing I noticed is that the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB contains the following
subkeys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-.
.
.
.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0123$%&‘()*+,-./0123$%&’()*+,-./0

That looks suspiciously like a USB hub gone berserk. That is a sequence
of consecutive bytes from 0x24 to 0x33 in a repeating sequence.

Were you testing an experimental bus driver at any point, or testing a
somewhat flaky piece of USB hardware, or maybe playing with some INF files?

You can just delete those keys from the registry. Regedit ordinarily
denies you the right to delete keys from the Enum tree, but that’s
easily solved. Right-click on USB, pick Permissions, click Add, add your
own user name, and give yourself Full Control and Read. Now you can
delete the keys.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks a lot Tim,
This solves it.

Shahar

“Tim Roberts” wrote in message news:xxxxx@ntdev…
> Shahar Talmi wrote:
>
>>Hi.
>>I’m not sure how this happened, but when opening devmgmt.msc on my machine
>>I cannot see any devices.
>>Also:
>>
>>SetupDiGetClassDevsEx(NULL, NULL, NULL, DIGCF_ALLCLASSES, NULL, NULL,
>>NULL);
>>returns INVALID_HANDLE_VALUE !
>>
>>One more thing I noticed is that the key
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB contains the
>>following subkeys:
>>
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()+,-./0123$%&'()+
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&’()+,-./0123$%&'()+,
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()+,-./0123$%&'()+,-
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&’()+,-./0123$%&'()+,-.
>>.
>>.
>>.
>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB$%&‘()+,-./0123$%&'()+,-./0123$%&’()+,-./0123$%&'()+,-./0123$%&‘()+,-./0123$%&'()+,-./0123$%&’()+,-./0123$%&'()+,-./0123$%&‘()+,-./0123$%&'()+,-./0123$%&’()+,-./0123$%&'()+,-./0123$%&'()+,-./0123$%&'()+,-./0
>>
>
> That looks suspiciously like a USB hub gone berserk. That is a sequence
> of consecutive bytes from 0x24 to 0x33 in a repeating sequence.
>
> Were you testing an experimental bus driver at any point, or testing a
> somewhat flaky piece of USB hardware, or maybe playing with some INF
> files?
>
> You can just delete those keys from the registry. Regedit ordinarily
> denies you the right to delete keys from the Enum tree, but that’s easily
> solved. Right-click on USB, pick Permissions, click Add, add your own user
> name, and give yourself Full Control and Read. Now you can delete the
> keys.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>