CCscSearchApiInterface::OfflineFilesOpenIndexingHandle method

Opens an indexing handle to a file in the Offline Files client side cache (CSC).

Syntax


DWORD OfflineFilesOpenIndexingHandle(
  [out]          PHANDLE Handle,
  [in]           PCWSTR  FileName,
  [in]           DWORD   DesiredAccess,
  [in]           DWORD   ShareMode,
  [in, optional] PBOOL   IsDirectoryOrFile
);

Parameters

Handle [out]

Type: PHANDLE

When this method returns successfully, receives a pointer to a handle to the file specified by FileName.

FileName [in]

Type: PCWSTR

Pointer to a buffer that contains the UNC path to a file in the CSC.

DesiredAccess [in]

Type: DWORD

A read-only access mask that describes the desired file access level. For more information, see File Security and Access Rights.

ShareMode [in]

Type: DWORD

A file-sharing mode for the returned handle; this parameter must specify a readable sharing mode. For more information, see the dwShareMode parameter description for the CreateFile function.

IsDirectoryOrFile [in, optional]

Type: PBOOL

Pointer to TRUE if the target must be a directory; FALSE if the target must be a file.

Return value

Type: DWORD

A standard system error code.

Remarks

The CCscSearchApiInterface::OfflineFilesOpenIndexingHandle function operates only on UNC paths.

This function fails if the file is not in the offline files cache. When such a failure occurs, CCscSearchApiInterface::OfflineFilesOpenIndexingHandle might briefly open the file. For example, this could happen if the path refers to a UNC source that is not included in the offline files cache, or if Offline Files is disabled.

The handle pointed to by Handle becomes orphaned if another user on the client machine opens the file. If the handle is orphaned, operations on the handle return either ERROR_INVALID_HANDLE or ERROR_UNEXP_NET_ERR.

Requirements

Minimum supported client

Windows Vista, Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Cscsearchapiif.hxx

See also

CCscSearchApiInterface
CscSearchApiGetInterface

 

 

Show: