Home » Category » DotNet Visual C

DotNet Visual C: Identify Which Desktop an App is Running On

206| Thu, 03 Jan 2008 17:25:00 GMT| jay| Comments (3)
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)

Keywords & Tags: identify, desktop, app, running, dotnet, visual, .net

URL: http://dotnet.itags.org/visual-c/71214/
 
«« Prev - Next »» 3 helpful answers below.
"Jay" <patelj27b...gmail.comwrote in message
news:1161878064.614969.80020...m73g2000cwd.googlegro ups.com...
Quote:
Originally Posted by
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.

Quote:
Originally Posted by
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)
>

benvoigt | Thu, 03 Jan 2008 17:26:00 GMT |

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

-Jay

Ben Voigt wrote:

Quote:
Originally Posted by
"Jay" <patelj27b...gmail.comwrote in message
news:1161878064.614969.80020...m73g2000cwd.googlegro ups.com...
Quote:
Originally Posted by
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.
>
Quote:
Originally Posted by
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)

jay | Thu, 03 Jan 2008 17:27:00 GMT |

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

Jay wrote:

Quote:
Originally Posted by
Mr. Voigt,
I am going to be identifying the particular app by .exe name,
which I can find, in turn, the Process ID.
>
-Jay
>
Ben Voigt wrote:
Quote:
Originally Posted by
"Jay" <patelj27b...gmail.comwrote in message
news:1161878064.614969.80020...m73g2000cwd.googlegro ups.com...
Quote:
Originally Posted by
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.

Quote:
Originally Posted by
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)
>

jay | Thu, 03 Jan 2008 17:28:00 GMT |

DotNet Visual C Hot Answers

DotNet Visual C New questions

DotNet Visual C Related Categories