Identify Which Desktop an App is Running On

J

Jay

Hey There,
Is it possible to get an unique identifier for a desktop that a
particular app is running from, from a service? If there are two
instances of the app running on different desktops (one desktop is
locked, the other is in use) then the service should have different
values for each one.

Thanks,
Jay
(patelj27b at gmail dot com)
 
B

Ben Voigt

Jay said:
Hey There,
Is it possible to get an unique identifier for a desktop that a
particular app is running from, from a service? If there are two

How are you identifying a "particular app"? By .exe name? By window title?

OpenInputDesktop, or else EnumDesktops and EnumDesktopWindows should let you
find a desktop handle for the desktop. Then
GetUserObjectInformation can get you the unique name.
 
J

Jay

Mr. Voigt,
I am going to be identifying the particular app by .exe name,
which I can find, in turn, the Process ID.

-Jay
 
J

Jay

Mr. Voigt,
Also, if the calling process is a service process, can it get the
input desktop handle from Open InputDesktop? Would it have the correct
window station?

-Jay
 

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

Top