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:
Creating a folder
GetFileOwner - Get the owner of an NTFS file
Reading security permissions for NTFS files and folders
GetFileSecurity
..msdn    Add comment     W32 Constants      Translate this page
The GetFileSecurity function obtains specified information about the security of a file or directory.
Code examples:
Reading security permissions for NTFS files and folders
GetFileOwner - Get the owner of an NTFS file
Creating a folder
Declaration:
BOOL GetFileSecurity(
  LPCTSTR lpFileName,
  SECURITY_INFORMATION RequestedInformation,
  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  DWORD nLength,
  LPDWORD lpnLengthNeeded
);
FoxPro declaration:
DECLARE INTEGER GetFileSecurity IN advapi32;
    STRING    lpFileName,;
    INTEGER   RequestedInformation,;
    STRING  @ pSecurityDescriptor,;
    INTEGER   nLength,;
    INTEGER @ lpnLengthNeeded

Parameters:
lpFileName
[in] Pointer to a null-terminated string that specifies the file or directory for which security information is retrieved.

pSecurityDescriptor
[out] Pointer to a buffer that receives a copy of the security descriptor of the object specified by the lpFileName parameter.

nLength
[in] Specifies the size, in bytes, of the buffer pointed to by the pSecurityDescriptor parameter.

lpnLengthNeeded
[out] Pointer to the variable that receives the number of bytes necessary to store the complete security descriptor.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
If the function fails, the return value is zero. To get extended error information, call GetLastError.

The GetNamedSecurityInfo function provides functionality similar to GetFileSecurity for files as well as other types of objects.
Word Index links for the GetFileSecurity :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-02-25 21:20:12
Modified: 2004-11-28 12:27:31
Visited in last 7 days: 32
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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.178.153)
19 sec.Function: 'GetClassInfo'
43 sec.Function: 'SCardDisconnect'
1.08 min.Function: 'GetNativeSystemInfo'
1.55 min.Function: 'EndUpdateResource'
2.53 min.Function: 'RegisterHotKey'
4 day(s)Function: 'SQLAllocEnv'
 Function: 'GetCurrentProcessId'
 Function: 'IsWindowVisible'
 Function: 'midiOutGetNumDevs'
 Function: 'FindWindow'
Google
Advertise here!