Using Win32 functions in Visual FoxPro Image Gallery
Security
..msdn
ConvertSidToStringSid
GetAce
GetAclInformation
GetFileSecurity
GetLengthSid
GetNamedSecurityInfo
GetSecurityDescriptorDacl
GetSecurityDescriptorOwner
ImpersonateLoggedOnUser
IsValidSid
IsWellKnownSid
LogonUser
LookupAccountName
LookupAccountSid
LsaClose
LsaEnumerateLogonSessions
LsaFreeMemory
LsaFreeReturnBuffer
LsaGetLogonSessionData
LsaLookupSids
LsaOpenPolicy
RevertToSelf
Code examples:
Retrieving local computer and user names
LookupAccountName
..msdn    Add comment     W32 Constants      Translate this page
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.
Code examples:
Retrieving local computer and user names
Declaration:
BOOL LookupAccountName(
  LPCTSTR lpSystemName,
  LPCTSTR lpAccountName,
  PSID Sid,
  LPDWORD cbSid,
  LPTSTR ReferencedDomainName,
  LPDWORD cchReferencedDomainName,
  PSID_NAME_USE peUse
);
FoxPro declaration:
DECLARE INTEGER LookupAccountName IN advapi32;
    STRING lpSystemName,;
    STRING lpAccountName,;
    INTEGER Sid,;
    INTEGER @cbSid,;
    STRING @RefDomainName,;
    INTEGER @cchRefDomainName,;
    INTEGER @peUse
Parameters:
lpSystemName
[in] Pointer to a null-terminated character string that specifies the name of the system.

lpAccountName
[in] Pointer to a null-terminated string that specifies the account name.

Sid
[out] Pointer to a buffer that receives the SID structure that corresponds to the account name pointed to by the lpAccountName parameter.

cbSid
[in, out] Pointer to a variable. On input, this value specifies the size, in bytes, of the Sid buffer.

ReferencedDomainName
[out] Pointer to a buffer that receives the name of the domain where the account name is found.

cchReferencedDomainName
[in, out] Pointer to a variable. On input, this value specifies the size, in TCHARs, of the ReferencedDomainName buffer.

peUse
[out] Pointer to a SID_NAME_USE enumerated type that indicates the type of the account when the function returns.
Return value:
If the function succeeds, the function returns nonzero.
My comment:
This function attempts to find a SID 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.
Word Index links for the LookupAccountName :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-03-30 13:07:05
Modified: 2006-03-30 13:10:03
Visited in last 7 days: 30
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.145.16.43)
16 sec.Function: 'SQLGetEnvAttr'
30 sec.Function: 'FtpPutFile'
45 sec.Function: 'PathFindOnPath'
59 sec.Function: 'ConvertSidToStringSid'
Function group: 'Security'
1.22 min.Function: 'SQLGetFunctions'
1.47 min.Function: 'WSAEventSelect'
1.73 min.Function: 'GdipCreateStringFormat'
1.97 min.Function: 'UuidToString'
2.22 min.Function: 'HeapLock'
2.47 min.Function: 'SetBkMode'
Google
Advertise here!