GetAppliedGPOList and pGuidExtension value

426 views Asked by At

I'm trying to use the GetAppliedGPOList function, but cannot find/understand what the pGuidExtension should be.

Here's the simple code so far:

#include <Windows.h>
#include <UserEnv.h>

int wmain(int argc, WCHAR *argv[])
{
    //GetAppliedGPOList
    DWORD flags = GPO_LIST_FLAG_MACHINE;
    LPCWSTR machineName = NULL; //Local computer is used
    PSID sidUser = NULL;

    GUID *pGuidExtension;   //What is the GUID of the extension?

    PGROUP_POLICY_OBJECT *ppGPOList;


    return 0;
}

Cannot run the function because I need to send that value.

Any example about the pGuidExtension value?

I did search here but found nothing about it.

Thank you.

1

There are 1 answers

0
Anton Shchyrov On

The guids is listed at

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions

For example - Group Policy Client Side Extension List. The GetAppliedGPOList is looked under

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History\{GuidExtension}

key