Platform SDK: Group Policy |
The GetAppliedGPOList function retrieves the list of GPOs applied for the specified user or computer.
BOOL GetAppliedGPOList( DWORD dwFlags, LPCTSTR pMachineName, PSID pSidUser, GUID *pGuidExtension, PGROUP_POLICY_OBJECT *ppGPOList );
Value | Meaning |
---|---|
GPO_LIST_FLAG_MACHINE | Retrieves only computer policy information. |
If this value is not specified, the function retrieves only user policy information.
If pMachineName is NULL and pSidUser is NULL, the user is the currently logged-on user. If pMachineName is NULL and pSidUser is not NULL, the user is represented by pSidUser on the local computer.
If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function returns a Win32 error code. For a complete list of error codes, see Error Codes or the header file WinError.h.
To free the list when you have finished processing it, call the FreeGPOList function.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Userenv.h.
Library: Use Userenv.lib.
Group Policy Overview, Group Policy Functions, FreeGPOList, GROUP_POLICY_OBJECT