3.3.4.3.1 RpcOpenEnum (Opnum 0)

The RpcOpenEnum method returns a handle of the type ENUM_HANDLE, which can be used to query information about the sessions that are currently running on a terminal server. No special permissions are required to call this method. However, only sessions to which the caller has WINSTATION_QUERY permission are enumerated.

 HRESULT RpcOpenEnum(
   [in] handle_t hBinding,
   [out] ENUM_HANDLE* phEnum
 );

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

phEnum:  The handle to the session enumeration object. This is of type ENUM_HANDLE.

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

Return value/code

Description

0x00000000

S_OK

Successful completion.