Re: Get handle of current logged on user?

From: Eric Perlin [MS] (ericperl_at_online.microsoft.com)
Date: 09/17/05

  • Next message: ulevanon_at_gmail.com: "Problems with signing a .dll for a browser add-on..."
    Date: Fri, 16 Sep 2005 19:23:39 -0700
    
    

    Specifiy SERVICE_ACCEPT_SESSIONCHANGE when calling SetServiceStatus.
    Your service control handler will receive "messages" containing the TS
    session id. You can use the TS API you mentioned earlier to get to the user
    token.

    If monitoring on an ongoing basis is not convenient (if your service is not
    auto-start for example), you can also catch up with the current state using
    WTSEnumerateSessions.

    -- 
    Eric Perlin [MS]
    This posting is provided "AS IS" with no warranties, and confers no rights.
    ---
    "Hieu Le Trung" <hieult@cybersoft-vn.com> wrote in message 
    news:OX9lVsyuFHA.3316@TK2MSFTNGP10.phx.gbl...
    > Yes right,
    > I have a Windows Service, and i want to know what user is logged in my 
    > system.
    > Any help?
    >
    > Hieu
    >
    > "chad" <ceothrow1@gmail.com> wrote in message 
    > news:1126903671.421324.274930@z14g2000cwz.googlegroups.com...
    >> What do you need to do with that handle? I take it you're program is
    >> running a s a service and you need to figure out who's logged into your
    >> system?
    >>
    >
    > 
    

  • Next message: ulevanon_at_gmail.com: "Problems with signing a .dll for a browser add-on..."
  • Quantcast