CTokenPrivileges オブジェクトから、特権名と属性フラグを取得します。
void GetNamesAndAttributes(
CNames * pNames,
CAttributes * pAttributes = NULL
) const throw(...);
パラメーター
pNames
CString オブジェクトの配列へのポインター。 CNames は、CAtlArray <CString> CNames として定義されている typedef です。pAttributes
DWORD オブジェクトの配列へのポインター。 このパラメーターが省略されるか NULL の場合、属性は取得されません。 CAttributes は、CAtlArray <DWORD> CAttributes として定義されている typedef です。
解説
このメソッドは、CTokenPrivileges オブジェクトに格納されているすべての特権を列挙し、その名前と属性フラグ (指定した場合) を配列オブジェクトに格納します。
このメソッドには、表示可能な名前ではなく、属性名を取得します。たとえば、属性名が SE_REMOTE_SHUTDOWN_NAME の場合は、システム名のです」SeRemoteShutdownPrivilege」表示可能な名前を取得するには、CTokenPrivileges::GetDisplayNames メソッドを使用します。
必要条件
**ヘッダー:**atlsecurity.h
参照
参照
CTokenPrivileges::GetDisplayNames
CTokenPrivileges::LookupPrivilege
CTokenPrivileges::GetLuidsAndAttributes