<div class="content" name="RawGetFileDataAsync" uuid="dbd8ab7d-a8ad-498a-bf07-13277b064db0"><p>The RawGetFileDataAsync method is used instead of calling <a href="5a3d7236-a35b-4e90-8f42-3773ea28220a" data-linktype="relative-path">RawGetFileData</a> multiple
times to obtain file data. As specified in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>,
the specification for asynchronous <a href="81169399-de63-4f92-8da0-91bd31e3c24c#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>, an RPC client pulls
file data from the byte pipe until receiving an end-of-file notification from
the pipe.</p><dl>
<dd>
<div><pre> DWORD RawGetFileDataAsync(
   [in] PFRS_SERVER_CONTEXT serverContext,
   [out] BYTE_PIPE* bytePipe
 );
</pre></div>
</dd></dl><p><b>serverContext: </b>The context handle that
represents the requested file replication operation. The client MUST specify a
server context that was retrieved by a previously successful call to the <a href="908b4cc2-9915-4e31-84b8-f6b3e09b7c03" data-linktype="relative-path">InitializeFileTransferAsync</a>
method.</p><p><b>bytePipe: </b>The asynchronous RPC byte pipe that
contains returned file data.</p><p><b>Return Values: </b>This method MUST return 0 on
success or a nonzero error code on failure. For protocol purposes all nonzero
values MUST be treated as equivalent failures unless otherwise specified.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 ERROR_SUCCESS</td>
  <td>The method completed successfully.</td>
 </tr><tr>
  <td>0x00000057 ERROR_INVALID_PARAMETER</td>
  <td>The context is invalid.</td>
 </tr><tr>
  <td>0x00002344 FRS_ERROR_CONTENTSET_NOT_FOUND</td>
  <td>The content set was not found.</td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown beyond
those thrown by the underlying RPC protocol [MS-RPCE].</p><p><b>Validating the file transfer request:</b> The server MUST
validate the file transfer request by performing the same checks as the
RawGetFileData method, except for the checks related to input parameters that
exist in the RawGetFileData method, but not in the RawGetFileDataAsync method. </p><p><b>Actions Triggered:</b> Upon successfully receiving the
file transfer request, the server retrieves the entire file&#39;s marshaled data.</p><p><b>Remarks: </b>The data stream returned by
RawGetFileDataAsync is identical to the format of the data received by a single
call to RawGetFileData if RawGetFileData is passed a buffer large enough to
hold all the data returned by the pipe.</p></div>