IOfflineFilesSetting::GetPreference method (cscobj.h)

Retrieves a per-machine or per-user preference associated with a particular Offline Files setting.

Syntax

HRESULT GetPreference(
  [out] VARIANT *pvarValue,
  [in]  DWORD   dwScope
);

Parameters

[out] pvarValue

If the preference supports one or more values, the returned VARIANT object contains those values. If the preference does not support values, the type of the returned VARIANT is VT_EMPTY.

The method initializes the VARIANT prior to storing the preference value in it.

[in] dwScope

Indicates which preference is to be retrieved. Must be one of the following.

OFFLINEFILES_SETTING_SCOPE_USER (0x00000001)

The per-user preference is to be retrieved.

OFFLINEFILES_SETTING_SCOPE_COMPUTER (0x00000002)

The per-machine preference is to be retrieved.

Return value

S_OK if the preference query is successful or an error value otherwise.

Returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) if the preference is currently not applied.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header cscobj.h
DLL CscSvc.dll; CscObj.dll

See also

IOfflineFilesSetting