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

  • jay / 206 / Sun, 05 Apr 2009 05:58:00 GMT / 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:

    identify, desktop, app, running, dotnet, visual, .net

  • http://dotnet.itags.org/visual-c/71214/«« Last Thread - Next Thread »»
    1. "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 | Thurs, 03 Jan 2008 17:26:00 GMT |

    2. 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 | Thurs, 03 Jan 2008 17:27:00 GMT |

    3. 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 | Thurs, 03 Jan 2008 17:28:00 GMT |

  • DotNet Visual C Questions

    • error 2664 Conversion error

      HelloI am trying to convert the following?The Codestd::string* ChkName;GlobalInterfacePtr->MethodA(p...

      By karthik_t_gmail_com

    • Is this s bug?

      Hi AllI have one query, and need urgent help here. It is related with WindowsAddressBook(WAB). Suppo...

      By hbb

    • Is this string conversion code correct?

      Hi,I have written a method to convert a managed string to anunmanaged string in C++. However, I am j...

      By tommy

    • Can we correct entried typing name?

      I am working on a function that displays all related names when the userentering name. For now, I on...

      By anhtruong

    • question about new

      Hi all,MyClass Instance = NULL;Instance = new MyClass();and 'new' throws an exception.is the value o...

      By brunovandooren, 3 Comments

    • error 2664 Conversion error

      HelloI am trying to convert the following?The Codestd::string* ChkName;GlobalInterfacePtr->MethodA(p...

      By karthik_t_gmail_com, 6 Comments

    • Can We Read Text data From an EXE

      HII have an Exe file when it runs ,there are just two controls on thewindow.One is a ListBox and ano...

      By crimemaster, 3 Comments

    • Writing binary data in managed C++

      I have a managed C++ project that contains a simple structure:struct{<multiple members>} mydata;I...

      By petersteele, 2 Comments

    • Error 2 error C2872: IDataObject

      Error 2 error C2872: 'IDataObject' : ambiguous symbol C:\Archivos deprograma\Microsoft Visual Studio...

      By rick, 1 Comments