3.3.4.2.2 RpcRegisterAsyncNotification (Opnum 1)
The RpcRegisterAsyncNotification method registers for an event or events happening on a terminal server. The caller MUST call RpcWaitAsyncNotification after calling RpcRegisterAsyncNotification to wait for the notification. No special permissions are required to call this method.
-
HRESULT RpcRegisterAsyncNotification( [in] handle_t hBinding, [in] LONG SessionId, [in] TNotificationId Mask, [out] NOTIFY_HANDLE* phNotify );
hBinding: The RPC binding handle. For more information, see [MSDN-RPCBIND].
SessionId: The ID of the session for which to wait for notification. If the value is -1, the call will register for notification for all sessions running on the terminal server. This MUST NOT be the session ID of any of the listener sessions.
Mask: Specifies the type of notification to wait for. This is of the type TNotificationId.
phNotify: Handle to the notification object. For more information, see NOTIFY_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.