3.1.4.2.2 Receiving an EfsRpcReadFileRaw Message (Opnum 1)
The method EfsRpcReadFileRaw is used by a client to obtain marshaled data for an encrypted object from the server.
-
long EfsRpcReadFileRaw( [in] PEXIMPORT_CONTEXT_HANDLE hContext, [out] EFS_EXIM_PIPE* EfsOutPipe );
hContext: A context handle returned by the EfsRpcOpenFileRaw method, which MUST have been called without the CREATE_FOR_IMPORT flag.
EfsOutPipe: A pipe structure. The push procedure of this pipe will be called with the marshaled data. The structure of this marshaled data is specified in section 2.2.3.
Return Values: The server MUST return 0 if it successfully processes the message received from the client.
If called with a context handle that has not been obtained by calling the EfsRpcOpenFileRaw method without the CREATE_FOR_IMPORT flag set, the server SHOULD throw an RPC exception.
The server MUST read data from the object and write it to the pipe in EFSRPC Raw Data Format until all the data in the object has been written. When all the data in the object has been written, the server MUST flush the pipe by performing a 0-byte write to the pipe, and return 0 to the user to indicate success.
If an error is encountered during the read, the server MUST flush the pipe and SHOULD throw an RPC exception. The pipe MUST be flushed by performing a 0-byte write to the pipe.