Platform SDK: Group Policy

RefreshPolicy

The RefreshPolicy function causes policy to be applied immediately on the computer.

BOOL RefreshPolicy(
  BOOL bMachine
);

Parameters

bMachine
[in] 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 Values

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 8 hours.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Userenv.h.
  Library: Use Userenv.lib.

See Also

Group Policy Overview, Group Policy Functions, ProcessGroupPolicyProc