' ########################################################################################
' Microsoft Windows
' File: UIAutomationCoreAPI.inc
' Contents: UIAutomation core APIs, types and enums
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_UIAutomationCoreApi_PBI)
#DEFINE PBX_UIAutomationCoreApi_PBI
%EQUATE `UIAUTOMATIONCOREAPI_INC = 1
#INCLUDE ONCE "Legacy/COM/OAIdl.inc" ' for tagVARIANT
#INCLUDE ONCE "Legacy/UI/UIAutomationCore.inc"
'// --------------------------------------------------------------------------
'//
'// General constants and types
'//
'// --------------------------------------------------------------------------
'// These are all in FACILITY_ITF
%EQUATE `UIA_E_ELEMENTNOTENABLED = &H80040200&
%EQUATE `UIA_E_ELEMENTNOTAVAILABLE = &H80040201&
%EQUATE `UIA_E_NOCLICKABLEPOINT = &H80040202&
%EQUATE `UIA_E_PROXYASSEMBLYNOTLOADED = &H80040203&
'// The following are COR error codes, included here as a convenience
'// (equivalent codes are in <corerror.h>)
%EQUATE `UIA_E_INVALIDOPERATION = &H80131509& ' // COR_E_INVALIDOPERATION
%EQUATE `UIA_E_TIMEOUT = &H80131505& ' // COR_E_TIMEOUT
'// The following common managed exceptions are not represented here
'// since they already have standard COM error codes assigned to them
'// by COM Interop:
'// ArgumentException E_INVALIDARG
'// ArgumentNullException - maps to ArgumentException
'// Other constants
%EQUATE `UiaAppendRuntimeId = 3
%EQUATE `UiaRootObjectId = -25
'DECLARE_HANDLE(HUIANODE);
'DECLARE_HANDLE(HUIAPATTERNOBJECT);
'DECLARE_HANDLE(HUIATEXTRANGE);
'DECLARE_HANDLE(HUIAEVENT);
' enum TreeScope
%EQUATE `TreeScope_Element = &H1
%EQUATE `TreeScope_Children = &H2
%EQUATE `TreeScope_Descendants = &H4
%EQUATE `TreeScope_Parent = &H8
%EQUATE `TreeScope_Ancestors = &H10
%EQUATE `TreeScope_Subtree = %TreeScope_Element OR %TreeScope_Children OR %TreeScope_Descendants
'// --------------------------------------------------------------------------
'//
'// Automation Identifier GUIDs
'//
'// --------------------------------------------------------------------------
$RuntimeId_Property_GUID = GUID$("{a39eebfa-7fba-4c89-b4d4-b99e2de7d160}")
$BoundingRectangle_Property_GUID = GUID$("{7bbfe8b2-3bfc-48dd-b729-c794b846e9a1}")
$ProcessId_Property_GUID = GUID$("{40499998-9c31-4245-a403-87320e59eaf6}")
$ControlType_Property_GUID = GUID$("{ca774fea-28ac-4bc2-94ca-acec6d6c10a3}")
$LocalizedControlType_Property_GUID = GUID$("{8763404f-a1bd-452a-89c4-3f01d3833806}")
$Name_Property_GUID = GUID$("{c3a6921b-4a99-44f1-bca6-61187052c431}")
$AcceleratorKey_Property_GUID = GUID$("{514865df-2557-4cb9-aeed-6ced084ce52c}")
$AccessKey_Property_GUID = GUID$("{06827b12-a7f9-4a15-917c-ffa5ad3eb0a7}")
$HasKeyboardFocus_Property_GUID = GUID$("{cf8afd39-3f46-4800-9656-b2bf12529905}")
$IsKeyboardFocusable_Property_GUID = GUID$("{f7b8552a-0859-4b37-b9cb-51e72092f29f}")
$IsEnabled_Property_GUID = GUID$("{2109427f-da60-4fed-bf1b-264bdce6eb3a}")
$AutomationId_Property_GUID = GUID$("{c82c0500-b60e-4310-a267-303c531f8ee5}")
$ClassName_Property_GUID = GUID$("{157b7215-894f-4b65-84e2-aac0da08b16b}")
$HelpText_Property_GUID = GUID$("{08555685-0977-45c7-a7a6-abaf5684121a}")
$ClickablePoint_Property_GUID = GUID$("{0196903b-b203-4818-a9f3-f08e675f2341}")
$Culture_Property_GUID = GUID$("{e2d74f27-3d79-4dc2-b88b-3044963a8afb}")
$IsControlElement_Property_GUID = GUID$("{95f35085-abcc-4afd-a5f4-dbb46c230fdb}")
$IsContentElement_Property_GUID = GUID$("{4bda64a8-f5d8-480b-8155-ef2e89adb672}")
$LabeledBy_Property_GUID = GUID$("{e5b8924b-fc8a-4a35-8031-cf78ac43e55e}")
$IsPassword_Property_GUID = GUID$("{e8482eb1-687c-497b-bebc-03be53ec1454}")
$NewNativeWindowHandle_Property_GUID = GUID$("{5196b33b-380a-4982-95e1-91f3ef60e024}")
$ItemType_Property_GUID = GUID$("{cdda434d-6222-413b-a68a-325dd1d40f39}")
$IsOffscreen_Property_GUID = GUID$("{03c3d160-db79-42db-a2ef-1c231eede507}")
$Orientation_Property_GUID = GUID$("{a01eee62-3884-4415-887e-678ec21e39ba}")
$FrameworkId_Property_GUID = GUID$("{dbfd9900-7e1a-4f58-b61b-7063120f773b}")
$IsRequiredForForm_Property_GUID = GUID$("{4f5f43cf-59fb-4bde-a270-602e5e1141e9}")
$ItemStatus_Property_GUID = GUID$("{51de0321-3973-43e7-8913-0b08e813c37f}")
$IsDockPatternAvailable_Property_GUID = GUID$("{2600a4c4-2ff8-4c96-ae31-8fe619a13c6c}")
$IsExpandCollapsePatternAvailable_Property_GUID = GUID$("{929d3806-5287-4725-aa16-222afc63d595}")
$IsGridItemPatternAvailable_Property_GUID = GUID$("{5a43e524-f9a2-4b12-84c8-b48a3efedd34}")
$IsGridPatternAvailable_Property_GUID = GUID$("{5622c26c-f0ef-4f3b-97cb-714c0868588b}")
$IsInvokePatternAvailable_Property_GUID = GUID$("{4e725738-8364-4679-aa6c-f3f41931f750}")
$IsMultipleViewPatternAvailable_Property_GUID = GUID$("{ff0a31eb-8e25-469d-8d6e-e771a27c1b90}")
$IsRangeValuePatternAvailable_Property_GUID = GUID$("{fda4244a-eb4d-43ff-b5ad-ed36d373ec4c}")
$IsScrollPatternAvailable_Property_GUID = GUID$("{3ebb7b4a-828a-4b57-9d22-2fea1632ed0d}")
$IsScrollItemPatternAvailable_Property_GUID = GUID$("{1cad1a05-0927-4b76-97e1-0fcdb209b98a}")
$IsSelectionItemPatternAvailable_Property_GUID = GUID$("{8becd62d-0bc3-4109-bee2-8e6715290e68}")
$IsSelectionPatternAvailable_Property_GUID = GUID$("{f588acbe-c769-4838-9a60-2686dc1188c4}")
$IsTablePatternAvailable_Property_GUID = GUID$("{cb83575f-45c2-4048-9c76-159715a139df}")
$IsTableItemPatternAvailable_Property_GUID = GUID$("{eb36b40d-8ea4-489b-a013-e60d5951fe34}")
$IsTextPatternAvailable_Property_GUID = GUID$("{fbe2d69d-aff6-4a45-82e2-fc92a82f5917}")
$IsTogglePatternAvailable_Property_GUID = GUID$("{78686d53-fcd0-4b83-9b78-5832ce63bb5b}")
$IsTransformPatternAvailable_Property_GUID = GUID$("{a7f78804-d68b-4077-a5c6-7a5ea1ac31c5}")
$IsValuePatternAvailable_Property_GUID = GUID$("{0b5020a7-2119-473b-be37-5ceb98bbfb22}")
$IsWindowPatternAvailable_Property_GUID = GUID$("{e7a57bb1-5888-4155-98dc-b422fd57f2bc}")
$Value_Value_Property_GUID = GUID$("{e95f5e64-269f-4a85-ba99-4092c3ea2986}")
$Value_IsReadOnly_Property_GUID = GUID$("{eb090f30-e24c-4799-a705-0d247bc037f8}")
$RangeValue_Value_Property_GUID = GUID$("{131f5d98-c50c-489d-abe5-ae220898c5f7}")
$RangeValue_IsReadOnly_Property_GUID = GUID$("{25fa1055-debf-4373-a79e-1f1a1908d3c4}")
$RangeValue_Minimum_Property_GUID = GUID$("{78cbd3b2-684d-4860-af93-d1f95cb022fd}")
$RangeValue_Maximum_Property_GUID = GUID$("{19319914-f979-4b35-a1a6-d37e05433473}")
$RangeValue_LargeChange_Property_GUID = GUID$("{a1f96325-3a3d-4b44-8e1f-4a46d9844019}")
$RangeValue_SmallChange_Property_GUID = GUID$("{81c2c457-3941-4107-9975-139760f7c072}")
$Scroll_HorizontalScrollPercent_Property_GUID = GUID$("{c7c13c0e-eb21-47ff-acc4-b5a3350f5191}")
$Scroll_HorizontalViewSize_Property_GUID = GUID$("{70c2e5d4-fcb0-4713-a9aa-af92ff79e4cd}")
$Scroll_VerticalScrollPercent_Property_GUID = GUID$("{6c8d7099-b2a8-4948-bff7-3cf9058bfefb}")
$Scroll_VerticalViewSize_Property_GUID = GUID$("{de6a2e22-d8c7-40c5-83ba-e5f681d53108}")
$Scroll_HorizontallyScrollable_Property_GUID = GUID$("{8b925147-28cd-49ae-bd63-f44118d2e719}")
$Scroll_VerticallyScrollable_Property_GUID = GUID$("{89164798-0068-4315-b89a-1e7cfbbc3dfc}")
$Selection_Selection_Property_GUID = GUID$("{aa6dc2a2-0e2b-4d38-96d5-34e470b81853}")
$Selection_CanSelectMultiple_Property_GUID = GUID$("{49d73da5-c883-4500-883d-8fcf8daf6cbe}")
$Selection_IsSelectionRequired_Property_GUID = GUID$("{b1ae4422-63fe-44e7-a5a5-a738c829b19a}")
$Grid_RowCount_Property_GUID = GUID$("{2a9505bf-c2eb-4fb6-b356-8245ae53703e}")
$Grid_ColumnCount_Property_GUID = GUID$("{fe96f375-44aa-4536-ac7a-2a75d71a3efc}")
$GridItem_Row_Property_GUID = GUID$("{6223972a-c945-4563-9329-fdc974af2553}")
$GridItem_Column_Property_GUID = GUID$("{c774c15c-62c0-4519-8bdc-47be573c8ad5}")
$GridItem_RowSpan_Property_GUID = GUID$("{4582291c-466b-4e93-8e83-3d1715ec0c5e}")
$GridItem_ColumnSpan_Property_GUID = GUID$("{583ea3f5-86d0-4b08-a6ec-2c5463ffc109}")
$GridItem_Parent_Property_GUID = GUID$("{9d912252-b97f-4ecc-8510-ea0e33427c72}")
$Dock_DockPosition_Property_GUID = GUID$("{6d67f02e-c0b0-4b10-b5b9-18d6ecf98760}")
$ExpandCollapse_ExpandCollapseState_Property_GUID = GUID$("{275a4c48-85a7-4f69-aba0-af157610002b}")
$MultipleView_CurrentView_Property_GUID = GUID$("{7a81a67a-b94f-4875-918b-65c8d2f998e5}")
$MultipleView_SupportedViews_Property_GUID = GUID$("{8d5db9fd-ce3c-4ae7-b788-400a3c645547}")
$Window_CanMaximize_Property_GUID = GUID$("{64fff53f-635d-41c1-950c-cb5adfbe28e3}")
$Window_CanMinimize_Property_GUID = GUID$("{b73b4625-5988-4b97-b4c2-a6fe6e78c8c6}")
$Window_WindowVisualState_Property_GUID = GUID$("{4ab7905f-e860-453e-a30a-f6431e5daad5}")
$Window_WindowInteractionState_Property_GUID = GUID$("{4fed26a4-0455-4fa2-b21c-c4da2db1ff9c}")
$Window_IsModal_Property_GUID = GUID$("{ff4e6892-37b9-4fca-8532-ffe674ecfeed}")
$Window_IsTopmost_Property_GUID = GUID$("{ef7d85d3-0937-4962-9241-b62345f24041}")
$SelectionItem_IsSelected_Property_GUID = GUID$("{f122835f-cd5f-43df-b79d-4b849e9e6020}")
$SelectionItem_SelectionContainer_Property_GUID = GUID$("{a4365b6e-9c1e-4b63-8b53-c2421dd1e8fb}")
$Table_RowHeaders_Property_GUID = GUID$("{d9e35b87-6eb8-4562-aac6-a8a9075236a8}")
$Table_ColumnHeaders_Property_GUID = GUID$("{aff1d72b-968d-42b1-b459-150b299da664}")
$Table_RowOrColumnMajor_Property_GUID = GUID$("{83be75c3-29fe-4a30-85e1-2a6277fd106e}")
$TableItem_RowHeaderItems_Property_GUID = GUID$("{b3f853a0-0574-4cd8-bcd7-ed5923572d97}")
$TableItem_ColumnHeaderItems_Property_GUID = GUID$("{967a56a3-74b6-431e-8de6-99c411031c58}")
$Toggle_ToggleState_Property_GUID = GUID$("{b23cdc52-22c2-4c6c-9ded-f5c422479ede}")
$Transform_CanMove_Property_GUID = GUID$("{1b75824d-208b-4fdf-bccd-f1f4e5741f4f}")
$Transform_CanResize_Property_GUID = GUID$("{bb98dca5-4c1a-41d4-a4f6-ebc128644180}")
$Transform_CanRotate_Property_GUID = GUID$("{10079b48-3849-476f-ac96-44a95c8440d9}")
$ToolTipOpened_Event_GUID = GUID$("{3f4b97ff-2edc-451d-bca4-95a3188d5b03}")
$ToolTipClosed_Event_GUID = GUID$("{276d71ef-24a9-49b6-8e97-da98b401bbcd}")
$StructureChanged_Event_GUID = GUID$("{59977961-3edd-4b11-b13b-676b2a2a6ca9}")
$MenuOpened_Event_GUID = GUID$("{ebe2e945-66ca-4ed1-9ff8-2ad7df0a1b08}")
$AutomationPropertyChanged_Event_GUID = GUID$("{2527fba1-8d7a-4630-a4cc-e66315942f52}")
$AutomationFocusChanged_Event_GUID = GUID$("{b68a1f17-f60d-41a7-a3cc-b05292155fe0}")
$AsyncContentLoaded_Event_GUID = GUID$("{5fdee11c-d2fa-4fb9-904e-5cbee894d5ef}")
$MenuClosed_Event_GUID = GUID$("{3cf1266e-1582-4041-acd7-88a35a965297}")
$LayoutInvalidated_Event_GUID = GUID$("{ed7d6544-a6bd-4595-9bae-3d28946cc715}")
$Invoke_Invoked_Event_GUID = GUID$("{dfd699f0-c915-49dd-b422-dde785c3d24b}")
$SelectionItem_ElementAddedToSelectionEvent_Event_GUID = GUID$("{3c822dd1-c407-4dba-91dd-79d4aed0aec6}")
$SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID = GUID$("{097fa8a9-7079-41af-8b9c-0934d8305e5c}")
$SelectionItem_ElementSelectedEvent_Event_GUID = GUID$("{b9c7dbfb-4ebe-4532-aaf4-008cf647233c}")
$Selection_InvalidatedEvent_Event_GUID = GUID$("{cac14904-16b4-4b53-8e47-4cb1df267bb7}")
$Text_TextSelectionChangedEvent_Event_GUID = GUID$("{918edaa1-71b3-49ae-9741-79beb8d358f3}")
$Text_TextChangedEvent_Event_GUID = GUID$("{4a342082-f483-48c4-ac11-a84b435e2a84}")
$Window_WindowOpened_Event_GUID = GUID$("{d3e81d06-de45-4f2f-9633-de9e02fb65af}")
$Window_WindowClosed_Event_GUID = GUID$("{edf141f8-fa67-4e22-bbf7-944e05735ee2}")
$Invoke_Pattern_GUID = GUID$("{d976c2fc-66ea-4a6e-b28f-c24c7546ad37}")
$Selection_Pattern_GUID = GUID$("{66e3b7e8-d821-4d25-8761-435d2c8b253f}")
$Value_Pattern_GUID = GUID$("{17faad9e-c877-475b-b933-77332779b637}")
$RangeValue_Pattern_GUID = GUID$("{18b00d87-b1c9-476a-bfbd-5f0bdb926f63}")
$Scroll_Pattern_GUID = GUID$("{895fa4b4-759d-4c50-8e15-03460672003c}")
$ExpandCollapse_Pattern_GUID = GUID$("{ae05efa2-f9d1-428a-834c-53a5c52f9b8b}")
$Grid_Pattern_GUID = GUID$("{260a2ccb-93a8-4e44-a4c1-3df397f2b02b}")
$GridItem_Pattern_GUID = GUID$("{f2d5c877-a462-4957-a2a5-2c96b303bc63}")
$MultipleView_Pattern_GUID = GUID$("{547a6ae4-113f-47c4-850f-db4dfa466b1d}")
$Window_Pattern_GUID = GUID$("{27901735-c760-4994-ad11-5919e606b110}")
$SelectionItem_Pattern_GUID = GUID$("{9bc64eeb-87c7-4b28-94bb-4d9fa437b6ef}")
$Dock_Pattern_GUID = GUID$("{9cbaa846-83c8-428d-827f-7e6063fe0620}")
$Table_Pattern_GUID = GUID$("{c415218e-a028-461e-aa92-8f925cf79351}")
$TableItem_Pattern_GUID = GUID$("{df1343bd-1888-4a29-a50c-b92e6de37f6f}")
$Text_Pattern_GUID = GUID$("{8615f05d-7de5-44fd-a679-2ca4b46033a8}")
$Toggle_Pattern_GUID = GUID$("{0b419760-e2f4-43ff-8c5f-9457c82b56e9}")
$Transform_Pattern_GUID = GUID$("{24b46fdb-587e-49f1-9c4a-d8e98b664b7b}")
$ScrollItem_Pattern_GUID = GUID$("{4591d005-a803-4d5c-b4d5-8d2800f906a7}")
$Button_Control_GUID = GUID$("{5a78e369-c6a1-4f33-a9d7-79f20d0c788e}")
$Calendar_Control_GUID = GUID$("{8913eb88-00e5-46bc-8e4e-14a786e165a1}")
$CheckBox_Control_GUID = GUID$("{fb50f922-a3db-49c0-8bc3-06dad55778e2}")
$ComboBox_Control_GUID = GUID$("{54cb426c-2f33-4fff-aaa1-aef60dac5deb}")
$Edit_Control_GUID = GUID$("{6504a5c8-2c86-4f87-ae7b-1abddc810cf9}")
$Hyperlink_Control_GUID = GUID$("{8a56022c-b00d-4d15-8ff0-5b6b266e5e02}")
$Image_Control_GUID = GUID$("{2d3736e4-6b16-4c57-a962-f93260a75243}")
$ListItem_Control_GUID = GUID$("{7b3717f2-44d1-4a58-98a8-f12a9b8f78e2}")
$List_Control_GUID = GUID$("{9b149ee1-7cca-4cfc-9af1-cac7bddd3031}")
$Menu_Control_GUID = GUID$("{2e9b1440-0ea8-41fd-b374-c1ea6f503cd1}")
$MenuBar_Control_GUID = GUID$("{cc384250-0e7b-4ae8-95ae-a08f261b52ee}")
$MenuItem_Control_GUID = GUID$("{f45225d3-d0a0-49d8-9834-9a000d2aeddc}")
$ProgressBar_Control_GUID = GUID$("{228c9f86-c36c-47bb-9fb6-a5834bfc53a4}")
$RadioButton_Control_GUID = GUID$("{3bdb49db-fe2c-4483-b3e1-e57f219440c6}")
$ScrollBar_Control_GUID = GUID$("{daf34b36-5065-4946-b22f-92595fc0751a}")
$Slider_Control_GUID = GUID$("{b033c24b-3b35-4cea-b609-763682fa660b}")
$Spinner_Control_GUID = GUID$("{60cc4b38-3cb1-4161-b442-c6b726c17825}")
$StatusBar_Control_GUID = GUID$("{d45e7d1b-5873-475f-95a4-0433e1f1b00a}")
$Tab_Control_GUID = GUID$("{38cd1f2d-337a-4bd2-a5e3-adb469e30bd3}")
$TabItem_Control_GUID = GUID$("{2c6a634f-921b-4e6e-b26e-08fcb0798f4c}")
$Text_Control_GUID = GUID$("{ae9772dc-d331-4f09-be20-7e6dfaf07b0a}")
$ToolBar_Control_GUID = GUID$("{8f06b751-e182-4e98-8893-2284543a7dce}")
$ToolTip_Control_GUID = GUID$("{05ddc6d1-2137-4768-98ea-73f52f7134f3}")
$Tree_Control_GUID = GUID$("{7561349c-d241-43f4-9908-b5f091bee611}")
$TreeItem_Control_GUID = GUID$("{62c9feb9-8ffc-4878-a3a4-96b030315c18}")
$Custom_Control_GUID = GUID$("{f29ea0c3-adb7-430a-ba90-e52c7313e6ed}")
$Group_Control_GUID = GUID$("{ad50aa1c-e8c8-4774-ae1b-dd86df0b3bdc}")
$Thumb_Control_GUID = GUID$("{701ca877-e310-4dd6-b644-797e4faea213}")
$DataGrid_Control_GUID = GUID$("{84b783af-d103-4b0a-8415-e73942410f4b}")
$DataItem_Control_GUID = GUID$("{a0177842-d94f-42a5-814b-6068addc8da5}")
$Document_Control_GUID = GUID$("{3cd6bb6f-6f08-4562-b229-e4e2fc7a9eb4}")
$SplitButton_Control_GUID = GUID$("{7011f01f-4ace-4901-b461-920a6f1ca650}")
$Window_Control_GUID = GUID$("{e13a7242-f462-4f4d-aec1-53b28d6c3290}")
$Pane_Control_GUID = GUID$("{5c2b3f5b-9182-42a3-8dec-8c04c1ee634d}")
$Header_Control_GUID = GUID$("{5b90cbce-78fb-4614-82b6-554d74718e67}")
$HeaderItem_Control_GUID = GUID$("{e6bc12cb-7c8e-49cf-b168-4a93a32bebb0}")
$Table_Control_GUID = GUID$("{773bfa0e-5bc4-4deb-921b-de7b3206229e}")
$TitleBar_Control_GUID = GUID$("{98aa55bf-3bb0-4b65-836e-2ea30dbc171f}")
$Separator_Control_GUID = GUID$("{8767eba3-2a63-4ab0-ac8d-aa50e23de978}")
$Text_AnimationStyle_Attribute_GUID = GUID$("{628209f0-7c9a-4d57-be64-1f1836571ff5}")
$Text_BackgroundColor_Attribute_GUID = GUID$("{fdc49a07-583d-4f17-ad27-77fc832a3c0b}")
$Text_BulletStyle_Attribute_GUID = GUID$("{c1097c90-d5c4-4237-9781-3bec8ba54e48}")
$Text_CapStyle_Attribute_GUID = GUID$("{fb059c50-92cc-49a5-ba8f-0aa872bba2f3}")
$Text_Culture_Attribute_GUID = GUID$("{c2025af9-a42d-4ced-a1fb-c6746315222e}")
$Text_FontName_Attribute_GUID = GUID$("{64e63ba8-f2e5-476e-a477-1734feaaf726}")
$Text_FontSize_Attribute_GUID = GUID$("{dc5eeeff-0506-4673-93f2-377e4a8e01f1}")
$Text_FontWeight_Attribute_GUID = GUID$("{6fc02359-b316-4f5f-b401-f1ce55741853}")
$Text_ForegroundColor_Attribute_GUID = GUID$("{72d1c95d-5e60-471a-96b1-6c1b3b77a436}")
$Text_HorizontalTextAlignment_Attribute_GUID = GUID$("{04ea6161-fba3-477a-952a-bb326d026a5b}")
$Text_IndentationFirstLine_Attribute_GUID = GUID$("{206f9ad5-c1d3-424a-8182-6da9a7f3d632}")
$Text_IndentationLeading_Attribute_GUID = GUID$("{5cf66bac-2d45-4a4b-b6c9-f7221d2815b0}")
$Text_IndentationTrailing_Attribute_GUID = GUID$("{97ff6c0f-1ce4-408a-b67b-94d83eb69bf2}")
$Text_IsHidden_Attribute_GUID = GUID$("{360182fb-bdd7-47f6-ab69-19e33f8a3344}")
$Text_IsItalic_Attribute_GUID = GUID$("{fce12a56-1336-4a34-9663-1bab47239320}")
$Text_IsReadOnly_Attribute_GUID = GUID$("{a738156b-ca3e-495e-9514-833c440feb11}")
$Text_IsSubscript_Attribute_GUID = GUID$("{f0ead858-8f53-413c-873f-1a7d7f5e0de4}")
$Text_IsSuperscript_Attribute_GUID = GUID$("{da706ee4-b3aa-4645-a41f-cd25157dea76}")
$Text_MarginBottom_Attribute_GUID = GUID$("{7ee593c4-72b4-4cac-9271-3ed24b0e4d42}")
$Text_MarginLeading_Attribute_GUID = GUID$("{9e9242d0-5ed0-4900-8e8a-eecc03835afc}")
$Text_MarginTop_Attribute_GUID = GUID$("{683d936f-c9b9-4a9a-b3d9-d20d33311e2a}")
$Text_MarginTrailing_Attribute_GUID = GUID$("{af522f98-999d-40af-a5b2-0169d0342002}")
$Text_OutlineStyles_Attribute_GUID = GUID$("{5b675b27-db89-46fe-970c-614d523bb97d}")
$Text_OverlineColor_Attribute_GUID = GUID$("{83ab383a-fd43-40da-ab3e-ecf8165cbb6d}")
$Text_OverlineStyle_Attribute_GUID = GUID$("{0a234d66-617e-427f-871d-e1ff1e0c213f}")
$Text_StrikethroughColor_Attribute_GUID = GUID$("{bfe15a18-8c41-4c5a-9a0b-04af0e07f487}")
$Text_StrikethroughStyle_Attribute_GUID = GUID$("{72913ef1-da00-4f01-899c-ac5a8577a307}")
$Text_Tabs_Attribute_GUID = GUID$("{2e68d00b-92fe-42d8-899a-a784aa4454a1}")
$Text_TextFlowDirections_Attribute_GUID = GUID$("{8bdf8739-f420-423e-af77-20a5d973a907}")
$Text_UnderlineColor_Attribute_GUID = GUID$("{bfa12c73-fde2-4473-bf64-1036d6aa0f45}")
$Text_UnderlineStyle_Attribute_GUID = GUID$("{5f3b21c0-ede4-44bd-9c36-3853038cbfeb}")
$SID_IsUIAutomationObject = GUID$("{b96fdb85-7204-4724-842b-c7059dedb9d0}")
'// --------------------------------------------------------------------------
'//
'// Error handling
'//
'// --------------------------------------------------------------------------
DECLARE FUNCTION UiaGetErrorDescription LIB "uiautomationcore.dll" ALIAS "UiaGetErrorDescription" ( BYREF pDescription AS WSTRING ) AS LONG
'// --------------------------------------------------------------------------
'//
'// Conditions
'//
'// --------------------------------------------------------------------------
' enum ConditionType
%EQUATE `ConditionType_True = 0
%EQUATE `ConditionType_False = 1
%EQUATE `ConditionType_Property = 2
%EQUATE `ConditionType_And = 3
%EQUATE `ConditionType_Or = 4
%EQUATE `ConditionType_Not = 5
' // Size = 4 bytes
TYPE UiaCondition DWORD
 ConditionType AS LONG ' ConditionType
END TYPE
' enum PropertyConditionFlags
%EQUATE `PropertyConditionFlags_None = &H00
%EQUATE `PropertyConditionFlags_IgnoreCase = &H01
' // Size = 32 bytes
TYPE UiaPropertyCondition ' Must be 8 byte aligned
 ConditionType AS LONG ' ConditionType
 PropertyId AS LONG
 Value AS tagVARIANT ' VARIANT
 Flags AS DWORD ' PropertyConditionFlags
 alignment__ AS DWORD ' // To keep 8 byte alignment
END TYPE
' // Size = 12 bytes
TYPE UiaAndOrCondition DWORD
 ConditionType AS LONG ' ConditionType
 ppConditions AS DWORD ' UiaCondition ** ppConditions; // ptr to array-of-ptrs to conditions
 cConditions AS DWORD ' int
END TYPE
' // Size = 8 bytes
TYPE UiaNotCondition DWORD
 ConditionType AS LONG ' ConditionType
 pCondition AS UiaCondition PTR ' UiaCondition *
END TYPE
'// --------------------------------------------------------------------------
'//
'// Cache request/response
'//
'// --------------------------------------------------------------------------
' enum AutomationElementMode
%EQUATE `AutomationElementMode_None = 0
%EQUATE `AutomationElementMode_Full = 1
' // Size = 28 bytes
TYPE UiaCacheRequest DWORD
 pViewCondition AS UiaCondition PTR ' UiaCondition *
 Scope AS DWORD ' TreeScope
 pProperties AS LONG PTR ' PROPERTYID *
 cProperties AS LONG ' int
 pPatterns AS LONG PTR ' PATTERNID *
 cPatterns AS LONG ' int
 automationElementMode AS LONG ' AutomationElementMode
END TYPE
DECLARE FUNCTION UiaHUiaNodeFromVariant LIB "uiautomationcore.dll" ALIAS "UiaHUiaNodeFromVariant" ( BYREF pvar AS VARIANT , BYREF phnode AS QUAD ) AS LONG
DECLARE FUNCTION UiaHPatternObjectFromVariant LIB "uiautomationcore.dll" ALIAS "UiaHPatternObjectFromVariant" ( BYREF pvar AS VARIANT
 , BYREF phobj AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaHTextRangeFromVariant LIB "uiautomationcore.dll" ALIAS "UiaHTextRangeFromVariant" ( BYREF pvar AS VARIANT
 , BYREF phtextrange AS DWORD
 ) AS LONG
'// --------------------------------------------------------------------------
'//
'// UiaNode methods
'//
'// --------------------------------------------------------------------------
'// Used by UiaGetUpdatedCache
' enum NormalizeState
%EQUATE `NormalizeState_None = 0 ' // Don't normalize
%EQUATE `NormalizeState_View = 1 ' // Normalize against condition in UiaCacheRequest
%EQUATE `NormalizeState_Custom = 2 ' // Normalize against supplied condition
' // Size = 16 bytes
TYPE UiaFindParams DWORD
 MaxDepth AS LONG ' int
 FindFirst AS LONG
 ExcludeRoot AS LONG
 pFindCondition AS UiaCondition PTR ' UiaCondition *
