RpcFilterByState (Opnum 2)

The RpcFilterByState method adds a filter to the session enumeration result, running on a terminal server, based on the state of the sessions. This method MUST be called after RpcOpenEnum and before RpcGetEnumResult or RpcGetEnumResultEx. No special permissions are required to call this method.

 HRESULT RpcFilterByState(
   [in] ENUM_HANDLE hEnum,
   [in] LONG State,
   [in] BOOL bInvert

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

State: The session state, as specified in section, to be used to filter out the enumeration result. Only the sessions with the specified state will be returned.

bInvert:  Set to TRUE to imply that the result of the comparison during enumeration will be inverted, FALSE otherwise.

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.