Compartir a través de


3.1.4.6 WitnessrUnRegisterEx (Opnum 5)

The WitnessrUnRegisterEx method allows the client to unregister for notifications from the server.<6> The Witness Service removes its internal state of the registration and no longer notifies the client in the event of any resource state changes.

 DWORD WitnessrUnRegisterEx(
         [in]      handle_t Handle,
         [in, out] PPCONTEXT_HANDLE ppContext);
            

Handle: An RPC binding handle [C706].

ppContext: A context handle of type PPCONTEXT_HANDLE, specified in section 2.2.1.2, that identifies the client on the server.

Return Values: Returns 0x00000000 (ERROR_SUCCESS) on success or a nonzero error code, as specified in [MS-ERREF] section 2.2. The most common error codes are listed in the following table.

Return value/code

Description

0x00000000

 ERROR_SUCCESS

The operation completed successfully.

0x00000005

 ERROR_ACCESS_DENIED

Access is denied.

0x00000490

ERROR_NOT_FOUND

The specified CONTEXT_HANDLE is not found.

The server MUST search for WitnessRegistration in WitnessRegistrationList, where WitnessRegistration.RegistrationKey matches the ppContext parameter.

If no matching entry is found, the server MUST stop processing the request and return the error code ERROR_INVALID_PARAMETER.

If the matching entry is found, the server MUST remove the WitnessRegistration entry from WitnessRegistrationList. The server MUST set ppContext to NULL and return ERROR_SUCCESS to the caller.