IConnectionBrokerClient::GetTargetInfo method
Requests information about the target computer where the connection should be redirected. This method is used by the redirector to get redirection information for the incoming connection request.
Syntax
HRESULT GetTargetInfo(
[in] CB_CONNECTION_INFO *pConnectionInfo,
[in] DWORD Reserved,
[in] HANDLE hStatusEvent,
[out] CB_TARGET_INFO *pTargetInfo,
[out] DWORD *pResult,
[out] IConnectionBrokerRequest **ppCbReq
);
Parameters
-
pConnectionInfo [in]
-
The address of a CB_CONNECTION_INFO structure that contains information about the incoming connection request.
-
Reserved [in]
-
This parameter is reserved for future use and must be zero.
-
hStatusEvent [in]
-
The handle of an event that will get set whenever there is an update to the progress of the request. You are responsible for creating and closing this event.
-
pTargetInfo [out]
-
The address of a CB_TARGET_INFO structure that receives information about the target computer where the incoming connection should be redirected. Because this is an asynchronous method, this memory must remain available until the request is complete. For more information, see Remarks.
-
pResult [out]
-
The address of a DWORD variable that receives a result code. Because this is an asynchronous method, this memory must remain available until the request is complete. For more information, see Remarks.
This result code will be one of the following values.
-
0
-
Success.
-
0x0000400
-
The destination computer could not be found.
-
0x0000401
-
The destination computer is not available.
-
0x0000402
-
Error loading destination computer.
-
0x0000403
-
Error bringing destination computer online.
-
0x0000404
-
Error redirecting to destination computer.
-
0x0000405
-
Error waking virtual machine.
-
0x0000406
-
Error booting virtual machine.
-
0x0000407
-
Error finding the IP address of the virtual machine.
-
0x0000408
-
The session broker could not find any available computers in the pool.
-
0x0000409
-
The session broker canceled the connection.
-
0x0000410
-
The session broker could not validate the connection settings.
ppCbReq [out]
The address of an IConnectionBrokerRequest interface pointer that you use to obtain status updates for an asynchronous operation. This interface is used in conjunction with the hStatusEvent parameter to wait for and get the results of this asynchronous operation.
Return value
Returns E_PENDING if the asynchronous request is created. Otherwise, it returns an HRESULT error code.
Remarks
This method is asynchronous. The pTargetInfo and pResult parameters must remain valid until the IConnectionBrokerRequest::CheckStatus method obtains CB_STATUS_REQUEST_COMPLETED.
For more information about how to use this method, see How to use the Remote Desktop Connection Broker client API.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8 |
Minimum supported server |
Windows Server 2012 |
Header |
|
Library |
|
DLL |
|