END TYPE
DECLARE FUNCTION UiaNodeRelease LIB "uiautomationcore.dll" ALIAS "UiaNodeRelease" ( BYREF hnode AS QUAD ) AS LONG
DECLARE FUNCTION UiaGetPropertyValue LIB "uiautomationcore.dll" ALIAS "UiaGetPropertyValue" ( BYVAL hnode AS QUAD
 , BYVAL propertyId AS LONG
 , BYREF pValue AS VARIANT
 ) AS LONG
DECLARE FUNCTION UiaGetPatternProvider LIB "uiautomationcore.dll" ALIAS "UiaGetPatternProvider" ( BYVAL hnode AS DWORD
 , BYVAL patternId AS LONG
 , BYREF phobj AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaGetRuntimeId LIB "uiautomationcore.dll" ALIAS "UiaGetRuntimeId" ( BYVAL hnode AS DWORD
 , BYREF pruntimeId AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaSetFocus LIB "uiautomationcore.dll" ALIAS "UiaSetFocus" ( BYVAL hnode AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaNavigate LIB "uiautomationcore.dll" ALIAS "UiaNavigate" ( BYVAL hnode AS DWORD
 , BYVAL direction AS LONG
 , BYREF pCondition AS UiaCondition
 , BYREF pRequest AS UiaCacheRequest
 , BYREF ppRequestedData AS DWORD
 , BYREF ppTreeStructure AS WSTRING
 ) AS LONG
DECLARE FUNCTION UiaGetUpdatedCache LIB "uiautomationcore.dll" ALIAS "UiaGetUpdatedCache" ( BYVAL hnode AS DWORD
 , BYREF pRequest AS UiaCacheRequest
 , BYVAL normalizeState AS LONG
 , BYREF pNormalizeCondition AS UiaCondition
 , BYREF ppRequestedData AS DWORD
 , BYREF ppTreeStructure AS WSTRING
 ) AS LONG
DECLARE FUNCTION UiaFind LIB "uiautomationcore.dll" ALIAS "UiaFind" ( BYVAL hnode AS DWORD
 , BYREF pParams AS UiaFindParams
 , BYREF pRequest AS UiaCacheRequest
 , BYREF ppRequestedData AS DWORD
 , BYREF ppOffsets AS DWORD
 , BYREF ppTreeStructures AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaNodeFromPoint LIB "uiautomationcore.dll" ALIAS "UiaNodeFromPoint" ( BYVAL x AS DOUBLE
 , BYVAL y AS DOUBLE
 , BYREF pRequest AS UiaCacheRequest
 , BYREF ppRequestedData AS DWORD
 , BYREF ppTreeStructure AS WSTRING
 ) AS LONG
DECLARE FUNCTION UiaNodeFromFocus LIB "uiautomationcore.dll" ALIAS "UiaNodeFromFocus" ( BYREF pRequest AS UiaCacheRequest
 , BYREF ppRequestedData AS DWORD
 , BYREF ppTreeStructure AS WSTRING
 ) AS LONG
DECLARE FUNCTION UiaNodeFromHandle LIB "uiautomationcore.dll" ALIAS "UiaNodeFromHandle" ( BYVAL hwnd AS DWORD
 , BYREF phnode AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaNodeFromProvider LIB "uiautomationcore.dll" ALIAS "UiaNodeFromProvider" ( BYVAL pProvider AS IRawElementProviderSimple
 , BYREF phnode AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaGetRootNode LIB "uiautomationcore.dll" ALIAS "UiaGetRootNode" ( BYREF phnode AS DWORD
 ) AS LONG
'#ifdef __cplusplus
'inline void UiaRectSetEmpty(UiaRect & rc)
'{
' rc.left = 0;
' rc.top = 0;
' rc.width = 0;
' rc.height = 0;
'}
'inline bool UiaRectIsEmpty(const UiaRect & rc)
'{
' return rc.width <= 0 || rc.height <= 0;
'}
'#endif
SUB UiaRectSetEmpty (BYREF rc AS UiaRect)
 rc.left = 0
 rc.top = 0
 rc.width = 0
 rc.height = 0
END SUB
FUNCTION UiaRectIsEmpty(BYREF rc AS UiaRect) AS LONG
 FUNCTION = (rc.width <= 0 AND rc.height <= 0)
END FUNCTION
'// --------------------------------------------------------------------------
'//
'// Client-side provider support
'//
'// --------------------------------------------------------------------------
' enum ProviderType
%EQUATE `ProviderType_BaseHwnd = 0
%EQUATE `ProviderType_Proxy = 1
%EQUATE `ProviderType_NonClientArea = 2
DECLARE FUNCTION UiaProviderCallback LIB "uiautomationcore.dll" ALIAS "UiaProviderCallback" ( BYVAL hwnd AS QUAD , BYVAL providerType AS LONG ) AS QUAD ' SAFEARRAY*
DECLARE SUB UiaRegisterProviderCallback LIB "uiautomationcore.dll" ALIAS "UiaRegisterProviderCallback" ( BYVAL pCallback AS QUAD ) ' void
'// --------------------------------------------------------------------------
'//
'// Identifier mapping
'//
'// --------------------------------------------------------------------------
' enum AutomationIdentifierType
%EQUATE `AutomationIdentifierType_Property = 0
%EQUATE `AutomationIdentifierType_Pattern = 1
%EQUATE `AutomationIdentifierType_Event = 2
%EQUATE `AutomationIdentifierType_ControlType = 3
%EQUATE `AutomationIdentifierType_TextAttribute = 4
DECLARE FUNCTION UiaLookupId LIB "uiautomationcore.dll" ALIAS "UiaLookupId" ( BYVAL type AS LONG , BYREF pGuid AS GUID ) AS LONG ' int
DECLARE FUNCTION UiaGetReservedNotSupportedValue LIB "uiautomationcore.dll" ALIAS "UiaGetReservedNotSupportedValue" ( BYREF punkNotSupportedValue AS IUnknown ) AS LONG
DECLARE FUNCTION UiaGetReservedMixedAttributeValue LIB "uiautomationcore.dll" ALIAS "UiaGetReservedMixedAttributeValue" ( BYREF punkMixedAttributeValue AS IUnknown
 ) AS LONG
'// --------------------------------------------------------------------------
'//
'// Event methods
'//
'// --------------------------------------------------------------------------
'//
'// Event structs and enums
'//
' enum EventArgsType
%EQUATE `EventArgsType_Simple = 0
%EQUATE `EventArgsType_PropertyChanged = 1
%EQUATE `EventArgsType_StructureChanged = 2
%EQUATE `EventArgsType_AsyncContentLoaded = 3
%EQUATE `EventArgsType_WindowClosed = 4
' enum StructureChangeType
%EQUATE `StructureChangeType_ChildAdded = 0
%EQUATE `StructureChangeType_ChildRemoved = 1
%EQUATE `StructureChangeType_ChildrenInvalidated = 2
%EQUATE `StructureChangeType_ChildrenBulkAdded = 3
%EQUATE `StructureChangeType_ChildrenBulkRemoved = 4
%EQUATE `StructureChangeType_ChildrenReordered = 5
' enum AsyncContentLoadedState
%EQUATE `AsyncContentLoadedState_Beginning = 0
%EQUATE `AsyncContentLoadedState_Progress = 1
%EQUATE `AsyncContentLoadedState_Completed = 2
' // Size = 8 bytes
TYPE UiaEventArgs DWORD
 Type AS LONG ' EventArgsType
 EventId AS LONG ' int
END TYPE
' // Size = 48 bytes
TYPE UiaPropertyChangedEventArgs QWORD FILL ' Must be 8 byte aligned
 Type AS LONG ' EventArgsType
 EventId AS LONG ' int
 PropertyId AS LONG
 OldValue AS tagVARIANT ' VARIANT
 NewValue AS tagVARIANT ' VARIANT
END TYPE
' // Size = 20 bytes
TYPE UiaStructureChangedEventArgs DWORD
 Type AS LONG ' EventArgsType
 EventId AS LONG ' int
 StructureChangeType AS LONG ' StructureChangeType
 pRuntimeId AS LONG PTR ' int *
 cRuntimeIdLen AS LONG ' int
END TYPE
' // Size = 24 bytes
TYPE UiaAsyncContentLoadedEventArgs QWORD FILL ' Must be 8 byte aligned
 Type AS LONG ' EventArgsType
 EventId AS LONG ' int
 AsyncContentLoadedState AS LONG ' AsyncContentLoadedState
 PercentComplete AS DOUBLE ' double
END TYPE
' // Size = 16 bytes
TYPE UiaWindowClosedEventArgs DWORD
 Type AS LONG ' EventArgsType
 EventId AS LONG ' int
 pRuntimeId AS LONG PTR ' int *
 cRuntimeIdLen AS LONG ' int
END TYPE
'//
'// Provider Event APIs
'//
DECLARE FUNCTION UiaClientsAreListening LIB "uiautomationcore.dll" ALIAS "UiaClientsAreListening" ( ) AS LONG
DECLARE FUNCTION UiaRaiseAutomationPropertyChangedEvent LIB "uiautomationcore.dll" ALIAS "UiaRaiseAutomationPropertyChangedEvent" ( BYVAL pProvider AS IRawElementProviderSimple , BYVAL id AS LONG
 , BYVAL oldValue AS VARIANT
 , BYVAL newValue AS VARIANT
 ) AS LONG
DECLARE FUNCTION UiaRaiseAutomationEvent LIB "uiautomationcore.dll" ALIAS "UiaRaiseAutomationEvent" ( BYVAL pProvider AS IRawElementProviderSimple
 , BYVAL id AS LONG
 ) AS LONG
DECLARE FUNCTION UiaRaiseStructureChangedEvent LIB "uiautomationcore.dll" ALIAS "UiaRaiseStructureChangedEvent" ( BYVAL pProvider AS IRawElementProviderSimple
 , BYVAL structureChangeType AS LONG
 , BYREF pRuntimeId AS LONG
 , BYVAL cRuntimeIdLen AS LONG
 ) AS LONG
DECLARE FUNCTION UiaRaiseAsyncContentLoadedEvent LIB "uiautomationcore.dll" ALIAS "UiaRaiseAsyncContentLoadedEvent" ( BYVAL pProvider AS IRawElementProviderSimple
 , BYVAL asyncContentLoadedState AS LONG
 , BYVAL percentComplete AS DOUBLE
 ) AS LONG
'//
'// Client Event APIs
'//
DECLARE SUB UiaEventCallback LIB "uiautomationcore.dll" ALIAS "UiaEventCallback" ( BYREF pArgs AS UiaEventArgs , BYVAL pRequestedData AS QUAD , BYVAL pTreeStructure AS WSTRING ) ' void
DECLARE FUNCTION UiaAddEvent LIB "uiautomationcore.dll" ALIAS "UiaAddEvent" ( BYVAL hnode AS QUAD , BYVAL eventId AS LONG , BYVAL pCallback AS QUAD , BYVAL scope AS LONG , BYREF pProperties AS LONG , BYVAL cProperties AS LONG , BYREF pRequest AS UiaCacheRequest , BYREF phEvent AS QUAD ) AS LONG
DECLARE FUNCTION UiaRemoveEvent LIB "uiautomationcore.dll" ALIAS "UiaRemoveEvent" ( BYVAL hEvent AS QUAD
 ) AS LONG
DECLARE FUNCTION UiaEventAddWindow LIB "uiautomationcore.dll" ALIAS "UiaEventAddWindow" ( BYVAL hEvent AS DWORD
 , BYVAL hwnd AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaEventRemoveWindow LIB "uiautomationcore.dll" ALIAS "UiaEventRemoveWindow" ( BYVAL hEvent AS DWORD
 , BYVAL hwnd AS DWORD
 ) AS LONG
'// --------------------------------------------------------------------------
'//
'// Pattern methods
'//
'// --------------------------------------------------------------------------
DECLARE FUNCTION DockPattern_SetDockPosition LIB "uiautomationcore.dll" ALIAS "DockPattern_SetDockPosition" ( BYVAL hobj AS QUAD , BYVAL dockPosition AS LONG ) AS LONG
DECLARE FUNCTION ExpandCollapsePattern_Collapse LIB "uiautomationcore.dll" ALIAS "ExpandCollapsePattern_Collapse" ( BYVAL hobj AS QUAD
 ) AS LONG
DECLARE FUNCTION ExpandCollapsePattern_Expand LIB "uiautomationcore.dll" ALIAS "ExpandCollapsePattern_Expand" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION GridPattern_GetItem LIB "uiautomationcore.dll" ALIAS "GridPattern_GetItem" ( BYVAL hobj AS DWORD
 , BYVAL row AS LONG
 , BYVAL column AS LONG
 , BYREF pResult AS DWORD
 ) AS LONG
DECLARE FUNCTION InvokePattern_Invoke LIB "uiautomationcore.dll" ALIAS "InvokePattern_Invoke" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION MultipleViewPattern_GetViewName LIB "uiautomationcore.dll" ALIAS "MultipleViewPattern_GetViewName" ( BYVAL hobj AS DWORD
 , BYVAL viewId AS LONG
 , BYREF ppStr AS WSTRING
 ) AS LONG
DECLARE FUNCTION MultipleViewPattern_SetCurrentView LIB "uiautomationcore.dll" ALIAS "MultipleViewPattern_SetCurrentView" ( BYVAL hobj AS DWORD
 , BYVAL viewId AS LONG
 ) AS LONG
DECLARE FUNCTION RangeValuePattern_SetValue LIB "uiautomationcore.dll" ALIAS "RangeValuePattern_SetValue" ( BYVAL hobj AS DWORD
 , BYVAL val AS DOUBLE
 ) AS LONG
DECLARE FUNCTION ScrollItemPattern_ScrollIntoView LIB "uiautomationcore.dll" ALIAS "ScrollItemPattern_ScrollIntoView" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION ScrollPattern_Scroll LIB "uiautomationcore.dll" ALIAS "ScrollPattern_Scroll" ( BYVAL hobj AS DWORD
 , BYVAL horizontalAmount AS LONG
 , BYVAL verticalAmount AS LONG
 ) AS LONG
DECLARE FUNCTION ScrollPattern_SetScrollPercent LIB "uiautomationcore.dll" ALIAS "ScrollPattern_SetScrollPercent" ( BYVAL hobj AS DWORD
 , BYVAL horizontalAmount AS DOUBLE
 , BYVAL verticalAmount AS DOUBLE
 ) AS LONG
DECLARE FUNCTION SelectionItemPattern_AddToSelection LIB "uiautomationcore.dll" ALIAS "SelectionItemPattern_AddToSelection" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION SelectionItemPattern_RemoveFromSelection LIB "uiautomationcore.dll" ALIAS "SelectionItemPattern_RemoveFromSelection" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION SelectionItemPattern_Select LIB "uiautomationcore.dll" ALIAS "SelectionItemPattern_Select" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION TogglePattern_Toggle LIB "uiautomationcore.dll" ALIAS "TogglePattern_Toggle" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION TransformPattern_Move LIB "uiautomationcore.dll" ALIAS "TransformPattern_Move" ( BYVAL hobj AS DWORD
 , BYVAL x AS DOUBLE
 , BYVAL y AS DOUBLE
 ) AS LONG
DECLARE FUNCTION TransformPattern_Resize LIB "uiautomationcore.dll" ALIAS "TransformPattern_Resize" ( BYVAL hobj AS DWORD
 , BYVAL width AS DOUBLE
 , BYVAL height AS DOUBLE
 ) AS LONG
DECLARE FUNCTION TransformPattern_Rotate LIB "uiautomationcore.dll" ALIAS "TransformPattern_Rotate" ( BYVAL hobj AS DWORD
 , BYVAL degrees AS DOUBLE
 ) AS LONG
DECLARE FUNCTION ValuePattern_SetValue LIB "uiautomationcore.dll" ALIAS "ValuePattern_SetValue" ( BYVAL hobj AS DWORD
 , BYREF pVal AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION WindowPattern_Close LIB "uiautomationcore.dll" ALIAS "WindowPattern_Close" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION WindowPattern_SetWindowVisualState LIB "uiautomationcore.dll" ALIAS "WindowPattern_SetWindowVisualState" ( BYVAL hobj AS DWORD
 , BYVAL state AS LONG
 ) AS LONG
DECLARE FUNCTION WindowPattern_WaitForInputIdle LIB "uiautomationcore.dll" ALIAS "WindowPattern_WaitForInputIdle" ( BYVAL hobj AS DWORD
 , BYVAL milliseconds AS LONG
 , BYREF pResult AS LONG
 ) AS LONG
DECLARE FUNCTION TextPattern_GetSelection LIB "uiautomationcore.dll" ALIAS "TextPattern_GetSelection" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextPattern_GetVisibleRanges LIB "uiautomationcore.dll" ALIAS "TextPattern_GetVisibleRanges" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextPattern_RangeFromChild LIB "uiautomationcore.dll" ALIAS "TextPattern_RangeFromChild" ( BYVAL hobj AS DWORD
 , BYVAL hnodeChild AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextPattern_RangeFromPoint LIB "uiautomationcore.dll" ALIAS "TextPattern_RangeFromPoint" ( BYVAL hobj AS DWORD
 , BYVAL point AS UiaPoint
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextPattern_get_DocumentRange LIB "uiautomationcore.dll" ALIAS "TextPattern_get_DocumentRange" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextPattern_get_SupportedTextSelection LIB "uiautomationcore.dll" ALIAS "TextPattern_get_SupportedTextSelection" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_Clone LIB "uiautomationcore.dll" ALIAS "TextRange_Clone" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_Compare LIB "uiautomationcore.dll" ALIAS "TextRange_Compare" ( BYVAL hobj AS DWORD
 , BYVAL range AS DWORD
 , BYREF pRetVal AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_CompareEndpoints LIB "uiautomationcore.dll" ALIAS "TextRange_CompareEndpoints" ( BYVAL hobj AS DWORD
 , BYVAL endpoint AS LONG
 , BYVAL targetRange AS DWORD
 , BYVAL targetEndpoint AS LONG
 , BYREF pRetVal AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_ExpandToEnclosingUnit LIB "uiautomationcore.dll" ALIAS "TextRange_ExpandToEnclosingUnit" ( BYVAL hobj AS DWORD
 , BYVAL unit AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_GetAttributeValue LIB "uiautomationcore.dll" ALIAS "TextRange_GetAttributeValue" ( BYVAL hobj AS DWORD
 , BYVAL attributeId AS LONG
 , BYREF pRetVal AS VARIANT
 ) AS LONG
DECLARE FUNCTION TextRange_FindAttribute LIB "uiautomationcore.dll" ALIAS "TextRange_FindAttribute" ( BYVAL hobj AS DWORD
 , BYVAL attributeId AS LONG
 , BYVAL val AS VARIANT
 , BYVAL backward AS LONG
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_FindText LIB "uiautomationcore.dll" ALIAS "TextRange_FindText" ( BYVAL hobj AS DWORD
 , BYVAL text AS WSTRING
 , BYVAL backward AS LONG
 , BYVAL ignoreCase AS LONG
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_GetBoundingRectangles LIB "uiautomationcore.dll" ALIAS "TextRange_GetBoundingRectangles" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_GetEnclosingElement LIB "uiautomationcore.dll" ALIAS "TextRange_GetEnclosingElement" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_GetText LIB "uiautomationcore.dll" ALIAS "TextRange_GetText" ( BYVAL hobj AS DWORD
 , BYVAL maxLength AS LONG
 , BYREF pRetVal AS WSTRING
 ) AS LONG
DECLARE FUNCTION TextRange_Move LIB "uiautomationcore.dll" ALIAS "TextRange_Move" ( BYVAL hobj AS DWORD
 , BYVAL unit AS LONG
 , BYVAL count AS LONG
 , BYREF pRetVal AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_MoveEndpointByUnit LIB "uiautomationcore.dll" ALIAS "TextRange_MoveEndpointByUnit" ( BYVAL hobj AS DWORD
 , BYVAL endpoint AS LONG
 , BYVAL unit AS LONG
 , BYVAL count AS LONG
 , BYREF pRetVal AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_MoveEndpointByRange LIB "uiautomationcore.dll" ALIAS "TextRange_MoveEndpointByRange" ( BYVAL hobj AS DWORD
 , BYVAL endpoint AS LONG
 , BYVAL targetRange AS DWORD
 , BYVAL targetEndpoint AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_Select LIB "uiautomationcore.dll" ALIAS "TextRange_Select" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_AddToSelection LIB "uiautomationcore.dll" ALIAS "TextRange_AddToSelection" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_RemoveFromSelection LIB "uiautomationcore.dll" ALIAS "TextRange_RemoveFromSelection" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION TextRange_ScrollIntoView LIB "uiautomationcore.dll" ALIAS "TextRange_ScrollIntoView" ( BYVAL hobj AS DWORD
 , BYVAL alignToTop AS LONG
 ) AS LONG
DECLARE FUNCTION TextRange_GetChildren LIB "uiautomationcore.dll" ALIAS "TextRange_GetChildren" ( BYVAL hobj AS DWORD
 , BYREF pRetVal AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaPatternRelease LIB "uiautomationcore.dll" ALIAS "UiaPatternRelease" ( BYVAL hobj AS DWORD
 ) AS LONG
DECLARE FUNCTION UiaTextRangeRelease LIB "uiautomationcore.dll" ALIAS "UiaTextRangeRelease" ( BYVAL hobj AS DWORD
 ) AS LONG
'// --------------------------------------------------------------------------
'//
'// Provider methods
'//
'// --------------------------------------------------------------------------
DECLARE FUNCTION UiaReturnRawElementProvider LIB "uiautomationcore.dll" ALIAS "UiaReturnRawElementProvider" ( BYVAL hwnd AS QUAD , BYVAL wParam AS QUAD , BYVAL lParam AS LONG , BYVAL el AS IRawElementProviderSimple ) AS LONG ' LRESULT
DECLARE FUNCTION UiaHostProviderFromHwnd LIB "uiautomationcore.dll" ALIAS "UiaHostProviderFromHwnd" ( BYVAL hwnd AS QUAD , BYREF pProvider AS IRawElementProviderSimple ) AS LONG
'// --------------------------------------------------------------------------
'//
'// Other APIs...
'//
'// --------------------------------------------------------------------------
DECLARE FUNCTION UiaHasServerSideProvider LIB "uiautomationcore.dll" ALIAS "UiaHasServerSideProvider" ( BYVAL hwnd AS QUAD ) AS LONG
#ENDIF
