<div class="content" name="RpcConnectCallback" uuid="93794f61-e930-46f0-a2a6-3f84531546ea"><p>The RpcConnectCallback method initiates a TCP connection to
the specified IP address and waits for the party on the other end of the
connection to start the <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_17c795a6-68bf-46bf-8ea8-467c8df1a0b3" data-linktype="relative-path">Remote Desktop Protocol (RDP)</a></span>
connection sequence. More information on Remote Desktop Protocol can be found
in <span><a href="../ms-rdpbcgr/5073f4ed-1e93-45e1-b039-6e30c385867c" data-linktype="relative-path">[MS-RDPBCGR]</a></span>.
This method MUST be called by processes running as SYSTEM. Note that this
function assumes that the address being passed in is an IPv4 address. IPv6
addresses are not supported.<a id="Appendix_A_Target_212"></a><a aria-label="Product behavior note 212" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_212" data-linktype="relative-path">&lt;212&gt;</a></p><dl>
<dd>
<div><pre> BOOLEAN RpcConnectCallback(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in] DWORD TimeOut,
   [in] ULONG AddressType,
   [in, size_is(AddressSize)] PBYTE pAddress,
   [in, range(0, 0x1000 )] ULONG AddressSize
 );
</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>pResult: </b> Failure error code if the call to
RpcConnectCallback failed. If the call was successful, this parameter MUST be
STATUS_SUCCESS (0x00000000).</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>STATUS_SUCCESS 0x00000000</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>STATUS_NOT_SUPPORTED 0xC00000BB</td>
  <td>AddressType is not TDI_ADDRESS_TYPE_IP. This is a standard representation of a type for an IP address. For more information, see [MSDN-TDIADDRESS].</td>
 </tr><tr>
  <td>STATUS_INVALID_PARAMETER 0xC000000D</td>
  <td>AddressSize is not TDI_ADDRESS_LENGTH_IP. For more information, see [MSDN-TDIADDRESS].</td>
 </tr><tr>
  <td>STATUS_ACCESS_DENIED 0xC0000022</td>
  <td>The caller is not SYSTEM.</td>
 </tr></tbody></table>
</dd></dl><p><b>TimeOut: </b>Not used.</p><p><b>AddressType: </b> MUST be TDI_ADDRESS_TYPE_IP. For
more information, see [MSDN-TDIADDRESS]. </p><p><b>pAddress: </b> Pointer to the address itself. MUST
be TDI_ADDRESS_IP. This is a standard representation for an IP address. For
more information, see [MSDN-TDIADDRESS]. </p><p><b>AddressSize: </b> MUST be TDI_ADDRESS_LENGTH_IP.
This is a standard representation for the length of an IP address. For more
information, see [MSDN-TDIADDRESS]. </p><p><b>Return Values: </b> Returns TRUE if the call
succeeded, and FALSE if the method failed. On failure, pResult indicates the
failure status code.</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>