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
GetNamedSecurityInfo
..msdn    Add comment     W32 Constants      Translate this page
The GetNamedSecurityInfo function retrieves a copy of the security descriptor for an object specified by name.
Code examples:
GetFileOwner - Get the owner of an NTFS file
Declaration:
DWORD GetNamedSecurityInfo(
  LPTSTR pObjectName,
  SE_OBJECT_TYPE ObjectType,
  SECURITY_INFORMATION SecurityInfo,
  PSID* ppsidOwner,
  PSID* ppsidGroup,
  PACL* ppDacl,
  PACL* ppSacl,
  PSECURITY_DESCRIPTOR* ppSecurityDescriptor
);

FoxPro declaration:
DECLARE INTEGER GetNamedSecurityInfo IN advapi32;
    STRING    pObjectName,;
    INTEGER   ObjectType,;
    INTEGER   SecurityInfo,;
    INTEGER   ppsidOwner,;
    INTEGER   ppsidGroup,;
    INTEGER   ppDacl,;
    INTEGER   ppSacl,;
    INTEGER @ ppSecurityDescriptor

Parameters:
pObjectName
[in] Pointer to a null-terminated string that specifies the name of the object from which to retrieve security information.

ObjectType
[in] Specifies a value from the SE_OBJECT_TYPE enumeration that indicates the type of object named by the pObjectName parameter.

SecurityInfo
[in] A set of SECURITY_INFORMATION bit flags that indicate the type of security information to retrieve.

ppsidOwner
[out] Pointer to a variable that receives a pointer to the owner SID in the security descriptor returned in ppSecurityDescriptor.

ppsidGroup
[out] Pointer to a variable that receives a pointer to the primary group SID in the returned security descriptor.

ppDacl
[out] Pointer to a variable that receives a pointer to the DACL in the returned security descriptor.

ppSacl
[out] Pointer to a variable that receives a pointer to the SACL in the returned security descriptor.

ppSecurityDescriptor
[out] Pointer to a variable that receives a pointer to the security descriptor of the object.
Return value:
If the function succeeds, the return value is ERROR_SUCCESS (0).
My comment:
When you have finished using the ppSecurityDescriptor pointer, free the returned buffer by calling the LocalFree function.

If the ppsidOwner, ppsidGroup, ppDacl, and ppSacl parameters are non-NULL, and the SecurityInfo parameter specifies that they be retrieved from the object, those parameters will point to the corresponding parameters in the security descriptor returned in ppSecurityDescriptor.
Word Index links for the GetNamedSecurityInfo :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-11-28 13:15:09
Modified: 2004-11-28 13:19:49
Visited in last 7 days: 16
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.161.73.123)
7 sec.Function: 'EnumServicesStatus'
13 sec.Function: 'GetIpStatistics'
20 sec.Function: 'CeDeleteFile'
26 sec.Function: 'GdipGetImagePaletteSize'
34 sec.Function: 'GetKeyboardLayout'
40 sec.Function: 'GetBoundsRect'
46 sec.Function: 'CLSIDFromString'
53 sec.Function: 'CeRegSetValueEx'
59 sec.Function: 'EnumDisplayDevices'
1.08 min.
Function group: 'MSHTML Reference'
Google
Advertise here!