<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/71584e29-974d-4d35-b4bd-dfb71e2da713" data-linktype="external">msdn link</a></p><p>(Protocol Version 3) The <b>ApiGetNotifyAsync</b> method is
an asynchronous <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>
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 <a href="42ce9de8-386f-4a62-80c5-d2aa80d372a2" data-linktype="relative-path">ApiGetNotify</a> 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 <a href="e7604a23-c316-4da7-b3b0-d31e2fd9cb5e" data-linktype="relative-path">ApiUnblockGetNotifyCall</a>
or <a href="dc1cbfcc-936a-4967-9c71-63d34cea71d7" data-linktype="relative-path">ApiCloseNotify</a>
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 <a href="966ea108-35bc-41dd-a4a3-853b099e163f" data-linktype="relative-path">HNOTIFY_RPC (section 2.2.1.6)</a>
context handle that was obtained in a previous <a href="76051002-0a0a-40b2-bbb3-7eff294026f5" data-linktype="relative-path">ApiCreateNotify (section 3.1.4.2.56)</a>
method call. </p><p><b>Notifications: </b>A pointer to an array of one or
more <a href="dfa120e0-8a35-474d-b31f-aa4642f7e2bf" data-linktype="relative-path">NOTIFICATION_DATA_ASYNC_RPC (section 2.2.3.30)</a>
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>
  <p>0x00000000</p>
  <p>ERROR_SUCCESS</p>
  </td>
  <td>
  <p>The method completed successfully.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000006</p>
  <p>ERROR_INVALID_HANDLE</p>
  </td>
  <td>
  <p>The data that is pointed to by the <i>hNotify</i>
  parameter does not represent a valid HNOTIFY_RPC context handle.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000103</p>
  <p>ERROR_NO_MORE_ITEMS</p>
  </td>
  <td>
  <p>The notification port represented by the <i>hNotify</i>
  parameter has been closed.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000001</p>
  <p>ERROR_INVALID_FUNCTION</p>
  </td>
  <td>
  <p>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.</p>
  </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 <a href="ca75805a-4b39-4074-8b5b-dbaae6e81b1f" data-linktype="relative-path">3.2.4.6</a>, which are
recoverable and for which the client SHOULD initiate the reconnect procedure.</p></div>