 |
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: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-02-25 21:20:12 | | Modified: | 2004-11-28 12:27:31 | Visited in last 7 days: 29 |