IOfflineFilesShareInfo::GetShareCachingMode method (cscobj.h)

Retrieves the caching mode configuration of the closest ancestor share to the item.

Syntax

HRESULT GetShareCachingMode(
  [out] OFFLINEFILES_CACHING_MODE *pCachingMode
);

Parameters

[out] pCachingMode

Receives a value from the OFFLINEFILES_CACHING_MODE enumeration that indicates the caching mode.

The following values can be returned:

OFFLINEFILES_CACHING_MODE_NONE (0)

No caching mode value was found. This value can be returned if the method fails.

OFFLINEFILES_CACHING_MODE_NOCACHING (1)

The share is configured to disallow caching. This value corresponds to a value of zero returned by the NetShareGetInfo function for the CSC_MASK portion of the SHARE_INFO_1005 structure.

OFFLINEFILES_CACHING_MODE_MANUAL (2)

The share is configured to allow manual caching. This value corresponds to a value of CSC_CACHE_MANUAL_REINT returned by the NetShareGetInfo function for the CSC_MASK portion of the SHARE_INFO_1005 structure.

OFFLINEFILES_CACHING_MODE_AUTO_DOC (3)

The share is configured to allow automatic caching of documents. This value corresponds to a value of CSC_CACHE_AUTO_REINT returned by the NetShareGetInfo function for the CSC_MASK portion of the SHARE_INFO_1005 structure.

OFFLINEFILES_CACHING_MODE_AUTO_PROGANDDOC (4)

The share is configured to allow automatic caching of programs and documents. This value corresponds to a value of CSC_CACHE_VDO (virtual disconnected operations) returned by the NetShareGetInfo function for the CSC_MASK portion of the SHARE_INFO_1005 structure.

Return value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method is equivalent to locating the nearest share item, obtaining its fully qualified UNC path and calling NetShareGetInfo for SHARE_INFO_1005 information.

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

IOfflineFilesCache::IsPathCacheable

IOfflineFilesShareInfo