Retrieves a policy associated with a particular Offline Files setting.
HRESULT GetPolicy( VARIANT *pvarValue, DWORD dwScope );
If the policy supports one or more values, the returned VARIANT object contains those values. If the policy does not support values, the type of the returned VARIANT is VT_EMPTY.
The method initializes the VARIANT prior to storing the policy value in it.
Indicates which policy is to be retrieved. Must be one of the following.
The per-user policy is to be retrieved.
The per-machine policy is to be retrieved.
S_OK if the policy is read successfully or an error value otherwise.
HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) if the setting does not support the requested policy.
HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) if the requested policy is not currently applied.
It is important to note that policy cannot be set through the Offline Files API. Policy can be set only through the Group Policy mechanism. The Offline Files API only supports querying policy values.
|Windows version||Windows Vista Windows Server 2008|