3.1.4.1.1 RemoteConnectionParms (Opnum 19)

The RemoteConnectionParms method gets the Remote Assistance connection parameters for a specific UserName, DomainName, and SessionID triple.

 [id(DISPID_PCH_SVC__REMOTECONNECTIONPARMS)] HRESULT RemoteConnectionParms(
   [in] BSTR bstrUserName,
   [in] BSTR bstrDomainName,
   [in] long lSessionID,
   [in] BSTR bstrUserHelpBlob,
   [out, retval] BSTR* pbstrConnectionString
 );

bstrUserName: The UserName part of the DomainName\UserName string corresponding to the terminal services session for which the client is requesting a Remote Assistance Connection String.

bstrDomainName: The DomainName part of the DomainName\UserName string corresponding to the terminal services session for which the client is requesting a Remote Assistance Connection String.

lSessionID: Identifier of the terminal services session for which the client is requesting a Remote Assistance Connection String.

bstrUserHelpBlob: A semicolon-delimited string that contains the domain and user names of the expert requesting a Remote Assistance Connection String. The format of the string is as follows.

 <Length of the string>;
 <"UNSOLICITED=1"> (Note: no semicolon)
 <Length of the DomainName\UserName string>;
 <ID=DomainName\UserName>  (Note: characters 'ID=' count toward string length)

The following is an example.

 "13;UNSOLICITED=118;ID=EXDOMAIN\EXUSER"

pbstrConnectionString: A pointer to a Remote Assistance Connection String for the requested session.

Return Values: A signed 32-bit value indicating return status. This method MUST return zero to indicate success, or an HRESULT error value (as specified in [MS-ERREF] section 2.1.1) to indicate failure. If the UserName and DomainName are valid BSTRs, the return code is one listed in the following table. If the UserName and DomainName are invalid BSTRs, the HRESULT value returned is the corresponding HRESULT to the system error code ERROR_NONE_MAPPED.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

E_ACCESSDENIED

General access denied error. <8>

0x8007000E

E_OUTOFMEMORY

Out of memory.

0x800704EC

ERROR_ACCESS_DISABLED_BY_POLICY

The program cannot be opened because of a software restriction policy. For more information, contact the system administrator.

Exceptions Thrown:

No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].