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, 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




The operation completed successfully.



Access is denied.



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<4> stop processing the request and return the error code ERROR_NOT_FOUND.

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