<div class="content" name="EfsRpcReadFileRaw" uuid="a3a6d95f-ebd5-4a08-9d19-6b6c1b7d41f6"><p>The method EfsRpcReadFileRaw is used by a client to obtain
marshaled data for an encrypted object from the server.</p><dl>
<dd>
<div><pre> long EfsRpcReadFileRaw(
   [in] PEXIMPORT_CONTEXT_HANDLE hContext,
   [out] EFS_EXIM_PIPE* EfsOutPipe
 );
</pre></div>
</dd></dl><p><b>hContext: </b>A context handle returned by the <a href="ccc4fb75-1c86-41d7-bbc4-b278ec13bfb8" data-linktype="relative-path">EfsRpcOpenFileRaw</a> method,
which MUST have been called without the CREATE_FOR_IMPORT flag.</p><p><b>EfsOutPipe: </b>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 <a href="e67520ea-0cb6-4349-bbe5-427a644d9492" data-linktype="relative-path">2.2.3</a>.</p><p><b>Return Values: </b>The server MUST return 0 if it
successfully processes the message received from the client.</p><p>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.</p><p>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.</p><p>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.</p></div>