rautomation 2.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gitignore +41 -0
- data/.rspec +2 -0
- data/.yardopts +8 -0
- data/CHANGES.md +276 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +142 -0
- data/Rakefile +73 -0
- data/ext/AutoItX/AutoItX.chm +0 -0
- data/ext/AutoItX/AutoItX3.dll +0 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.cpp +30 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj +179 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.filters +42 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.user +3 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/ReadMe.txt +48 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/dllmain.cpp +19 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.cpp +8 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.h +22 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp +282 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/targetver.h +8 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.sln +31 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.suo +0 -0
- data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/Clicker.cs +63 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/SelectList.cs +116 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/Spinner.cs +46 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TabControl.cs +54 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TableControl.cs +132 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TextControl.cs +50 -0
- data/ext/UiaDll/RAutomation.UIA/Expander.cs +59 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Element.cs +166 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Enumerable.cs +76 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Property.cs +27 -0
- data/ext/UiaDll/RAutomation.UIA/Properties/AssemblyInfo.cs +36 -0
- data/ext/UiaDll/RAutomation.UIA/Properties/AutomationProperties.cs +18 -0
- data/ext/UiaDll/RAutomation.UIA/RAutomation.UIA.csproj +77 -0
- data/ext/UiaDll/Release/RAutomation.UIA.dll +0 -0
- data/ext/UiaDll/Release/UiaDll.dll +0 -0
- data/ext/UiaDll/UiaDll/ArrayHelper.cpp +14 -0
- data/ext/UiaDll/UiaDll/ArrayHelper.h +7 -0
- data/ext/UiaDll/UiaDll/AssemblyInfo.cpp +40 -0
- data/ext/UiaDll/UiaDll/ControlMethods.cpp +16 -0
- data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp +24 -0
- data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.h +16 -0
- data/ext/UiaDll/UiaDll/Locator.cpp +93 -0
- data/ext/UiaDll/UiaDll/Locator.h +55 -0
- data/ext/UiaDll/UiaDll/MenuItemSelector.cpp +75 -0
- data/ext/UiaDll/UiaDll/MenuItemSelector.h +24 -0
- data/ext/UiaDll/UiaDll/MenuMethods.cpp +62 -0
- data/ext/UiaDll/UiaDll/ReadMe.txt +38 -0
- data/ext/UiaDll/UiaDll/SelectListMethods.cpp +84 -0
- data/ext/UiaDll/UiaDll/SpinnerMethods.cpp +61 -0
- data/ext/UiaDll/UiaDll/StringHelper.cpp +57 -0
- data/ext/UiaDll/UiaDll/StringHelper.h +15 -0
- data/ext/UiaDll/UiaDll/StringMethods.cpp +8 -0
- data/ext/UiaDll/UiaDll/TabControlMethods.cpp +40 -0
- data/ext/UiaDll/UiaDll/TableMethods.cpp +108 -0
- data/ext/UiaDll/UiaDll/TextMethods.cpp +25 -0
- data/ext/UiaDll/UiaDll/ToggleStateHelper.h +10 -0
- data/ext/UiaDll/UiaDll/UiaDll.cpp +216 -0
- data/ext/UiaDll/UiaDll/UiaDll.h +13 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +167 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +110 -0
- data/ext/UiaDll/UiaDll/app.ico +0 -0
- data/ext/UiaDll/UiaDll/app.rc +0 -0
- data/ext/UiaDll/UiaDll/dllmain.cpp +1 -0
- data/ext/UiaDll/UiaDll/resource.h +3 -0
- data/ext/UiaDll/UiaDll/stdafx.cpp +5 -0
- data/ext/UiaDll/UiaDll/stdafx.h +41 -0
- data/ext/UiaDll/UiaDll/targetver.h +8 -0
- data/ext/UiaDll/UiaDll.sln +57 -0
- data/ext/WindowsForms/.nuget/NuGet.Config +6 -0
- data/ext/WindowsForms/.nuget/NuGet.exe +0 -0
- data/ext/WindowsForms/.nuget/NuGet.targets +136 -0
- data/ext/WindowsForms/Release/FizzWare.NBuilder.dll +0 -0
- data/ext/WindowsForms/Release/UIA.Extensions.dll +0 -0
- data/ext/WindowsForms/Release/WindowsForms.exe +0 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.Designer.cs +168 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.cs +103 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.resx +123 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +218 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.cs +52 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.Designer.cs +77 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.cs +43 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.resx +120 -0
- data/ext/WindowsForms/WindowsForms/FizzWare.NBuilder.dll +0 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +527 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.cs +109 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.resx +126 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.cs +34 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/Program.cs +21 -0
- data/ext/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
- data/ext/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
- data/ext/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
- data/ext/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
- data/ext/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/UIA.Extensions.dll +0 -0
- data/ext/WindowsForms/WindowsForms/ValueMonthCalendar.cs +28 -0
- data/ext/WindowsForms/WindowsForms/WindowsForms.csproj +166 -0
- data/ext/WindowsForms/WindowsForms/packages.config +4 -0
- data/ext/WindowsForms/WindowsForms.sln +46 -0
- data/lib/rautomation/adapter/autoit/button.rb +59 -0
- data/lib/rautomation/adapter/autoit/locators.rb +22 -0
- data/lib/rautomation/adapter/autoit/mouse.rb +38 -0
- data/lib/rautomation/adapter/autoit/text_field.rb +70 -0
- data/lib/rautomation/adapter/autoit/window.rb +197 -0
- data/lib/rautomation/adapter/autoit.rb +8 -0
- data/lib/rautomation/adapter/helper.rb +64 -0
- data/lib/rautomation/adapter/ms_uia/button.rb +21 -0
- data/lib/rautomation/adapter/ms_uia/button_helper.rb +19 -0
- data/lib/rautomation/adapter/ms_uia/checkbox.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/constants.rb +111 -0
- data/lib/rautomation/adapter/ms_uia/control.rb +134 -0
- data/lib/rautomation/adapter/ms_uia/functions.rb +279 -0
- data/lib/rautomation/adapter/ms_uia/keys.rb +121 -0
- data/lib/rautomation/adapter/ms_uia/keystroke_converter.rb +122 -0
- data/lib/rautomation/adapter/ms_uia/label.rb +18 -0
- data/lib/rautomation/adapter/ms_uia/list_box.rb +46 -0
- data/lib/rautomation/adapter/ms_uia/list_item.rb +22 -0
- data/lib/rautomation/adapter/ms_uia/locators.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/menu.rb +36 -0
- data/lib/rautomation/adapter/ms_uia/radio.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/select_list.rb +85 -0
- data/lib/rautomation/adapter/ms_uia/spinner.rb +31 -0
- data/lib/rautomation/adapter/ms_uia/tab_control.rb +46 -0
- data/lib/rautomation/adapter/ms_uia/table.rb +140 -0
- data/lib/rautomation/adapter/ms_uia/text_field.rb +39 -0
- data/lib/rautomation/adapter/ms_uia/uia_dll.rb +428 -0
- data/lib/rautomation/adapter/ms_uia/value_control.rb +21 -0
- data/lib/rautomation/adapter/ms_uia/window.rb +289 -0
- data/lib/rautomation/adapter/ms_uia.rb +27 -0
- data/lib/rautomation/adapter/win_32/button.rb +14 -0
- data/lib/rautomation/adapter/win_32/button_helper.rb +24 -0
- data/lib/rautomation/adapter/win_32/checkbox.rb +14 -0
- data/lib/rautomation/adapter/win_32/constants.rb +73 -0
- data/lib/rautomation/adapter/win_32/control.rb +86 -0
- data/lib/rautomation/adapter/win_32/functions.rb +336 -0
- data/lib/rautomation/adapter/win_32/keys.rb +146 -0
- data/lib/rautomation/adapter/win_32/label.rb +10 -0
- data/lib/rautomation/adapter/win_32/list_box.rb +40 -0
- data/lib/rautomation/adapter/win_32/locators.rb +22 -0
- data/lib/rautomation/adapter/win_32/mouse.rb +59 -0
- data/lib/rautomation/adapter/win_32/password_field.rb +15 -0
- data/lib/rautomation/adapter/win_32/radio.rb +11 -0
- data/lib/rautomation/adapter/win_32/select_list.rb +97 -0
- data/lib/rautomation/adapter/win_32/table.rb +25 -0
- data/lib/rautomation/adapter/win_32/text_field.rb +52 -0
- data/lib/rautomation/adapter/win_32/window.rb +277 -0
- data/lib/rautomation/adapter/win_32.rb +23 -0
- data/lib/rautomation/button.rb +55 -0
- data/lib/rautomation/element_collections.rb +55 -0
- data/lib/rautomation/platform.rb +15 -0
- data/lib/rautomation/text_field.rb +60 -0
- data/lib/rautomation/version.rb +3 -0
- data/lib/rautomation/wait_helper.rb +23 -0
- data/lib/rautomation/window.rb +248 -0
- data/lib/rautomation.rb +8 -0
- data/rautomation.gemspec +52 -0
- data/spec/adapter/autoit/mouse_spec.rb +53 -0
- data/spec/adapter/autoit/window_spec.rb +17 -0
- data/spec/adapter/ms_uia/button_spec.rb +39 -0
- data/spec/adapter/ms_uia/checkbox_spec.rb +55 -0
- data/spec/adapter/ms_uia/control_spec.rb +88 -0
- data/spec/adapter/ms_uia/functions_spec.rb +39 -0
- data/spec/adapter/ms_uia/keystroke_converter_spec.rb +48 -0
- data/spec/adapter/ms_uia/label_spec.rb +18 -0
- data/spec/adapter/ms_uia/list_item_spec.rb +14 -0
- data/spec/adapter/ms_uia/listbox_spec.rb +73 -0
- data/spec/adapter/ms_uia/radio_spec.rb +39 -0
- data/spec/adapter/ms_uia/select_list_spec.rb +118 -0
- data/spec/adapter/ms_uia/spinner_spec.rb +44 -0
- data/spec/adapter/ms_uia/tab_control_spec.rb +53 -0
- data/spec/adapter/ms_uia/table_spec.rb +197 -0
- data/spec/adapter/ms_uia/text_field_spec.rb +43 -0
- data/spec/adapter/ms_uia/value_control_spec.rb +11 -0
- data/spec/adapter/ms_uia/window_spec.rb +81 -0
- data/spec/adapter/win_32/button_spec.rb +31 -0
- data/spec/adapter/win_32/checkbox_spec.rb +46 -0
- data/spec/adapter/win_32/label_spec.rb +13 -0
- data/spec/adapter/win_32/listbox_spec.rb +41 -0
- data/spec/adapter/win_32/mouse_spec.rb +49 -0
- data/spec/adapter/win_32/radio_spec.rb +33 -0
- data/spec/adapter/win_32/select_list_spec.rb +65 -0
- data/spec/adapter/win_32/table_spec.rb +27 -0
- data/spec/adapter/win_32/text_field_spec.rb +24 -0
- data/spec/adapter/win_32/window_spec.rb +61 -0
- data/spec/button_spec.rb +67 -0
- data/spec/buttons_spec.rb +21 -0
- data/spec/spec_helper.rb +128 -0
- data/spec/text_field_spec.rb +64 -0
- data/spec/text_fields_spec.rb +22 -0
- data/spec/window_spec.rb +150 -0
- data/spec/windows_spec.rb +76 -0
- metadata +369 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
4
|
+
<ProjectConfiguration Include="Debug|Win32">
|
5
|
+
<Configuration>Debug</Configuration>
|
6
|
+
<Platform>Win32</Platform>
|
7
|
+
</ProjectConfiguration>
|
8
|
+
<ProjectConfiguration Include="Debug|x64">
|
9
|
+
<Configuration>Debug</Configuration>
|
10
|
+
<Platform>x64</Platform>
|
11
|
+
</ProjectConfiguration>
|
12
|
+
<ProjectConfiguration Include="Release|Win32">
|
13
|
+
<Configuration>Release</Configuration>
|
14
|
+
<Platform>Win32</Platform>
|
15
|
+
</ProjectConfiguration>
|
16
|
+
<ProjectConfiguration Include="Release|x64">
|
17
|
+
<Configuration>Release</Configuration>
|
18
|
+
<Platform>x64</Platform>
|
19
|
+
</ProjectConfiguration>
|
20
|
+
</ItemGroup>
|
21
|
+
<PropertyGroup Label="Globals">
|
22
|
+
<ProjectGuid>{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}</ProjectGuid>
|
23
|
+
<Keyword>Win32Proj</Keyword>
|
24
|
+
<RootNamespace>IAccessibleDLL</RootNamespace>
|
25
|
+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
26
|
+
</PropertyGroup>
|
27
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
28
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
29
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
30
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
31
|
+
<CharacterSet>Unicode</CharacterSet>
|
32
|
+
<PlatformToolset>v143</PlatformToolset>
|
33
|
+
</PropertyGroup>
|
34
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
35
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
36
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
37
|
+
<CharacterSet>Unicode</CharacterSet>
|
38
|
+
<PlatformToolset>v143</PlatformToolset>
|
39
|
+
</PropertyGroup>
|
40
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
41
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
42
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
43
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
44
|
+
<CharacterSet>Unicode</CharacterSet>
|
45
|
+
<PlatformToolset>v143</PlatformToolset>
|
46
|
+
</PropertyGroup>
|
47
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
48
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
49
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
50
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
51
|
+
<CharacterSet>Unicode</CharacterSet>
|
52
|
+
<PlatformToolset>v143</PlatformToolset>
|
53
|
+
</PropertyGroup>
|
54
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
55
|
+
<ImportGroup Label="ExtensionSettings">
|
56
|
+
</ImportGroup>
|
57
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
58
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
59
|
+
</ImportGroup>
|
60
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
61
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
62
|
+
</ImportGroup>
|
63
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
64
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
65
|
+
</ImportGroup>
|
66
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
67
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
68
|
+
</ImportGroup>
|
69
|
+
<PropertyGroup Label="UserMacros" />
|
70
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
71
|
+
<LinkIncremental>true</LinkIncremental>
|
72
|
+
</PropertyGroup>
|
73
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
74
|
+
<LinkIncremental>true</LinkIncremental>
|
75
|
+
</PropertyGroup>
|
76
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
77
|
+
<LinkIncremental>false</LinkIncremental>
|
78
|
+
<OutDir>$(SolutionDir)$(PlatformTarget)$(Configuration)\</OutDir>
|
79
|
+
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
80
|
+
</PropertyGroup>
|
81
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
82
|
+
<LinkIncremental>false</LinkIncremental>
|
83
|
+
<OutDir>$(SolutionDir)$(PlatformTarget)$(Configuration)\</OutDir>
|
84
|
+
</PropertyGroup>
|
85
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
86
|
+
<ClCompile>
|
87
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
88
|
+
<WarningLevel>Level3</WarningLevel>
|
89
|
+
<Optimization>Disabled</Optimization>
|
90
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
91
|
+
</ClCompile>
|
92
|
+
<Link>
|
93
|
+
<SubSystem>Windows</SubSystem>
|
94
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
95
|
+
</Link>
|
96
|
+
</ItemDefinitionGroup>
|
97
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
98
|
+
<ClCompile>
|
99
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
100
|
+
<WarningLevel>Level3</WarningLevel>
|
101
|
+
<Optimization>Disabled</Optimization>
|
102
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
103
|
+
</ClCompile>
|
104
|
+
<Link>
|
105
|
+
<SubSystem>Windows</SubSystem>
|
106
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
107
|
+
</Link>
|
108
|
+
</ItemDefinitionGroup>
|
109
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
110
|
+
<ClCompile>
|
111
|
+
<WarningLevel>Level3</WarningLevel>
|
112
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
113
|
+
<Optimization>MaxSpeed</Optimization>
|
114
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
115
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
116
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
117
|
+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
118
|
+
</ClCompile>
|
119
|
+
<Link>
|
120
|
+
<SubSystem>Windows</SubSystem>
|
121
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
122
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
123
|
+
<OptimizeReferences>true</OptimizeReferences>
|
124
|
+
<AdditionalDependencies>oleacc.lib;comsuppw.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
125
|
+
</Link>
|
126
|
+
</ItemDefinitionGroup>
|
127
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
128
|
+
<ClCompile>
|
129
|
+
<WarningLevel>Level3</WarningLevel>
|
130
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
131
|
+
<Optimization>MaxSpeed</Optimization>
|
132
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
133
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
134
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IACCESSIBLEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
135
|
+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
136
|
+
</ClCompile>
|
137
|
+
<Link>
|
138
|
+
<SubSystem>Windows</SubSystem>
|
139
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
140
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
141
|
+
<OptimizeReferences>true</OptimizeReferences>
|
142
|
+
<AdditionalDependencies>oleacc.lib;comsuppw.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
143
|
+
</Link>
|
144
|
+
</ItemDefinitionGroup>
|
145
|
+
<ItemGroup>
|
146
|
+
<None Include="ReadMe.txt" />
|
147
|
+
</ItemGroup>
|
148
|
+
<ItemGroup>
|
149
|
+
<ClInclude Include="stdafx.h" />
|
150
|
+
<ClInclude Include="targetver.h" />
|
151
|
+
</ItemGroup>
|
152
|
+
<ItemGroup>
|
153
|
+
<ClCompile Include="dllmain.cpp">
|
154
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
155
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
156
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
157
|
+
</PrecompiledHeader>
|
158
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
159
|
+
</PrecompiledHeader>
|
160
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
161
|
+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
162
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
163
|
+
</PrecompiledHeader>
|
164
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
165
|
+
</PrecompiledHeader>
|
166
|
+
</ClCompile>
|
167
|
+
<ClCompile Include="IAccessibleDLL.cpp" />
|
168
|
+
<ClCompile Include="stdafx.cpp">
|
169
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
170
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
171
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
172
|
+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
173
|
+
</ClCompile>
|
174
|
+
<ClCompile Include="table_support.cpp" />
|
175
|
+
</ItemGroup>
|
176
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
177
|
+
<ImportGroup Label="ExtensionTargets">
|
178
|
+
</ImportGroup>
|
179
|
+
</Project>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup>
|
4
|
+
<Filter Include="Source Files">
|
5
|
+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
6
|
+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
7
|
+
</Filter>
|
8
|
+
<Filter Include="Header Files">
|
9
|
+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
10
|
+
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
11
|
+
</Filter>
|
12
|
+
<Filter Include="Resource Files">
|
13
|
+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
14
|
+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
15
|
+
</Filter>
|
16
|
+
</ItemGroup>
|
17
|
+
<ItemGroup>
|
18
|
+
<None Include="ReadMe.txt" />
|
19
|
+
</ItemGroup>
|
20
|
+
<ItemGroup>
|
21
|
+
<ClInclude Include="stdafx.h">
|
22
|
+
<Filter>Header Files</Filter>
|
23
|
+
</ClInclude>
|
24
|
+
<ClInclude Include="targetver.h">
|
25
|
+
<Filter>Header Files</Filter>
|
26
|
+
</ClInclude>
|
27
|
+
</ItemGroup>
|
28
|
+
<ItemGroup>
|
29
|
+
<ClCompile Include="stdafx.cpp">
|
30
|
+
<Filter>Source Files</Filter>
|
31
|
+
</ClCompile>
|
32
|
+
<ClCompile Include="IAccessibleDLL.cpp">
|
33
|
+
<Filter>Source Files</Filter>
|
34
|
+
</ClCompile>
|
35
|
+
<ClCompile Include="dllmain.cpp">
|
36
|
+
<Filter>Source Files</Filter>
|
37
|
+
</ClCompile>
|
38
|
+
<ClCompile Include="table_support.cpp">
|
39
|
+
<Filter>Source Files</Filter>
|
40
|
+
</ClCompile>
|
41
|
+
</ItemGroup>
|
42
|
+
</Project>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
========================================================================
|
2
|
+
DYNAMIC LINK LIBRARY : IAccessibleDLL Project Overview
|
3
|
+
========================================================================
|
4
|
+
|
5
|
+
AppWizard has created this IAccessibleDLL DLL for you.
|
6
|
+
|
7
|
+
This file contains a summary of what you will find in each of the files that
|
8
|
+
make up your IAccessibleDLL application.
|
9
|
+
|
10
|
+
|
11
|
+
IAccessibleDLL.vcxproj
|
12
|
+
This is the main project file for VC++ projects generated using an Application Wizard.
|
13
|
+
It contains information about the version of Visual C++ that generated the file, and
|
14
|
+
information about the platforms, configurations, and project features selected with the
|
15
|
+
Application Wizard.
|
16
|
+
|
17
|
+
IAccessibleDLL.vcxproj.filters
|
18
|
+
This is the filters file for VC++ projects generated using an Application Wizard.
|
19
|
+
It contains information about the association between the files in your project
|
20
|
+
and the filters. This association is used in the IDE to show grouping of files with
|
21
|
+
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
|
22
|
+
"Source Files" filter).
|
23
|
+
|
24
|
+
IAccessibleDLL.cpp
|
25
|
+
This is the main DLL source file.
|
26
|
+
|
27
|
+
When created, this DLL does not export any symbols. As a result, it
|
28
|
+
will not produce a .lib file when it is built. If you wish this project
|
29
|
+
to be a project dependency of some other project, you will either need to
|
30
|
+
add code to export some symbols from the DLL so that an export library
|
31
|
+
will be produced, or you can set the Ignore Input Library property to Yes
|
32
|
+
on the General propert page of the Linker folder in the project's Property
|
33
|
+
Pages dialog box.
|
34
|
+
|
35
|
+
/////////////////////////////////////////////////////////////////////////////
|
36
|
+
Other standard files:
|
37
|
+
|
38
|
+
StdAfx.h, StdAfx.cpp
|
39
|
+
These files are used to build a precompiled header (PCH) file
|
40
|
+
named IAccessibleDLL.pch and a precompiled types file named StdAfx.obj.
|
41
|
+
|
42
|
+
/////////////////////////////////////////////////////////////////////////////
|
43
|
+
Other notes:
|
44
|
+
|
45
|
+
AppWizard uses "TODO:" comments to indicate parts of the source code you
|
46
|
+
should add to or customize.
|
47
|
+
|
48
|
+
/////////////////////////////////////////////////////////////////////////////
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// dllmain.cpp : Defines the entry point for the DLL application.
|
2
|
+
#include "stdafx.h"
|
3
|
+
|
4
|
+
BOOL APIENTRY DllMain( HMODULE hModule,
|
5
|
+
DWORD ul_reason_for_call,
|
6
|
+
LPVOID lpReserved
|
7
|
+
)
|
8
|
+
{
|
9
|
+
switch (ul_reason_for_call)
|
10
|
+
{
|
11
|
+
case DLL_PROCESS_ATTACH:
|
12
|
+
case DLL_THREAD_ATTACH:
|
13
|
+
case DLL_THREAD_DETACH:
|
14
|
+
case DLL_PROCESS_DETACH:
|
15
|
+
break;
|
16
|
+
}
|
17
|
+
return TRUE;
|
18
|
+
}
|
19
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// stdafx.cpp : source file that includes just the standard includes
|
2
|
+
// IAccessibleDLL.pch will be the pre-compiled header
|
3
|
+
// stdafx.obj will contain the pre-compiled type information
|
4
|
+
|
5
|
+
#include "stdafx.h"
|
6
|
+
|
7
|
+
// TODO: reference any additional headers you need in STDAFX.H
|
8
|
+
// and not in this file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// stdafx.h : include file for standard system include files,
|
2
|
+
// or project specific include files that are used frequently, but
|
3
|
+
// are changed infrequently
|
4
|
+
//
|
5
|
+
|
6
|
+
#pragma once
|
7
|
+
|
8
|
+
#include "targetver.h"
|
9
|
+
|
10
|
+
#include <stdlib.h>
|
11
|
+
|
12
|
+
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
13
|
+
|
14
|
+
#include <stdio.h>
|
15
|
+
#include <tchar.h>
|
16
|
+
#include <windows.h>
|
17
|
+
#include <objbase.h>
|
18
|
+
#include <OleAcc.h>
|
19
|
+
#include <Commctrl.h>
|
20
|
+
#include <comutil.h>
|
21
|
+
|
22
|
+
// TODO: reference additional headers your program requires here
|
@@ -0,0 +1,282 @@
|
|
1
|
+
#include "stdafx.h"
|
2
|
+
|
3
|
+
#define BUFFER_SIZE 255
|
4
|
+
|
5
|
+
long get_number_of_rows(IAccessible *pAccessible) {
|
6
|
+
long count ;
|
7
|
+
|
8
|
+
pAccessible->get_accChildCount(&count) ;
|
9
|
+
return count ;
|
10
|
+
}
|
11
|
+
|
12
|
+
void get_name(long childId, IAccessible *pAccessible, char *itemText) {
|
13
|
+
BSTR bstrValue ;
|
14
|
+
|
15
|
+
VARIANT varIn ;
|
16
|
+
VariantInit(&varIn) ;
|
17
|
+
varIn.vt = VT_I4 ;
|
18
|
+
varIn.lVal = childId ;
|
19
|
+
|
20
|
+
if (pAccessible->get_accName(varIn, &bstrValue) == S_OK) {
|
21
|
+
char *pszName = _com_util::ConvertBSTRToString(bstrValue) ;
|
22
|
+
strcpy(itemText, pszName) ;
|
23
|
+
delete[] pszName ;
|
24
|
+
SysFreeString(bstrValue) ;
|
25
|
+
} else
|
26
|
+
strcpy(itemText, "\0") ;
|
27
|
+
}
|
28
|
+
|
29
|
+
HRESULT get_role(long childId, IAccessible *pAccessible, long *pRole) {
|
30
|
+
VARIANT varIn ;
|
31
|
+
VariantInit(&varIn) ;
|
32
|
+
varIn.vt = VT_I4 ;
|
33
|
+
varIn.lVal = childId ;
|
34
|
+
|
35
|
+
VARIANT varOut ;
|
36
|
+
VariantInit(&varOut) ;
|
37
|
+
varOut.vt = VT_I4 ;
|
38
|
+
|
39
|
+
HRESULT hr = pAccessible->get_accRole(varIn, &varOut) ;
|
40
|
+
*pRole = varOut.lVal ;
|
41
|
+
|
42
|
+
return hr ;
|
43
|
+
}
|
44
|
+
|
45
|
+
void get_role(long childId, IAccessible *pAccessible, char *itemText) {
|
46
|
+
long role ;
|
47
|
+
|
48
|
+
if (get_role(childId, pAccessible, &role) == S_OK) {
|
49
|
+
int roleTextMax = 255 ;
|
50
|
+
LPTSTR pRoleText = new TCHAR[roleTextMax] ;
|
51
|
+
GetRoleText(role, pRoleText, roleTextMax) ;
|
52
|
+
|
53
|
+
int lenSzRoleText = 255 ;
|
54
|
+
char *pszRoleText = new char[lenSzRoleText] ;
|
55
|
+
WideCharToMultiByte(CP_ACP, 0, pRoleText, wcslen(pRoleText) + 1, pszRoleText, lenSzRoleText, NULL, NULL) ;
|
56
|
+
|
57
|
+
sprintf(itemText, "0x%x, %s", role, pszRoleText) ;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
void get_description(long childId, IAccessible *pAccessible, char *itemText) {
|
62
|
+
BSTR bstrValue ;
|
63
|
+
|
64
|
+
VARIANT varIn ;
|
65
|
+
VariantInit(&varIn) ;
|
66
|
+
varIn.vt = VT_I4 ;
|
67
|
+
varIn.lVal = childId ;
|
68
|
+
|
69
|
+
if (pAccessible->get_accDescription(varIn, &bstrValue) == S_OK) {
|
70
|
+
char *pszName = _com_util::ConvertBSTRToString(bstrValue) ;
|
71
|
+
strcpy(itemText, pszName) ;
|
72
|
+
delete[] pszName ;
|
73
|
+
SysFreeString(bstrValue) ;
|
74
|
+
} else
|
75
|
+
strcpy(itemText, "\0") ;
|
76
|
+
}
|
77
|
+
|
78
|
+
void walk_tree(IAccessible *pAccessible, char **pColumnHeaderNames, long *pColumnHeadersCount) {
|
79
|
+
HRESULT hr ;
|
80
|
+
long childCount ;
|
81
|
+
|
82
|
+
hr = pAccessible->get_accChildCount(&childCount) ;
|
83
|
+
if (FAILED(hr) || childCount == 0)
|
84
|
+
return ;
|
85
|
+
|
86
|
+
VARIANT *pChildVariants = new VARIANT[childCount] ;
|
87
|
+
long childrenFound ;
|
88
|
+
hr = AccessibleChildren(pAccessible, 0, childCount, pChildVariants, &childrenFound) ;
|
89
|
+
if (FAILED(hr))
|
90
|
+
return ;
|
91
|
+
|
92
|
+
for (int i=1; i < childrenFound + 1; i++) {
|
93
|
+
VARIANT vChild = pChildVariants[i] ;
|
94
|
+
if (vChild.vt == VT_DISPATCH) {
|
95
|
+
IDispatch *pDispatch = vChild.pdispVal ;
|
96
|
+
IAccessible *pChildAccessible = NULL ;
|
97
|
+
hr = pDispatch->QueryInterface(IID_IAccessible, (void**) &pChildAccessible) ;
|
98
|
+
if (hr == S_OK) {
|
99
|
+
walk_tree(pChildAccessible, pColumnHeaderNames, pColumnHeadersCount) ;
|
100
|
+
|
101
|
+
pChildAccessible->Release() ;
|
102
|
+
}
|
103
|
+
|
104
|
+
pDispatch->Release() ;
|
105
|
+
} else {
|
106
|
+
long role ;
|
107
|
+
get_role(i, pAccessible, &role) ;
|
108
|
+
if (role == 0x19) {
|
109
|
+
if (pColumnHeaderNames == NULL) {
|
110
|
+
*pColumnHeadersCount = *pColumnHeadersCount + 1 ;
|
111
|
+
} else {
|
112
|
+
char *headerName = (char *)malloc(sizeof(char) * BUFFER_SIZE) ;
|
113
|
+
get_name(i, pAccessible, headerName) ;
|
114
|
+
pColumnHeaderNames[i - 1] = headerName ;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
void find_column_headers(IAccessible *pAccessible, char ***pHeaderNames, long *pColumns) {
|
122
|
+
long columns = 0 ;
|
123
|
+
|
124
|
+
walk_tree(pAccessible, NULL, &columns) ;
|
125
|
+
|
126
|
+
char **pHeaders = (char **)malloc(sizeof(char *) * columns) ;
|
127
|
+
walk_tree(pAccessible, pHeaders, &columns) ;
|
128
|
+
|
129
|
+
*pHeaderNames = pHeaders ;
|
130
|
+
*pColumns = columns ;
|
131
|
+
}
|
132
|
+
|
133
|
+
char *trimwhitespace(char *str) {
|
134
|
+
char *end;
|
135
|
+
// Trim leading space
|
136
|
+
while(isspace(*str))
|
137
|
+
str++;
|
138
|
+
if(*str == 0)
|
139
|
+
// All spaces?
|
140
|
+
return str;
|
141
|
+
// Trim trailing space
|
142
|
+
end = str + strlen(str) - 1;
|
143
|
+
|
144
|
+
while(end > str && isspace(*end))
|
145
|
+
end--; // Write new null terminator
|
146
|
+
|
147
|
+
*(end+1) = 0;
|
148
|
+
|
149
|
+
return str;
|
150
|
+
}
|
151
|
+
|
152
|
+
char* remove_column_header_name(char *columnName, char *item) {
|
153
|
+
int itemLen = strlen(item) ;
|
154
|
+
int columnNameLen = strlen(columnName) ;
|
155
|
+
|
156
|
+
if (itemLen > 0) {
|
157
|
+
char *newItem = (char *)malloc(sizeof(char *) * (itemLen - columnNameLen)) ; // still a bit too long
|
158
|
+
|
159
|
+
strcpy(newItem, item + columnNameLen + 2) ; // :<space>
|
160
|
+
|
161
|
+
free(item) ;
|
162
|
+
return newItem ;
|
163
|
+
} else
|
164
|
+
return item ;
|
165
|
+
}
|
166
|
+
|
167
|
+
extern "C"
|
168
|
+
__declspec( dllexport ) void get_table_strings(HMODULE oleAccModule, HWND controlHwnd, void **tableStrings, long *numberOfRowsOut, long *numberOfColumnsOut) {
|
169
|
+
// * to *[] to *[] to * string
|
170
|
+
IAccessible *pAccessible ;
|
171
|
+
LPFNACCESSIBLEOBJECTFROMWINDOW lpfnAccessibleObjectFromWindow ;
|
172
|
+
|
173
|
+
lpfnAccessibleObjectFromWindow = (LPFNACCESSIBLEOBJECTFROMWINDOW)GetProcAddress(oleAccModule, "AccessibleObjectFromWindow");
|
174
|
+
|
175
|
+
if (HRESULT hResult = lpfnAccessibleObjectFromWindow(controlHwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccessible) == S_OK) {
|
176
|
+
int numberOfRows = get_number_of_rows(pAccessible) ; // including the header
|
177
|
+
long numberOfColumns = 3 ;
|
178
|
+
char ***table_rows ;
|
179
|
+
char **pHeaderNames ;
|
180
|
+
|
181
|
+
find_column_headers(pAccessible, &pHeaderNames, &numberOfColumns) ;
|
182
|
+
|
183
|
+
table_rows = (char ***)malloc(sizeof(char*) * numberOfRows) ;
|
184
|
+
table_rows[0] = pHeaderNames ;
|
185
|
+
|
186
|
+
for (int row = 1; row < numberOfRows; row++) {
|
187
|
+
char **table_row = (char **)malloc(sizeof(char*) * numberOfColumns) ;
|
188
|
+
|
189
|
+
char *mainItem = (char *)malloc(sizeof(char) * BUFFER_SIZE) ;
|
190
|
+
get_name(row, pAccessible, mainItem) ;
|
191
|
+
|
192
|
+
char *description = (char *)malloc(sizeof(char) * 2048) ;
|
193
|
+
get_description(row, pAccessible, description) ;
|
194
|
+
|
195
|
+
char *token ;
|
196
|
+
if (strlen(description) > 0)
|
197
|
+
token = strtok(description, ",") ;
|
198
|
+
else
|
199
|
+
token = NULL ;
|
200
|
+
|
201
|
+
for (int column = 0; column < numberOfColumns; column++) {
|
202
|
+
if (column == 0)
|
203
|
+
table_row[column] = mainItem ;
|
204
|
+
else {
|
205
|
+
char *item = (char *)malloc(sizeof(char) * BUFFER_SIZE) ;
|
206
|
+
|
207
|
+
if (token != NULL) {
|
208
|
+
strcpy(item, token) ;
|
209
|
+
token = strtok(NULL, ",") ;
|
210
|
+
} else
|
211
|
+
strcpy(item, "\0") ;
|
212
|
+
|
213
|
+
table_row[column] = remove_column_header_name(pHeaderNames[column], trimwhitespace(item)) ;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
table_rows[row] = table_row ;
|
218
|
+
}
|
219
|
+
|
220
|
+
*tableStrings = table_rows ;
|
221
|
+
*numberOfRowsOut = numberOfRows ;
|
222
|
+
*numberOfColumnsOut = numberOfColumns ;
|
223
|
+
} else {
|
224
|
+
*numberOfRowsOut = 0 ;
|
225
|
+
*numberOfColumnsOut = 0 ;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
extern "C"
|
230
|
+
__declspec( dllexport ) void get_table_row_strings(HMODULE oleAccModule, HWND controlHwnd, void **pTableRow, long row, long *pColumns) {
|
231
|
+
long rows ;
|
232
|
+
long columns ;
|
233
|
+
char *tableStrings ; // pointer to array
|
234
|
+
|
235
|
+
get_table_strings(oleAccModule, controlHwnd, (void **)&tableStrings, &rows, &columns) ;
|
236
|
+
|
237
|
+
*pTableRow = ((char ***)tableStrings)[row] ;
|
238
|
+
*pColumns = columns ;
|
239
|
+
}
|
240
|
+
|
241
|
+
extern "C"
|
242
|
+
__declspec( dllexport ) void select_table_row(HMODULE oleAccModule, HWND controlHwnd, long row) {
|
243
|
+
IAccessible *pAccessible ;
|
244
|
+
LPFNACCESSIBLEOBJECTFROMWINDOW lpfnAccessibleObjectFromWindow ;
|
245
|
+
|
246
|
+
lpfnAccessibleObjectFromWindow = (LPFNACCESSIBLEOBJECTFROMWINDOW)GetProcAddress(oleAccModule, "AccessibleObjectFromWindow");
|
247
|
+
|
248
|
+
if (HRESULT hResult = lpfnAccessibleObjectFromWindow(controlHwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccessible) == S_OK) {
|
249
|
+
VARIANT varChild ;
|
250
|
+
VariantInit(&varChild) ;
|
251
|
+
varChild.vt = VT_I4 ;
|
252
|
+
varChild.lVal = row ;
|
253
|
+
|
254
|
+
pAccessible->accSelect(SELFLAG_ADDSELECTION, varChild) ;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
extern "C"
|
259
|
+
__declspec( dllexport ) long get_table_row_state(HMODULE oleAccModule, HWND controlHwnd, long row) {
|
260
|
+
IAccessible *pAccessible ;
|
261
|
+
LPFNACCESSIBLEOBJECTFROMWINDOW lpfnAccessibleObjectFromWindow ;
|
262
|
+
|
263
|
+
lpfnAccessibleObjectFromWindow = (LPFNACCESSIBLEOBJECTFROMWINDOW)GetProcAddress(oleAccModule, "AccessibleObjectFromWindow");
|
264
|
+
|
265
|
+
if (HRESULT hResult = lpfnAccessibleObjectFromWindow(controlHwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccessible) == S_OK) {
|
266
|
+
VARIANT varChild ;
|
267
|
+
VariantInit(&varChild) ;
|
268
|
+
varChild.vt = VT_I4 ;
|
269
|
+
varChild.lVal = row ;
|
270
|
+
|
271
|
+
VARIANT varState ;
|
272
|
+
|
273
|
+
HRESULT hr = pAccessible->get_accState(varChild, &varState) ;
|
274
|
+
if (hr == S_OK) {
|
275
|
+
if (varState.vt == VT_I4) {
|
276
|
+
return varState.lVal ;
|
277
|
+
} else
|
278
|
+
return FALSE ;
|
279
|
+
} else
|
280
|
+
return FALSE ;
|
281
|
+
}
|
282
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
// Including SDKDDKVer.h defines the highest available Windows platform.
|
4
|
+
|
5
|
+
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
6
|
+
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
7
|
+
|
8
|
+
#include <SDKDDKVer.h>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
3
|
+
# Visual Studio 15
|
4
|
+
VisualStudioVersion = 15.0.28307.1433
|
5
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
6
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IAccessibleDLL", "IAccessibleDLL\IAccessibleDLL.vcxproj", "{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}"
|
7
|
+
EndProject
|
8
|
+
Global
|
9
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
10
|
+
Debug|Win32 = Debug|Win32
|
11
|
+
Debug|x64 = Debug|x64
|
12
|
+
Release|Win32 = Release|Win32
|
13
|
+
Release|x64 = Release|x64
|
14
|
+
EndGlobalSection
|
15
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
16
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|Win32.ActiveCfg = Debug|Win32
|
17
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|Win32.Build.0 = Debug|Win32
|
18
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|x64.ActiveCfg = Debug|x64
|
19
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Debug|x64.Build.0 = Debug|x64
|
20
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|Win32.ActiveCfg = Release|Win32
|
21
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|Win32.Build.0 = Release|Win32
|
22
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|x64.ActiveCfg = Release|x64
|
23
|
+
{CCE6C620-932C-4B59-A2DA-E11E279F4D9A}.Release|x64.Build.0 = Release|x64
|
24
|
+
EndGlobalSection
|
25
|
+
GlobalSection(SolutionProperties) = preSolution
|
26
|
+
HideSolutionNode = FALSE
|
27
|
+
EndGlobalSection
|
28
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
29
|
+
SolutionGuid = {C2FC391A-95D8-4338-B7D4-149E4AE6B5ED}
|
30
|
+
EndGlobalSection
|
31
|
+
EndGlobal
|
Binary file
|
Binary file
|