Steps for building a11y-msaa.dll/a11y-ia2.dll
Requirements
- MicroSoft Visual Studio 2005
- JDK (java5 or later)
- Windows environment
1. Creating a new Visual C++ win32 project
- Go to File Menu->New->Project->Visual
C++->Win32->Win32 Project.
- Type in the project name and the location (
Eg: Project a11y-msaa or
a11y-ia2 in location C:\MyProjects) and clik
OK.
- A Win32 Application wizard pops up, Press 'Next 'on the
welcome screen.
- In Application settings screen, Choose 'DLL' for 'Application
type' and check 'empty project' for 'Additional Options' and press 'Finish'.
A directory with the project name will be created
in the chosen location. ( C:\MyProjects\a11y-msaa or
C:\MyProjects\a11y-ia2).
2. Copying the required source files and idl file
The following are the Msaa source files (.h and .cpp)
which can be obtained from the
org.a11y.utils.accprobe.accservice.core.win32.msaa-fragment project in
bin-src folder.
- Accessible.h
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaAccessible.h
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaAccessibilityEventService.h
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaWindowService.h
- Accessible.cpp
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaAccessible.cpp
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaAccessibilityEventService.cpp
- org_a11y_utils_accprobe_accservice_core_win32_msaa_MsaaWindowService.cpp
- ia2_api_all.idl ( http://accessibility.freestandards.org/a11yspecs/ia2/ia2_api_all.idl)
The following are the IA2 source
files (.h and .cpp) which can be obtained from the
org.a11y.utils.accprobe.accservice.core.win32.ia2-fragment project in
bin-src folder.
- CAccessible2.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2Accessible.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleAction.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleApplication.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleComponent.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleEditableText.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleHyperlink.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleHypertext.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleImage.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTable.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTable2.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTableCell.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleText.h
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleValue.h
- CAccessible2.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2Accessible.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleAction.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleApplication.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleComponent.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleEditableText.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleHyperlink.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleHypertext.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleImage.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTable.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTable2.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleTableCell.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleText.cpp
- org_a11y_utils_accprobe_accservice_core_win32_ia2_IA2AccessibleValue.cpp
- ia2_api_all.idl ( http://accessibility.freestandards.org/a11yspecs/ia2/ia2_api_all.idl)
Copy all of the above files into the project directory ( Eg: C:\MyProjects\a11y-msaa or
C:\MyProjects\a11y-ia2).
In solution explorer, right click on Header files-> Add existing
Item and select all of the header files. Similarly, add all .cpp files to Source files and
ia2_api_all.idl to Resource files.
2. Setting the project properties
- If you've not chosen the project name as 'a11y-msaa' or
'a11y-ia2' in the step 1, right click on the project in solution explorer and
rename it to 'a11y-msaa' or 'a11y-ia2' respectively. The dll has the same name as the project by default and we
want the dll names to be 'a11y-msaa.dll' and
'a11y-ia2.dll'.
- Choose the desired build configuration, Release or Debug. You
can choose this on Build Menu-> Configuration Manager.
- Right click on project->Properties. In the properties
window, make sure you select the desired configuration, Release or Debug.
- In Configuration
properties->C/C++->General->Additional Include directories:
Add the paths for include and
include/win32 folders in jdk directory. Eg: "C:\Java6\jdk\include";"C:\Java6\jdk\include\win32".
If you have JDK directory setup as the JAVA_HOME environment variable, it is
easier to use the following include path:
"$(JAVA_HOME)\include";"$(JAVA_HOME)\include\win32"
- For a11y-ia2 project, also add the path of the a11y-msaa
source files.
(Eg:
"C:\Java6\jdk\include";"C:\Java6\jdk\include\win32";"C:\My
projects\a11y-msaa").
- For 'a11y-msaa' project, In Configuration
properties->C/C++->Proprocessor->Preprocessor definitions: Add
CACCESSIBLE_EXPORTS
- In Linker-> Input->Additional Dependencies: Type in
oleacc.lib gdiplus.lib for a11y-msaa project and oleacc.lib a11y-msaa.lib for a11y-ia2
project.
- For A11y-ia2 project, In Linker-> General->Additional
library directories, add the path of the a11y-msaa.lib. For debug
configuration, it would be 'C:\MyProjects\A11y-msaa\Debug' and for Release,
'C:\MyProjects\A11y-msaa\Release'.
- In MIDL-> Output->Header file, change $(InputName)_h.h to $(InputName).h.
This step is to ensure that when
ia2_api_all.idl is compiled, the header file is generated as
ia2_api_all.h instead of ia2_api_all_h.h.
4. Adding the MIDL generated files to the project
Right click on ia2_api_all.idl and choose Compile. If
ia2_api_all.idl is compiled successfully, the following files are
generated in the project folder: ia2_api_all.h, ia2_api_all_i.c and
ia2_api_all_p.c. Add ia2_api_all.h to header files and
ia2_api_all_i.c to source files. This completes all the project settings
and we're ready to build.
5. Build the project
In Build Menu, Choose Build Solution. If the build is successful,
a11y-msaa.dll/a11y-ia2.dll is created in Debug or Release directory in the
project folder. (Eg:
C:\MyProjects\a11y-ia2\Release\a11y-msaa.dll or
C:\MyProjects\a11y-ia2\Debug\a11y-ia2.dll)