Releases all Microsoft UI Automation resources that are held by all providers associated with the calling process.
This function has no parameters.
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
A provider application should use this function to release UI Automation resources before shutting down.
This function cannot be called in response to a call to the SendMessage function. An application cannot make outbound Component Object Model (COM) calls in response to a call to SendMessage, and releasing a provider is typically an outbound COM call. The UiaDisconnectAllProviders function returns RPC_E_CANTCALLOUT_ININPUTSYNCCALL if the function is called in response to a SendMessage call. You can use the InSendMessageEx function to determine whether a particular message is being handled in response to a SendMessage call.
For more information, see BUG: RPC_E_CANTCALLOUT_ININPUTSYNCCALL Error When System Menu Is Shown in Taskbar on the MSDN Support website.
An application that calls UiaDisconnectAllProviders should not respond to a re-entrant WM_GETOBJECT message by returning a pointer to the provider that it is trying to disconnect. If the application tries to disconnect a provider, but then calls the UiaReturnRawElementProvider function with that same provider during the disconnect attempt, the provider might not be fully disconnected.
|Minimum supported client||Windows 8 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2012 [desktop apps | UWP apps]|