RpcOpenSession (Opnum 0)

 The RpcOpenSession method returns a handle to a specified session on the terminal server. No special permissions are required to call this method.

 HRESULT RpcOpenSession(
   [in] handle_t hBinding,
   [in] LONG SessionId,
   [out] SESSION_HANDLE* phSession

hBinding:  The RPC binding handle. For more information, see [MSDN-RPCBIND].

SessionId:  The identifier of the session to open. This session MUST be present on the terminal server, or this call will fail. This MUST NOT be the session ID of any of the listener sessions.

phSession:  A handle to the session. This is of type SESSION_HANDLE.

Return Values: The method MUST return S_OK (0x00000000) on success; otherwise, it MUST return an implementation-specific negative value.

Return value/code




Successful completion.