Re: How to find out the "current" user ?

From: Stefan Kuhr (kustt110_at_gmx.li)
Date: 06/21/05


Date: Tue, 21 Jun 2005 15:49:56 +0200

Hello Polaris,

Polaris wrote:
> Hi:
> I have a question on how to determine the "Currently" logged on user in
> Win-XP). I can use NetWkstaUserEnum() to get a list of logged on users, but
> how to determine which user is the one who currently own the active desktop
> ?
>
> And one more, even after log off the machine, some times, an account
> (domain\user) is still got returned by the NetWkstaUserEnum, why is that?
>
>
>
> Thanks in advance!
>
> Polaris
>
>

Maybe this article of mine (shameless plug, duh!) is of some help for you:

http://www.codeproject.com/system/logonsessions.asp

(and maybe someone else dares to read this and tells me what might be
wrong with it :-) )

HTH,

-- 
Stefan Kuhr
"Lesen schadet der Dummheit"


Relevant Pages

  • How to find out the "current" user ?
    ... Win-XP). ... And one more, even after log off the machine, some times, an account ... is still got returned by the NetWkstaUserEnum, ... Polaris ...
    (microsoft.public.platformsdk.security)
  • Re: How to find out the "current" user ?
    ... AliR. ... > Win-XP). ... I can use NetWkstaUserEnum() to get a list of logged on users, ...
    (microsoft.public.platformsdk.security)