3.2.3.4.4 AsyncUICustomData Notification

The AsyncUICustomData notification can be sent using either unidirectional communication mode or bidirectional communication mode.

A notification that is sent using unidirectional communication mode MUST be delivered by an output parameter from IRPCAsyncNotify_GetNotification.

A notification that is sent using bidirectional communication mode MUST be delivered by an output parameter from IRPCAsyncNotify_GetNotificationSendResponse.

After a bidirectional notification has been processed, the client MUST NOT make an additional call to IRPCAsyncNotify_GetNotificationSendResponse using the same pChannel parameter. The client MUST send a response using IRPCAsyncNotify_CloseChannel.

Before acting on a notification, the client SHOULD verify that the notification complies with the requirements specified for AsyncUICustomData (section 2.2.7.7), but SHOULD accept as compliant the following inconsistencies with the AsyncUIBalloon specification.

If a compliance error is detected, the client MUST NOT take any further action based on the notification data. If the invalid notification was sent in unidirectional communication mode, the client MUST continue with a subsequent call to IRPCAsyncNotify_GetNotification. If the invalid notification was sent in bidirectional communication mode, the client MUST NOT send any further response on the same notification channel and MUST close the channel by calling IRPCAsyncNotify_CloseChannel with its pInNotificationType parameter set to NOTIFICATION_RELEASE.

After successfully validating the notification, the following actions MUST be taken:

  • The client MUST call the executable method identified by the entrypoint and dll attributes of the customData element (section 2.2.7.7.1).

  • If the entrypoint cannot be successfully called for any reason, the following actions MUST be taken:

    • If the bidi attribute is "false", the client MUST ignore the error and MUST continue with a subsequent call to IRPCAsyncNotify_GetNotification.

    • If the bidi attribute is "true", the following actions MUST be taken:

      • The client MUST stop further processing of this notification.

      • The client MUST NOT send any further response on the same notification channel.

      • The client MUST close the notification channel by calling IRPCAsyncNotify_CloseChannel with its pInNotificationType parameter set to NOTIFICATION_RELEASE.

  • Otherwise, if the entrypoint is successful and the bidi attribute is "true", the following action MUST be taken:

    • The client MUST construct an AsyncUICustomUIReply string. The CustomUI element (section 2.2.7.6.1) MUST contain a string that is returned by the called method.

    • The client MUST send the AsyncUICustomUIReply string to the server in the pReason parameter of an IRPCAsyncNotify_CloseChannel call.