[The IRDPSRAPIViewer interface is no longer available for use for UWP applications as of Windows 10, version 1709. It is still supported for Desktop apps.]
Starts the actual connection to the sharer.
HRESULT Connect( BSTR bstrConnectionString, BSTR bstrName, BSTR bstrPassword );
The connection string used to connect to the sharer and authenticate the viewer.
Name for the viewer. The name is sent to the sharer and other viewers. The string is limited to 255 characters.
Password used for authentication. The password is sent out-of-band from the sharer.
If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code.
The connection string contained in the bstrConnectionString parameter is generated by the sharer and obtained by the viewer by completing the following steps:
- The sharer obtains an instance of the IRDPSRAPIInvitationManager interface from the IRDPSRAPISharingSession::Invitations property.
- The sharer obtains an instance of the IRDPSRAPIInvitation interface by calling the IRDPSRAPIInvitationManager::CreateInvitation method.
- The sharer obtains the connection string from the IRDPSRAPIInvitation::ConnectionString property.
- The sharer sends the connection string to the viewer in an application-defined method, such as storing the connection string in a file and sharing the file with the viewer.
The bstrName string that is set in this property is sent to the sharer after the connection is started. The property is a friendly name that the sharer application can choose to display. The property is useful when an invitation is used to authenticate multiple attendees because it allows the sharer and the other viewers to identify who is participating in a Windows Desktop Sharing session.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|