IpcfReadFile function

Reads protected content of a protected file given a logical file range. This operation requires that the current user has at least the VIEW right for the content.

Syntax

EXTERN_C HRESULT WINAPI IpcfReadFile(
  _In_    IPCF_FILE_HANDLE  hFile,
  _In_    PCIPCF_FILE_RANGE pDataRange,
  _In_    PBYTE             pvBuffer,
  _Inout_ DWORD64           *cbBufferSize
);

Parameters

hFile [in]

Handle to the protected file.

This needs to be obtained from the function IpcfOpenFileOnILockBytes or IpcfOpenFileOnHandle. .

pDataRange [in]

Pointer to IPCF_FILE_RANGE structure indicating the data range to read.

pvBuffer [in]

Buffer to which the decrypted data will be returned.

cbBufferSize [in, out]

Pointer to size of pvBuffer in bytes.

On return, this contains the actual number of bytes copied into pvBuffer.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcfile.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll