3.7.4.1.33 RpcConnectCallback (Opnum 66)

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 Remote Desktop Protocol (RDP) connection sequence. More information on Remote Desktop Protocol can be found in [MS-RDPBCGR]. 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.<210>

 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
 );

hServer: Handle to the server object. This is of type SERVER_HANDLE. The hServer argument MUST be obtained from a previous call to RpcWinStationOpenServer.

pResult:  Failure error code if the call to RpcConnectCallback failed. If the call was successful, this parameter MUST be STATUS_SUCCESS (0x00000000).

Value

Meaning

STATUS_SUCCESS

0x00000000

The call was successful.

STATUS_NOT_SUPPORTED

0xC00000BB

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].

STATUS_INVALID_PARAMETER

0xC000000D

AddressSize is not TDI_ADDRESS_LENGTH_IP. For more information, see [MSDN-TDIADDRESS].

STATUS_ACCESS_DENIED

0xC0000022

The caller is not SYSTEM.

TimeOut: Not used.

AddressType:  MUST be TDI_ADDRESS_TYPE_IP. For more information, see [MSDN-TDIADDRESS].

pAddress:  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].

AddressSize:  MUST be TDI_ADDRESS_LENGTH_IP. This is a standard representation for the length of an IP address. For more information, see [MSDN-TDIADDRESS].

Return Values:  Returns TRUE if the call succeeded, and FALSE if the method failed. On failure, pResult indicates the failure status code.

Return value/code

Description

0x01

TRUE

Successful completion.

0x00

FALSE

Method call failed.