[ntdev]some times EnumDisplayDevices() is not able to find my driver name.

Hi,
Some times after installation(using devcon) of my driver,
EnumDisplayDevices() is not able to find it out. I need to restart or
log-off/on to get it listed in the list but I can see driver name in device
manager.

I am using EnumDisplayDevices like below:

while (result = EnumDisplayDevices(NULL,
devNum,
&dispDevice,
0))
{
if (strcmp(&dispDevice.DeviceString[0], driverName) == 0)
break;

devNum++;
}

I have googled the issue found some instances(not in OSR) where people were
facing same issue. They were saying entry is not listed because it is not in
current session but is there any way to list it in current session because
no one will want to restart his system if it is avoidable. I have checked
registry entries are in place.

Please remember it is not happening always. I have found 2 out of 20 trials
on Win7-32. But people have observed same on vista as well.

/sarbojit

Please let me know in case given informations are insufficient or
incomplete.

/sarbojit

On Thu, Dec 16, 2010 at 6:49 PM, Sarbojit Sarkar wrote:

> Hi,
> Some times after installation(using devcon) of my driver,
> EnumDisplayDevices() is not able to find it out. I need to restart or
> log-off/on to get it listed in the list but I can see driver name in device
> manager.
>
> I am using EnumDisplayDevices like below:
> …
> while (result = EnumDisplayDevices(NULL,
> devNum,
> &dispDevice,
> 0))
> {
> if (strcmp(&dispDevice.DeviceString[0], driverName) == 0)
> break;
>
> devNum++;
> }
> …
>
> I have googled the issue found some instances(not in OSR) where people were
> facing same issue. They were saying entry is not listed because it is not in
> current session but is there any way to list it in current session because
> no one will want to restart his system if it is avoidable. I have checked
> registry entries are in place.
>
> Please remember it is not happening always. I have found 2 out of 20 trials
> on Win7-32. But people have observed same on vista as well.
>
> /sarbojit
>