please dont rip this site Prev Next

LookupAccountName info  Overview  Group

The LookupAccountName function accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of the domain on which the account was found.

BOOL LookupAccountName(

    LPCTSTR lpSystemName,

// address of string for system name

    LPCTSTR lpAccountName,

// address of string for account name

    PSID Sid,

// address of security identifier

    LPDWORD cbSid,

// address of size of security identifier

    LPTSTR ReferencedDomainName,

// address of string for referenced domain

    LPDWORD cbReferencedDomainName,

// address of size of domain string

    PSID_NAME_USE peUse 

// address of SID-type indicator

   );

Parameters

lpSystemName
Points to a null-terminated string specifying the system. This string can be the name of a remote computer. If this string is NULL, the account name is looked up on the local system.
lpAccountName
Points to a null-terminated string specifying the account name.
Sid
Points to a buffer receiving the SID structure that corresponds to the account name pointed to by the lpAccountName parameter.
cbSid
Pointer to a DWORD variable. On input, this value specifies the size, in bytes, of the Sid buffer. If the function fails because the buffer is too small, this variable receives the required buffer size.
ReferencedDomainName
Points to a buffer receiving the name of the domain where the account name is found.
cbReferencedDomainName
Pointer to a DWORD variable. On input, this value specifies the size, in bytes (ANSI version) or characters (Unicode version), of the ReferencedDomainName buffer. If the function fails because the buffer is too small, this variable receives the required buffer size, including the terminating null character.
peUse
Points to a SID_NAME_USE enumerated type indicating the type of the account when the function returns.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The LookupAccountName function attempts to find a security identifier for the specified name by first checking a list of well-known SIDs. If the name does not correspond to a well-known SID, the function checks built-in and administratively defined local accounts. Next, the function checks the primary domain. If the name is not found there, trusted domains are checked.

See Also

EqualPrefixSid, GetUserName, LookupAccountSid 


file: /Techref/os/win/api/win32/func/src/f55_2.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/26 18:11,
TOP NEW HELP FIND: 
18.225.149.158:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f55_2.htm"> LookupAccountName</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .