IOfflineFilesSetting::GetPreference method

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

Syntax

HRESULT GetPreference(
  VARIANT *pvarValue,
  DWORD   dwScope
);

Parameters

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.

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

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header cscobj.h
DLL CscSvc.dll; CscObj.dll

See Also

IOfflineFilesSetting