220.127.116.11.66 ApiGetNotify (Opnum 65)
(Protocol Version 3) The ApiGetNotify method instructs the server to retrieve the first queued event indication from the designated version 1 notification port. 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 ApiUnblockGetNotifyCall (section 18.104.22.168.107) method or the ApiCloseNotify (section 22.214.171.124.57) method.
The server MUST NOT return the following CLUSTER_CHANGE (section 126.96.36.199) enumeration values in the dwFilter parameter: CLUSTER_CHANGE_REGISTRY_SUBTREE, CLUSTER_CHANGE_CLUSTER_STATE, or CLUSTER_CHANGE_HANDLE_CLOSE. The server SHOULD<73> return the value CLUSTER_CHANGE_CLUSTER_RECONNECT in each case where the server fails to return one or more event indications on the port. How and when the server fails to return an event indication is implementation-specific.
error_status_t ApiGetNotify( [in] HNOTIFY_RPC hNotify, [out] DWORD* dwNotifyKey, [out] DWORD* dwFilter, [out] DWORD* dwStateSequence, [out, string] LPWSTR* Name, [out] error_status_t* rpc_status );
dwNotifyKey: The address of a 32-bit integer that the server MUST write upon successful completion of this method. The value was supplied as the dwNotifyKey parameter in a previous call to one of the following methods: ApiAddNotifyCluster (section 188.8.131.52.58), ApiAddNotifyNode (section 184.108.40.206.59), ApiAddNotifyGroup (section 220.127.116.11.60), ApiAddNotifyResource (section 18.104.22.168.61), ApiAddNotifyKey (section 22.214.171.124.62), ApiAddNotifyNetwork (section 126.96.36.199.90), ApiAddNotifyNetInterface (section 188.8.131.52.99), ApiReAddNotifyNode (section 184.108.40.206.63), ApiReAddNotifyGroup (section 220.127.116.11.64), ApiReAddNotifyResource (section 18.104.22.168.65), ApiReAddNotifyNetwork (section 22.214.171.124.91), or ApiReAddNotifyNetInterface (section 126.96.36.199.100).
dwFilter: The address of a 32-bit integer value that the server MUST write upon successful completion of this method, which contains the CLUSTER_CHANGE (section 188.8.131.52) enumeration value, as specified in section 184.108.40.206, indicating the type of event. The value MUST match one or more filter blocks that were provided in a previous call to one of the following methods: ApiAddNotifyCluster, ApiAddNotifyNode, ApiAddNotifyGroup, ApiAddNotifyResource, ApiAddNotifyKey, ApiAddNotifyNetwork, ApiAddNotifyNetInterface, ApiReAddNotifyNode, ApiReAddNotifyGroup, ApiReAddNotifyResource, ApiReAddNotifyNetwork, or ApiReAddNotifyNetInterface.
dwStateSequence: The address of a 32-bit integer value that the server MUST write upon successful completion of this method. The client MUST retain this value for reuse when calling any of the following methods: ApiReAddNotifyNode, ApiReAddNotifyGroup, ApiReAddNotifyResource, ApiReAddNotifyNetwork, or ApiReAddNotifyNetInterface.
Name: The address of a pointer where the server MUST write, upon successful completion of this method, the address of a Unicode string buffer that contains the name of the object to which the event pertains. If a name is not associated with the event, then the buffer contains the null Unicode string.
rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].
Return Values: The method MUST return the following error codes for the specified conditions.
Return value/code Description
The data that is pointed to by the hNotify parameter does not represent a valid HNOTIFY_RPC (section 220.127.116.11) context handle.
The notify port represented by the hNotify parameter has been closed.
Either the ApiCloseNotify (section 18.104.22.168.57) method or the ApiUnblockGetNotifyCall (section 22.214.171.124.107) method has been called in another thread. The client SHOULD kill the notification thread.
For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table. The client SHOULD treat errors specified in section 126.96.36.199 as recoverable errors and initiate the reconnect procedure as specified in section 188.8.131.52.