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.
HRESULT GetTargetInfo( [in] CB_CONNECTION_INFO *pConnectionInfo, [in] DWORD Reserved, [in] HANDLE hStatusEvent, [out] CB_TARGET_INFO *pTargetInfo, [out] DWORD *pResult, [out] IConnectionBrokerRequest **ppCbReq );
- 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.
The destination computer could not be found.
The destination computer is not available.
Error loading destination computer.
Error bringing destination computer online.
Error redirecting to destination computer.
Error waking virtual machine.
Error booting virtual machine.
Error finding the IP address of the virtual machine.
The session broker could not find any available computers in the pool.
The session broker canceled the connection.
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.
Returns E_PENDING if the asynchronous request is created. Otherwise, it returns an HRESULT error code.
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.
Minimum supported client
Minimum supported server
|Windows Server 2012|