3.3.4.2.3 RpcWaitAsyncNotification (Opnum 2)

The RpcWaitAsyncNotification method starts the wait for the specified terminal server notification. The notification object specified in RpcRegisterAsyncNotification is called by RPC when a notification occurs. This is asynchronous notification and RpcWaitAsyncNotification starts the wait for notification and returns. Specify the notification object using RpcRegisterAsyncNotification and then start the notification wait process using RpcWaitAsyncNotification. No special permissions are required to call this method.

 HRESULT RpcWaitAsyncNotification(
   [in] NOTIFY_HANDLE hNotify,
   [out, size_is(, *pEntries)] PSESSION_CHANGE* SessionChange,
   [out] ULONG* pEntries
 );

hNotify:  The notification handle returned by RpcRegisterAsyncNotification.

SessionChange:  An array of type SESSION_CHANGE containing information about all the sessions and the notifications received for that session.

pEntries:  The number of entries returned in the SessionChange array.

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.