RsopSetPolicySettingStatus function

The RSoPSetPolicySettingStatus function creates an instance of RSOP_PolicySettingStatus and an instance of RSOP_PolicySettingLink. The function links (associates) RSOP_PolicySettingStatus to its RSOP_PolicySetting instance.

Syntax

USERENVAPI HRESULT RsopSetPolicySettingStatus(
  DWORD                   dwFlags,
  IWbemServices           *pServices,
  IWbemClassObject        *pSettingInstance,
  DWORD                   nInfo,
  POLICYSETTINGSTATUSINFO *pStatus
);

Parameters

dwFlags

This parameter is currently unused.

pServices

Specifies a WMI services pointer to the RSoP namespace to which the policy data is to be written. This parameter is required.

pSettingInstance

Pointer to an instance of RSOP_PolicySetting containing the policy setting. This parameter is required and can point to the instance's children.

nInfo

Specifies the number of elements in the pStatus array.

pStatus

Pointer to an array of POLICYSETTINGSTATUSINFO structures.

Return Value

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

Remarks

To unlink an RSOP_PolicySettingStatus instance from its RSOP_PolicySetting instance, you can call the RSoPResetPolicySettingStatus function.

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header userenv.h
Library Userenv.lib
DLL Userenv.dll

See Also

Group Policy Functions

Group Policy Overview

IWbemClassObject

IWbemServices

RSoPResetPolicySettingStatus