1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Hook windows logon/logoff events

Discussion in 'Win32' started by alee, Jan 14, 2009.

  1. alee

    alee New Member

    Joined:
    Jan 14, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I am having a service which would be running at SYSTEM level. Now, i want to track the logged on user in it. Earlier i was trying to get the logged in user name from GetUserName api but in my case it returns "SYSTEM" every time.



    Is there anyway to get logged on username in my case? or is there any hook that i can install so that i may get which user logged on?


    P.S: I am mainly working in Delphi 2007 but these question are win32 (native api) specific thats why posting in this sectrion
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    What if multiple users are logged on at the same time?
     
  3. alee

    alee New Member

    Joined:
    Jan 14, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I am only concerned with the "interactive users" i.e the person who is sitting infront of the system and using the physical keyboard/mouse attached to that particular system.

    Actually, the application targeted users are those who are running computer in local network, so there are almost zero chances that there will be any "remote" user logged on to that particular system.
     

Share This Page