词条 | SECURITY_ATTRIBUTES |
释义 | SECURITY_ATTRIBUTESThe SECURITY_ATTRIBUTES structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. This structure provides security settings for objects created by various functions, such as CreateFile, CreatePipe, CreateProcess, RegCreateKeyEx, or RegSaveKeyEx. typedef struct _SECURITY_ATTRIBUTES { DWORD nLength; //结构体大小,可用sizeof取得 LPVOID lpSecurityDescriptor; //安全描述符 BOOL bInheritHandle;//安全描述的对象能否被新创建的进程继承 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES; Members nLengthThe size, in bytes, of this structure. Set this value to the size of the SECURITY_ATTRIBUTES structure. lpSecurityDescriptorA pointer to a security descriptor for the object that controls the sharing of it. If NULL is specified for this member, the object is assigned the default security descriptor of the calling process. This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL). The default security descriptor is based on the default DACL of the access token belonging to the calling process. By default, the default DACL in the access token of a process allows access only to the user represented by the access token. If other users must access the object, you can either create a security descriptor with the appropriate access, or add ACEs to the DACL that grants access to a group of users. Windows Me/98/95: The lpSecurityDescriptor member of this structure is ignored. bInheritHandleA Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle. RequirementWindows NT/2000/XP: Included in Windows NT 3.1 and later. Header: Declared in Winbase.h; include Windows.h. 转:MSDN |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。