3.1.4.2.57 ApiCloseNotify (Opnum 56)

(Protocol Version 3) The ApiCloseNotify method instructs the server to free any context information that was created in a previous call to the ApiCreateNotify (section 3.1.4.2.56) or ApiCreateNotifyV2 (section 3.1.4.2.136) method.

The server MUST complete all outstanding ApiGetNotify (section 3.1.4.2.66), ApiGetNotifyAsync (section 3.1.4.2.143), and ApiGetNotifyV2 (section 3.1.4.2.138) calls, and flush any undelivered event indications still associated with this port.

The server SHOULD accept an ApiCloseNotify request if its protocol server state is read-only and MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

The server SHOULD accept an ApiCloseNotify request if the client's access level is at least "Read" (section 3.1.4).

 error_status_t ApiCloseNotify(
   [in, out] HNOTIFY_RPC *Notify
 );

hNotify: A pointer to an HNOTIFY_RPC (section 2.2.1.6) context handle that was obtained in a previous ApiCreateNotify (section 3.1.4.2.56) method call. To indicate success, the server MUST set the context handle, which is pointed to by this parameter, to NULL.

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

The HNOTIFY_RPC (section 2.2.1.6) context handle indicated by hNotify is not valid.

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.