<div class="content"><p>The RdcGetSignatures method is used to obtain a file&#39;s <a href="81169399-de63-4f92-8da0-91bd31e3c24c#gt_a0d8116e-63f3-418b-afea-ca6258840e92" data-linktype="relative-path">RDC</a> signature data from the
server.</p><dl>
<dd>
<div><pre> DWORD RdcGetSignatures(
   [in] PFRS_SERVER_CONTEXT serverContext,
   [in, range(1, CONFIG_RDC_MAX_LEVELS)] 
     byte level,
   [in] DWORDLONG offset,
   [out, size_is(length), length_is(*sizeRead)] 
     byte* buffer,
   [in, range(1, CONFIG_RDC_MAX_NEEDLENGTH)] 
     DWORD length,
   [out] DWORD* sizeRead
 );
</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 <a href="908b4cc2-9915-4e31-84b8-f6b3e09b7c03" data-linktype="relative-path">InitializeFileTransferAsync</a>
method in which the client set the <i>rdcDesired</i> parameter to TRUE.</p><p><b>level: </b>The RDC recursion level being
requested. A client MUST specify a number in the range of 1 to x, where x is
the value of the <b>rdcSignatureLevels</b> field of the <b>rdcInfo</b>
structure that was returned by the InitializeFileTransferAsync method call
associated with the specified server context.</p><p><b>offset: </b>The zero-based offset, in bytes, at
which to retrieve data from the file.</p><p><b>buffer: </b>The file signature data received from
the server.</p><p><b>length: </b>The size, in bytes, of <i>buffer</i>.</p><p><b>sizeRead: </b>The size, in bytes, of the file data
returned in <i>buffer</i>.</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>
  <p>0x00000000</p>
  <p>ERROR_SUCCESS</p>
  </td>
  <td>
  <p>The method completed successfully.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>The context is invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00002344</p>
  <p>FRS_ERROR_CONTENTSET_NOT_FOUND</p>
  </td>
  <td>
  <p>The content set was not found.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x0000234B</p>
  <p>FRS_ERROR_RDC_GENERIC</p>
  </td>
  <td>
  <p>Unknown error in RDC.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown
beyond those thrown by the underlying RPC protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p><p>This method uses the Remote Differential Compression
Algorithm, as specified in <a href="../ms-rdc/5b027295-0b63-45b9-8f62-0e49448350d9" data-linktype="relative-path">[MS-RDC]</a>,
when replicating a changed file.</p><p><b>Validating the signature request:</b> The server MUST
validate the signature request by performing the following checks. </p><ul><li><p><span><span> 
</span></span>If the specified server context was not retrieved by a previously
successful call to the InitializeFileTransferAsync method, then the server MUST
fail the call with the ERROR_INVALID_PARAMETER failure value.</p>
</li><li><p><span><span> 
</span></span>If the server has already completed transferring the file
associated with the server context, the server MUST fail the call with an
implementation-defined failure value.</p>
</li><li><p><span><span> 
</span></span>If the specified server context was retrieved via a call to the
InitializeFileTransferAsync method in which the client set the <i>rdcDesired</i>
parameter to FALSE, then the server MUST fail the call with an
implementation-defined failure value.</p>
</li><li><p><span><span> 
</span></span>If the specified server context was retrieved via a call to the
InitializeFileTransferAsync method in which the server set the <b>rdcSignatureLevels</b>
field to zero in the <i>rdcFileInfo</i> output parameter (see section <a href="7e65da8c-67d7-4235-b019-c630c8ec5711" data-linktype="relative-path">2.2.1.4.11</a>), then the
server MUST fail the call with an implementation-defined failure value.</p>
</li><li><p><span><span> 
</span></span>If the server is not currently participating in the replication
of the <a href="81169399-de63-4f92-8da0-91bd31e3c24c#gt_064adaf1-86c7-43e5-a157-b0949980181e" data-linktype="relative-path">replicated folder</a>
that is associated with the specified server context, then the server MUST fail
the call with the FRS_ERROR_CONTENTSET_NOT_FOUND failure value.</p>
</li><li><p><span><span> 
</span></span>If the value of the <i>level</i> parameter is not in the range 1
to x, where x is the value of the <b>rdcSignatureLevels</b> field of the <i>rdcFileInfo</i>
output parameter (see section 2.2.1.4.11) that was returned by the
InitializeFileTransferAsync method call associated with the specified server
context, then the server MUST fail the call with an implementation-defined
failure value.</p>
</li><li><p><span><span> 
</span></span>If offset is beyond the end of the file then the server MUST fail
the call with an implementation-defined failure value.</p>
</li></ul><p><b>Actions Triggered: </b>Upon successfully validating the
signature request, the server returns a buffer of RDC signature information for
the specified level and the specified file. The server MUST return as many
bytes as requested, except when the end of file is reached. In this case, the
server MUST return as many bytes as remain in the file from the specified
offset, which can be zero bytes.</p><p><b>Remarks: </b>The server MUST allow the client to read
randomly from all available signature streams.</p><p>The format of the signature data is as specified in
[MS-RDC].</p></div>