Export (0) Print
Expand All

3.2.4.2 Application Requests Witness Event Notification

The caller provides the following:

  • NetName: The name that the application is requesting for notifications, typically the name to which it has connected.

  • IpAddress: The IP address for which the application requires receiving asynchronous notification.

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

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

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

  • IsIPNotificationRequired: A Boolean when set; indicates that the application had requested witness registration for receiving notifications based on the IP addresses changes on the server associated with NetName. This parameter is only applicable for clients implementing 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.

The client MUST set WitnessRegistration.WitnessNotifyRequest to TRUE.

The client MUST call the WitnessrAsyncNotify method, on WitnessRegistration.RPCHandle, passing WitnessRegistration.RegistrationKey as pContext.

When the server replies, if WitnessClientVersion is 0x00020000 and the status indicates ERROR_TIMEOUT, the client MUST call the WitnessrAsyncNotify method as specified earlier.

Otherwise, the client MUST set WitnessRegistration.WitnessNotifyRequest to FALSE.

The status and any received RESP_ASYNC_NOTIFY result obtained from the server in the previous step MUST be returned to the caller.

 
Show:
© 2015 Microsoft