3.2.3.4.3 AsyncUICustomUI Notification
The AsyncUICustomUI notification can be sent by using either unidirectional communication mode or bidirectional communication mode.
A notification sent by using unidirectional communication mode MUST be delivered by way of an output parameter of an IRPCAsyncNotify_GetNotification call.
A notification sent by using bidirectional communication mode MUST be delivered by way of an output parameter of an IRPCAsyncNotify_GetNotificationSendResponse call.
Once a bidirectional notification has been processed, the client MUST NOT make an additional call to IRPCAsyncNotify_GetNotificationSendResponse using the same pChannel parameter and 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 AsyncUICustomUI (section 2.2.7.5), but SHOULD accept as compliant any of the inconsistencies described in section 3.2.3.4.1.
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 holding NOTIFICATION_RELEASE.
After successfully validating the notification:
The client MUST call the executable method identified by the entrypoint and dll attributes of the customUI element.
If the entrypoint cannot be successfully called for any reason:
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 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 holding NOTIFICATION_RELEASE.
Otherwise, if the entrypoint is successful and the bidi attribute is "true":
The client MUST construct an AsyncUICustomUIReply string. The CustomUI element MUST contain a string that is returned by the called method.
The client MUST send the AsyncUICustomUIReply to the server in the pReason parameter of an IRPCAsyncNotify_CloseChannel call.