Re: Retrieving Windows LoginId
- From: "Pete Delgado" <Peter.Delgado@xxxxxxxxxx>
- Date: Fri, 8 Aug 2008 12:35:58 -0400
"bharath_r" <bharath.0523@xxxxxxxxx> wrote in message
news:0b222dc4-b3d4-48f7-aede-6bd0d4509737@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I would like to know if i can get the windows login id of the user
currently logged in to the computer.
I am developing an MFC activex application. Currently i authenticate
the user by popping an authentication dialog asking for userid and
password. The userid, password is then passed to a ISAPI web which
authenticates the user by matching it with the database entries.
I would like to know if it is possible to use something like Windows
Authentication where the user doesn't have to enter his userid ,
password. The application takes the loginid (domain\username) of the
currently logged in user?
Any help is highly appretiated.
The most reliable manner in which to do this is to retrieve the security
credentials of the thread that accesses your ActiveX component.
Take a look at the following APIs in the Platform SDK:
GetSecurityInfo
LookupAccountSid
If you need an example, I can post one for you.
-Pete
.
- Follow-Ups:
- Re: Retrieving Windows LoginId
- From: bharath_r
- Re: Retrieving Windows LoginId
- References:
- Retrieving Windows LoginId
- From: bharath_r
- Retrieving Windows LoginId
- Prev by Date: Re: Displaying Japanese chars
- Next by Date: Re: Win32 DLL def file question
- Previous by thread: Re: Retrieving Windows LoginId
- Next by thread: Re: Retrieving Windows LoginId
- Index(es):
Relevant Pages
|