Partager via


3.2.4.3 Application Requests Witness UnRegister

The caller provides the following:

  • NetName: The name of the application that requests to be unregistered, typically the name to which it has previously registered.

  • IpAddress: The IP address on which the application previously registered to receive asynchronous notification.

  • ShareName: A string that contains the share name of the application that requests notifications, typically the share name to which it has connected. This parameter is only applicable for clients that implement Witness protocol version 2.

  • IsNetNameNotificationRequired: A Boolean when set; indicates that the application had requested witness registration to receive notifications based on the NetName. This parameter is only applicable for clients that implement Witness protocol version 2.

  • IsShareNameNotificationRequired: A Boolean when set; indicates that the application had requested witness registration to receive notifications based on the ShareName. This parameter is only applicable for clients that implement Witness protocol version 2.

  • IsIPNotificationRequired: A Boolean when set; indicates that the application had requested witness registration to receive notifications based on the IP addresses changes on the server associated with NetName. This parameter is only applicable for clients that implement Witness protocol version 2.

If WitnessClientVersion is 0x00020000, the client MUST locate the WitnessRegistration entry in the WitnessRegistrationList where WitnessRegistration.WitnessServerName matches NetName, WitnessRegistration.WitnessShareName matches ShareName, WitnessRegistration.IPAddress matches IPAddress, WitnessRegistration.NetNameNotificationRequired matches IsNetNameNotificationRequired, WitnessRegistration.ShareNameNotificationRequired matches IsShareNameNotificationRequired, and WitnessRegistration.IPNotificationRequired matches IsIPNotificationRequired.

If WitnessClientVersion is 0x00010001, the client MUST locate a WitnessRegistration entry in the WitnessRegistrationList where WitnessRegistration.WitnessServerName matches the application-provided NetName and WitnessRegistration.IPAddress matches the application-provided IPAddress.

If no matching entry is found, or if the WitnessRegistration.WitnessNotifyRequest is TRUE, the client MUST stop processing and return an implementation-defined local error to the caller.

If WitnessClientVersion is 0x00020000, the client SHOULD<18> call the WitnessrUnRegisterEx method, on the WitnessRegistration.RPCHandle, and pass the WitnessRegistration.RegistrationKey as the context.

If WitnessClientVersion is 0x00010001, the client MUST call the WitnessrUnRegister method, on the WitnessRegistration.RPCHandle, and pass the WitnessRegistration.RegistrationKey as the context.

If the server returns an error, the client MUST return the same error code to the caller. If the server returns STATUS_SUCCESS, the client MUST close WitnessRegistration.RPCHandle, remove the WitnessRegistration from WitnessRegistrationList, and return STATUS_SUCCESS to the caller.