<div class="content" name="ApiGetNotifyAsync" uuid="71584e29-974d-4d35-b4bd-dfb71e2da713"><p>(Protocol Version 3) The <b>ApiGetNotifyAsync</b> method is
an asynchronous <span><a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> method that
SHOULD<a id="Appendix_A_Target_130"></a><a aria-label="Product behavior note 130" href="1d58eff8-a042-478c-972c-8e9c76a3f978#Appendix_A_130" data-linktype="relative-path">&lt;130&gt;</a> be used instead of <span><a href="42ce9de8-386f-4a62-80c5-d2aa80d372a2" data-linktype="relative-path">ApiGetNotify</a></span>
to instruct the server to return the next set of queued events corresponding to
a particular context handle. The server MUST NOT complete this method until an
indication has been queued to the port or the port has been closed through a
separate call to the <span><a href="e7604a23-c316-4da7-b3b0-d31e2fd9cb5e" data-linktype="relative-path">ApiUnblockGetNotifyCall</a></span>
or <span><a href="dc1cbfcc-936a-4967-9c71-63d34cea71d7" data-linktype="relative-path">ApiCloseNotify</a></span>
method.</p><dl>
<dd>
<div><pre> error_status_t ApiGetNotifyAsync(
   [in] HNOTIFY_RPC hNotify,
   [out, size_is(,*dwNumNotifications)] 
     PNOTIFICATION_DATA_ASYNC_RPC* Notifications,
   [out] DWORD *dwNumNotifications
 );
</pre></div>
</dd></dl><p><b>hNotify: </b>An <span><a href="966ea108-35bc-41dd-a4a3-853b099e163f" data-linktype="relative-path">HNOTIFY_RPC (section 2.2.1.6)</a></span>
context handle that was obtained in a previous <span><a href="76051002-0a0a-40b2-bbb3-7eff294026f5" data-linktype="relative-path">ApiCreateNotify (section 3.1.4.2.56)</a></span>
method call. </p><p><b>Notifications: </b>A pointer to an array of one or
more <span><a href="dfa120e0-8a35-474d-b31f-aa4642f7e2bf" data-linktype="relative-path">NOTIFICATION_DATA_ASYNC_RPC (section 2.2.3.30)</a></span>
structures corresponding to the next notification events that have been
generated on the specified notification port, but have not yet been retrieved
through previous calls to ApiGetNotifyAsync or ApiGetNotify.</p><p><b>dwNumNotifications: </b>A pointer to a DWORD that
contains the count of NOTIFICATION_DATA_ASYNC_RPC structures.</p><p><b>Return Values: </b>This method MUST return one of
the following values.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 ERROR_SUCCESS</td>
  <td>The method completed successfully.</td>
 </tr><tr>
  <td>0x00000006 ERROR_INVALID_HANDLE</td>
  <td>The data that is pointed to by the hNotify parameter does not represent a valid HNOTIFY_RPC context handle.</td>
 </tr><tr>
  <td>0x00000103 ERROR_NO_MORE_ITEMS</td>
  <td>The notification port represented by the hNotify parameter has been closed.</td>
 </tr><tr>
  <td>0x00000001 ERROR_INVALID_FUNCTION</td>
  <td>Either the ApiUnblockGetNotifyCall (section 3.1.4.2.107) method or the ApiCloseNotify (section 3.1.4.2.57) method has been called in another thread. The client SHOULD terminate the notification thread.</td>
 </tr></tbody></table>
</dd></dl><p>For any other condition, the server returns a value that is
not one of the values listed in the preceding table. The client MUST treat all
such values identically, with the exception of errors specified in section <span><a href="ca75805a-4b39-4074-8b5b-dbaae6e81b1f" data-linktype="relative-path">3.2.4.6</a></span>,
which are recoverable and for which the client SHOULD initiate the reconnect
procedure.</p></div>