EnumDisplayDevices from a service, returns none...

  • Thread starter Thread starter a.kolarik
  • Start date Start date
A

a.kolarik

After creating a service on Vista I want the installer to start it.
Unfortunately GetDisplayDevices() returns none. The same thing happens
when trying to start the service from the services panel. I can't
start the service without setting stuff up based on info from a
display driver. It worked ok on 2000 and XP.

Interestingly if I reboot the box and Vista starts the service
GetDisplayDevices() works as expected and the service starts fine. But
I'd rather not have the users reboot the box as part of the install.

Old posts refer to needing to set the service to allow desktop
interaction and using LocalSystem (which this one is). On Vista you
can't have desktop interaction from what I gather.

Maybe the desktop the service is tied to doesn't have any display
devices, but trying to associate the service's thread with the
"InputDesktop" doesn't work either,
hdeskInput = OpenInputDesktop(0, FALSE, MAXIMUM_ALLOWED);
returns NULL.

Any idea how I can get the list of display drivers? For that matter I
just iterate though them looking for a certain one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top