IOfflineFilesCache::IsPathCacheable method (cscobj.h)

Determines whether a specified UNC path is in the Offline Files cache.

Syntax

HRESULT IsPathCacheable(
  [in]  LPCWSTR                   pszPath,
  [out] BOOL                      *pbCacheable,
  [out] OFFLINEFILES_CACHING_MODE *pShareCachingMode
);

Parameters

[in] pszPath

The UNC path of the item.

[out] pbCacheable

Receives TRUE if the item is in the Offline Files cache, FALSE if not.

[out] pShareCachingMode

Receives one of the following OFFLINEFILES_CACHING_MODE enumeration values indicating the caching configuration of the applicable network shared folder under which the specified item exists.

OFFLINEFILES_CACHING_MODE_NONE (0)

No caching mode value was found. This value is used when the item is not cacheable or an error has occurred.

OFFLINEFILES_CACHING_MODE_NOCACHING (1)

The shared folder is configured to disallow caching.

OFFLINEFILES_CACHING_MODE_MANUAL (2)

The shared folder is configured to allow manual caching.

OFFLINEFILES_CACHING_MODE_AUTO_DOC (3)

The shared folder is configured to allow automatic caching of documents.

OFFLINEFILES_CACHING_MODE_AUTO_PROGANDDOC (4)

The shared folder is configured to allow automatic caching of programs and documents.

Return value

Returns S_OK if successful, or an error value otherwise.

Remarks

The caching mode value returned is equivalent to the CSC_MASK value associated with SHARE_INFO_1005 returned by NetShareGetInfo. The value mapping is as follows:

OFFLINEFILES_CACHING_MODE Value SHARE_INFO_1005 Value
OFFLINEFILES_CACHING_MODE_NOCACHING 0
OFFLINEFILES_CACHING_MODE_MANUAL CSC_CACHE_MANUAL_REINT
OFFLINEFILES_CACHING_MODE_AUTO_DOC CSC_CACHE_AUTO_REINT
OFFLINEFILES_CACHING_MODE_AUTO_PROGANDDOC CSC_CACHE_VDO
 

These settings are configured as attributes of the shared folder on the server by clicking the Caching button on the shared folder's Sharing property page or by using the net share /cache command.

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

IOfflineFilesShareInfo::GetShareCachingMode

OFFLINEFILES_CACHING_MODE