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:
GetFileOwner - Get the owner of an NTFS file
How to enumerate sessions and processes on a specified terminal server
Reading security permissions for NTFS files and folders
LookupAccountSid
..msdn    Add comment     W32 Constants      Translate this page
The LookupAccountSid function accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found.
Code examples:
Reading security permissions for NTFS files and folders
GetFileOwner - Get the owner of an NTFS file
How to enumerate sessions and processes on a specified terminal server
Declaration:
BOOL LookupAccountSid(
  LPCTSTR lpSystemName,
  PSID lpSid,
  LPTSTR lpName,
  LPDWORD cchName,
  LPTSTR lpReferencedDomainName,
  LPDWORD cchReferencedDomainName,
  PSID_NAME_USE peUse
);

FoxPro declaration:
DECLARE INTEGER LookupAccountSid IN advapi32;
    STRING  @ lpSystemName,;
    INTEGER   lpSid,;
    STRING  @ lpName,;
    INTEGER @ cchName,;
    STRING  @ lpRefdDomain,;
    INTEGER @ cchRefdDomain,;
    INTEGER @ peUse

Parameters:
lpSystemName
[in] Pointer to a null-terminated character string that specifies the target computer.

lpSid
[in] Pointer to the SID to look up.

lpName
[out] Pointer to a buffer that receives a null-terminated string that contains the account name that corresponds to the lpSid parameter.

cchName
[in, out] On input, specifies the size, in TCHARs, of the lpName buffer.

cchReferencedDomainName
[in, out] On input, specifies the size, in TCHARs, of the lpReferencedDomainName buffer.

peUse
[out] Pointer to a variable that indicates the type of the account.
Return value:
If the function succeeds, the function returns nonzero.
My comment:
If the function fails, it returns zero. To get extended error information, call GetLastError.
Word Index links for the LookupAccountSid :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-02-25 21:17:24
Modified: 2004-02-25 21:19:59
Visited in last 7 days: 36
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.166.232.243)
16 sec.Function: 'SwitchToThisWindow'
33 sec.
Function group: 'Window Station and Desktop'
48 sec.Examples
1.08 min.Function: 'GdipGetImageEncoders'
1.32 min.Function: 'CreateFileTransacted'
1.58 min.Function: 'WTSOpenServer'
1.85 min.Function: 'NetConnectionEnum'
2.13 min.Function: 'GetDIBits'
2.45 min.Function: 'IsWindow'
2.8 min.Function: 'CeRegEnumKeyEx'
Google
Advertise here!