File: Windows.Win32.PInvoke.UIAutomationCore.dll.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{

	/// <content>
	/// Contains extern methods from "UIAutomationCore.dll".
	/// </content>
	internal static partial class PInvoke
	{
		/// <summary>Gets a value that indicates whether any client application is subscribed to Microsoft UI Automation events.</summary>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">BOOL</a></b> <b>TRUE</b> if a client has subscribed to events; otherwise <b>FALSE</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaclientsarelistening">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern winmdroot.Foundation.BOOL UiaClientsAreListening();

		/// <summary>Releases all references that a particular provider holds to Microsoft UI Automation objects.</summary>
		/// <param name="pProvider">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> The provider to be disconnected.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiadisconnectprovider#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>
		/// <para>A provider should call this function to clean up UI Automation resources that are associated with a UI element that was destroyed.  The DLL  associated with the UI element can be safely unloaded after the function returns. After this function returns, all client requests that are associated with the disconnected provider receive the <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-error-codes">UIA_E_ELEMENTNOTAVAILABLE</a> error code. This function cannot be called in response to a call to the <a href="https://docs.microsoft.com/windows/desktop/DevNotes/-sendmessage">SendMessage</a> function. An application cannot make outbound Component Object Model (COM) calls in response to a call to <b>SendMessage</b>, and releasing a provider is typically an outbound COM call.  The <b>UiaDisconnectProvider</b> function returns RPC_E_CANTCALLOUT_ININPUTSYNCCALL if the function is called in response to a <b>SendMessage</b> call.  You can use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-insendmessageex">InSendMessageEx</a> function to determine whether a particular message is being handled in response to a <b>SendMessage</b> call.</para>
		/// <para>An application that calls <b>UiaDisconnectProvider</b> should not respond to a re-entrant [WM_GETOBJECT](/windows/win32/winauto/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 <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider">UiaReturnRawElementProvider</a> function with that same provider during the disconnect attempt, the provider might not be fully disconnected.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiadisconnectprovider#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows8.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaDisconnectProvider(winmdroot.UI.Accessibility.IRawElementProviderSimple* pProvider);

		/// <summary>Retrieves a reserved value indicating that a Microsoft UI Automation property or a text attribute is not supported.</summary>
		/// <param name="punkNotSupportedValue">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a>**</b> Receives the object representing the value. This parameter is passed uninitialized.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetreservednotsupportedvalue#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetreservednotsupportedvalue">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaGetReservedNotSupportedValue(winmdroot.System.Com.IUnknown** punkNotSupportedValue);

		/// <summary>Gets the host provider for a window.</summary>
		/// <param name="hwnd">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> The window containing the element served by the provider.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahostproviderfromhwnd#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="ppProvider">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>**</b> The host provider for the window.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiahostproviderfromhwnd#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>The object retrieved by this function is useful only for responding to calls to the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-get_hostrawelementprovider">IRawElementProviderSimple::get_HostRawElementProvider</a> method. You cannot use the object to raise events, provide properties, and so on.  If you need to raise events or provide properties, you must create a provider object that fully implements the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a> interface.</remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaHostProviderFromHwnd(winmdroot.Foundation.HWND hwnd, winmdroot.UI.Accessibility.IRawElementProviderSimple** ppProvider);

		/// <summary>Notifies listeners of an event.</summary>
		/// <param name="pProvider">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> The provider element where the event occurred.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="id">
		/// <para>Type: <b>EVENTID</b> The identifier of the event to be raised. For a list of event IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-event-ids">Event Identifiers</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>This function increments the reference counter of the <i>pProvider</i> interface, and UI Automation decrements the reference counter when the event handers finish processing the event.</remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaRaiseAutomationEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple* pProvider, winmdroot.UI.Accessibility.UIA_EVENT_ID id);

		/// <summary>Called by providers to notify the Microsoft UI Automation core that an element property has changed.</summary>
		/// <param name="pProvider">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> The provider node where the property change event occurred.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="id">
		/// <para>Type: <b>PROPERTYID</b> The identifier for the property that changed. For a list of property IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-entry-propids">Property Identifiers</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="oldValue">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinAuto/variant-structure">VARIANT</a></b> The old value of the property.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="newValue">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinAuto/variant-structure">VARIANT</a></b> The new value of the property.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraiseautomationpropertychangedevent">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaRaiseAutomationPropertyChangedEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple* pProvider, winmdroot.UI.Accessibility.UIA_PROPERTY_ID id, winmdroot.System.Variant.VARIANT oldValue, winmdroot.System.Variant.VARIANT newValue);

		/// <summary>Called by providers to initiate a notification event.</summary>
		/// <param name="provider">The provider node where the notification event occurred.</param>
		/// <param name="notificationKind">The type of notification, as a [NotificationKind enumeration](../uiautomationcore/ne-uiautomationcore-notificationkind.md) value.</param>
		/// <param name="notificationProcessing">The preferred way to process a notification, as a [NotificationProcessing enumeration](../uiautomationcore/ne-uiautomationcore-notificationprocessing.md) value.</param>
		/// <param name="displayString">A string to display in the notification message.</param>
		/// <param name="activityId">A unique non-localized string to identify an action or group of actions. Use this to pass additional information to the event handler.</param>
		/// <returns>If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
		/// <remarks>If your window uses the [`WS_POPUP`](/windows/win32/winmsg/window-styles) style, it must also implement the [Window Control Pattern](/windows/win32/winauto/uiauto-implementingwindow) and handle the [WM_GETOBJECT](/windows/win32/winauto/wm-getobject) message (see [How to Expose a Server-Side UI Automation Provider](/windows/win32/winauto/uiauto-howto-expose-serverside-uiautomation-provider) for more details).</remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows10.0.16299")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaRaiseNotificationEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple* provider, winmdroot.UI.Accessibility.NotificationKind notificationKind, winmdroot.UI.Accessibility.NotificationProcessing notificationProcessing, winmdroot.Foundation.BSTR displayString, winmdroot.Foundation.BSTR activityId);

		/// <inheritdoc cref="UiaRaiseStructureChangedEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple*, winmdroot.UI.Accessibility.StructureChangeType, int*, int)"/>
		[SupportedOSPlatform("windows5.1.2600")]
		internal static unsafe winmdroot.Foundation.HRESULT UiaRaiseStructureChangedEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple* pProvider, winmdroot.UI.Accessibility.StructureChangeType structureChangeType, ref int pRuntimeId, int cRuntimeIdLen)
		{
			fixed (int* pRuntimeIdLocal = &pRuntimeId)
			{
				winmdroot.Foundation.HRESULT __result = PInvoke.UiaRaiseStructureChangedEvent(pProvider, structureChangeType, pRuntimeIdLocal, cRuntimeIdLen);
				return __result;
			}
		}

		/// <summary>Called by a provider to notify the Microsoft UI Automation core that the tree structure has changed.</summary>
		/// <param name="pProvider">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> The provider node where the tree change occurred.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisestructurechangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="structureChangeType">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-structurechangetype">StructureChangeType</a></b> The type of change that occurred in the tree.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisestructurechangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="pRuntimeId">
		/// <para>Type: <b>int*</b> The runtime IDs for the child elements of the provider node where the tree change occurred. This parameter is used only when <i>structureChangeType</i> is <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-structurechangetype">StructureChangeType_ChildRemoved</a>; it is <b>NULL</b> for all other structure-change events. <div class="alert"><b>Note</b>  For Windows 7, the array of integers pointed to by <i>pRuntimeId</i> can contain a partial set of IDs that identify only those elements affected by the structure change.</div></para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisestructurechangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="cRuntimeIdLen">
		/// <para>Type: <b>int</b> Length of the array of integers.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisestructurechangedevent#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
		/// </returns>
		/// <remarks>An example of a change in the tree structure is child elements being added to or removed from a list box, or being expanded or collapsed in a tree view.</remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.HRESULT UiaRaiseStructureChangedEvent(winmdroot.UI.Accessibility.IRawElementProviderSimple* pProvider, winmdroot.UI.Accessibility.StructureChangeType structureChangeType, int* pRuntimeId, int cRuntimeIdLen);

		/// <summary>Gets an interface to the UI Automation provider for a window.</summary>
		/// <param name="hwnd">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> The handle of the window containing the element served by the provider.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wParam">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">WPARAM</a></b> The <i>wParam</i> argument of the [WM_GETOBJECT](/windows/win32/winauto/wm-getobject) message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LPARAM</a></b> The <i>lParam</i> argument of the [WM_GETOBJECT](/windows/win32/winauto/wm-getobject) message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="el">
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> The UI Automation provider.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LRESULT</a></b> The key for the client process to connect to the server process through UI Automation. This function returns zero when it is used to notify UI Automation that it is safe to remove the provider raised-event map. For more information, see Remarks.</para>
		/// </returns>
		/// <remarks>
		/// <para>This function is called by a control when it receives the [WM_GETOBJECT](/windows/win32/winauto/wm-getobject) message, to provide UI Automation with the UI Automation provider for the control. The control should pass the <i>wParam</i> and <i>lParam</i> parameters to the <b>UiaReturnRawElementProvider</b> function without filtering them first, because filtering can cause problems with Microsoft Active Accessibility clients. The control's window procedure should return the result of calling <b>UiaReturnRawElementProvider</b>. When Microsoft Active Accessibility clients are listening to events raised by a UI Automation provider, UI Automation maintains a map of the providers that have raised events. When the Microsoft Active Accessibility clients request further information, UI Automation uses the map to route the requests to the appropriate providers. When a window that previously returned providers has been destroyed, you should notify UI Automation by calling the <b>UiaReturnRawElementProvider</b> function as follows: <c>UiaReturnRawElementProvider(hwnd, 0, 0, NULL)</c>. This call tells UI Automation that it can safely remove all map entries that refer to the specified window. This call can save memory because it releases references to the providers being held by the raised-event map. The function returns zero when called with these special parameters. Microsoft recommends making this call from the <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-destroy">WM_DESTROY</a> message handler of the window that returns the UI Automation providers.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiareturnrawelementprovider#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("UIAutomationCore.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.1.2600")]
		internal static extern unsafe winmdroot.Foundation.LRESULT UiaReturnRawElementProvider(winmdroot.Foundation.HWND hwnd, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam, winmdroot.UI.Accessibility.IRawElementProviderSimple* el);
	}
}