3.1.4.3 WitnessrUnRegister (Opnum 2)

The WitnessrUnRegister method allows the client to unregister for notifications from the server. 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 WitnessrUnRegister(
         [in] handle_t Handle,
         [in] PCONTEXT_HANDLE pContext);
            

Handle: An RPC binding handle [C706].

pContext: A context handle of type PCONTEXT_HANDLE, specified in section 2.2.1.1, 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 the WitnessRegistration in WitnessRegistrationList, where WitnessRegistration.RegistrationKey matches the pContext parameter.

If no matching entry is found, the server SHOULD<5> 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 the WitnessRegistrationList and return ERROR_SUCCESS to the caller.