<div class="content" name="RpcWinStationGetMachinePolicy" uuid="cda4de46-ea1c-49ae-beb0-afd0f0be90f4"><p>The RpcWinStationGetMachinePolicy method returns a copy of
the <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_b416f72e-cf04-4d80-bf93-f5753f3b0998" data-linktype="relative-path">terminal
server</a></span> machine policy to the caller.<a id="Appendix_A_Target_210"></a><a aria-label="Product behavior note 210" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_210" data-linktype="relative-path">&lt;210&gt;</a> The
caller is not required to have any specific permission to call this method.</p><dl>
<dd>
<div><pre> BOOLEAN RpcWinStationGetMachinePolicy(
   [in] SERVER_HANDLE hServer,
   [in, out, size_is(bufferSize)] PBYTE pPolicy,
   [in, range(0, 0x8000 )] ULONG bufferSize
 );
</pre></div>
</dd></dl><p><b>hServer: </b>Handle to the server object. This is
of type <span><a href="49484cdf-2feb-4de9-a588-5d01cf8995dc" data-linktype="relative-path">SERVER_HANDLE</a></span>. The <i>hServer</i>
argument MUST be obtained from a previous call to <span><a href="fd6f339d-f5dd-452c-a9a9-ec753c22a36a" data-linktype="relative-path">RpcWinStationOpenServer</a></span>.</p><p><b>pPolicy: </b> Pointer to a buffer to receive the
machine policy. This buffer MUST be of type <span><a href="d7cb8c2d-f60e-42d6-b8f4-e617ad4d8c1b" data-linktype="relative-path">POLICY_TS_MACHINE</a></span>.</p><p><b>bufferSize: </b> Size of the buffer, in bytes,
pointed to by <i>pPolicy</i>. This size MUST NOT be less than
sizeof(POLICY_TS_MACHINE).</p><p><b>Return Values: </b> Returns TRUE if the call
succeeded, and FALSE if the method failed.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x01 TRUE</td>
  <td>Successful completion.</td>
 </tr><tr>
  <td>0x00 FALSE</td>
  <td>Method call failed.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>