RefreshPolicy function (userenv.h)

The RefreshPolicy function causes policy to be applied immediately on the client computer. To apply policy and specify the type of refresh that should occur, you can call the extended function RefreshPolicyEx.

Syntax

USERENVAPI BOOL RefreshPolicy(
  [in] BOOL bMachine
);

Parameters

[in] bMachine

Specifies whether to refresh the computer policy or user policy. If this value is TRUE, the system refreshes the computer policy. If this value is FALSE, the system refreshes the user policy.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

By default, policy is reapplied every 90 minutes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header userenv.h
Library Userenv.lib
DLL Userenv.dll

See also

Group Policy Functions

Group Policy Overview

ProcessGroupPolicy