IGPEInformation::PolicyChanged method

The PolicyChanged method informs the Group Policy Object Editor that policy settings have changed.


HRESULT PolicyChanged(
  [in] BOOL bMachine,
  [in] BOOL bAdd,
  [in] GUID *pGuidExtension,
  [in] GUID *pGuidSnapin


bMachine [in]

Specifies whether computer or user policy has changed. If this value is TRUE, computer policy has changed. If this value is FALSE, user policy has changed.

bAdd [in]

Specifies whether this is an add or delete operation. If this parameter is FALSE, the last policy setting for the specified extension pGuidExtension is removed. In all other cases, this parameter is TRUE.

pGuidExtension [in]

Pointer to the GUID or unique name of the snap-in extension that will process policy. If the GPO is to be processed by the snap-in that processes .pol files, this parameter must specify the REGISTRY_EXTENSION_GUID value.

pGuidSnapin [in]

Pointer to the GUID or unique name of the snap-in extension making this method call.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in the Platform SDK header file WinError.h.


An extension must call this method every time it makes a change to a group policy object. Note that when you write an MMC snap-in you must implement the IComponentData interface and call the IComponentData::Notify method. To get the IGPEInformation interface, set the event parameter of the IComponentData::Notify method to be MMCN_EXPAND and the arg parameter to TRUE. You can then obtain the IGPEInformation interface by calling QueryInterface and by using the usual Rules for Implementing QueryInterface.

For example, you can obtain the interface by calling as follows.

lpDataObject->QueryInterface(IID_IGPEInformation, (LPVOID lpDataObject->*)&m_pGPTInformation);


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008






IID_IGPEInformation is defined as 8FC0B735-A0E1-11d1-A7D3-0000F87571E3

See also

Group Policy Overview
Group Policy Interfaces