4 Protocol Examples

The following example demonstrates the client and server for IPCHService interface, using the RemoteUserSessionInfo and RemoteConnectionParms methods.

  1. The client (expert) calls the RemoteUserSessionInfo method on the server.

  2. The server (novice) returns with code 0x00000000 and with the IPCHCollection interface pointer.

  3. The client gets the count of the terminal services sessions in the collection by calling the Count method on the IPCHCollection interface.

  4. The client indexes the collection from 1 through count using the Item method, and for each item in the collection retrieves the ISAFSession interface pointer.

  5. From the ISAFSession interface the client gets:

    1. The DomainName using the DomainName(Get) method.

    2.  The UserName using the UserName(Get) method.

    3.  The SessionID using the SessionID(Get) method.

  6. The client selects a DomainName, UserName, and SessionID.

  7. The client formats the UserBlob, for example: "13;UNSOLICITED=119;ID=TESTDOMAIN\\Admin".

  8. The client calls the RemoteConnectionParms method using the UserName, DomainName, SessionID, and UserBlob.

  9. The server returns with code 0x00000000, and with the Remote Assistance Connection String.

Show: