Determines whether a file or folder is available for offline use. This function also determines whether the file would be opened from the network, from the local Offline Files cache, or from both locations.
SHSTDAPI SHIsFileAvailableOffline( PCWSTR pwszPath, DWORD *pdwStatus );
A pointer to a string value that specifies the full path to a network file or directory. This path does not need to be in UNC form. If pszPath is not a network path, the function returns E_INVALIDARG.
A pointer to a variable of type DWORD that receives one or more of the following flags if the function succeeds.
If the file is open, it is open in the cache.
If the file is open, it is open on the server.
The local copy is currently incomplete. The file cannot be opened in offline mode until it has been synchronized.
This function can return one of these values.
||The file or directory is cached. It is available offline unless OFFLINE_STATUS_INCOMPLETE is set.|
||The path is invalid or not a network path. The file or directory is not cached.|
||The file or directory is not cached.|
If pszPath is a directory, SHIsFileAvailableOffline will not return the OFFLINE_STATUS_INCOMPLETE flag.
If SHIsFileAvailableOffline returns both OFFLINE_STATUS_LOCAL and OFFLINE_STATUS_REMOTE, the file or directory is open in both places. This is common when the server is online.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|DLL||Shell32.dll (version 5.0 or later)|