CPrivateObjectSecurityDesc::Create
Call this method to allocate and initialize a self-relative security descriptor for the private object created by the calling resource manager.
bool Create(
const CSecurityDesc* pParent,
const CSecurityDesc* pCreator,
bool bIsDirectoryObject,
const CAccessToken& Token,
PGENERIC_MAPPING GenericMapping
) throw( );
bool Create(
const CSecurityDesc* pParent,
const CSecurityDesc* pCreator,
GUID* ObjectType,
bool bIsContainerObject,
ULONG AutoInheritFlags,
const CAccessToken& Token,
PGENERIC_MAPPING GenericMapping
) throw( );
Parameters
pParent
Pointer to a CSecurityDesc object referencing the parent directory in which a new object is being created. Set to NULL if there is no parent directory.pCreator
Pointer to a security descriptor provided by the creator of the object. If the object's creator does not explicitly pass security information for the new object, set this parameter to NULL.bIsDirectoryObject
Specifies whether the new object can contain other objects. A value of true indicates that the new object is a container. A value of false indicates that the new object is not a container.Token
Reference to the CAccessToken object for the client process on whose behalf the object is being created.GenericMapping
Pointer to a GENERIC_MAPPING structure that specifies the mapping from each generic right to specific rights for the object.ObjectType
Pointer to a GUID structure that identifies the type of object associated with the current object. Set ObjectType to NULL if the object does not have a GUID.bIsContainerObject
Specifies whether the new object can contain other objects. A value of true indicates that the new object is a container. A value of false indicates that the new object is not a container.AutoInheritFlags
A set of bit flags that control how access-control entries (ACEs) are inherited from pParent. See CreatePrivateObjectSecurityEx for more details.
Return Value
Returns true on success, false on failure.
Remarks
This method calls CreatePrivateObjectSercurity or CreatePrivateObjectSecurityEx.
The second method, which permits specifying the object type GUID of the new object or controlling how ACEs are inherited, is only available on systems running Windows 2000 and later.
备注
A self-relative security descriptor is a security descriptor that stores all of its security information in a contiguous block of memory.
Requirements
Header: atlsecurity.h