The Linux Foundation

 
Accessibility/IAccessible2/ComProxyDLL

From The Linux Foundation

IAccessible2 COM proxy stub DLL

We have provided an IAccessible2 COM proxy stub DLL, IAccessible2Proxy.DLL as well as the files necessary for building it from the IAccessible2 IDL file. The proxy DLL is needed so the default marshaler has a description of the IAccessible2 interfaces.

Typically an application implementing the IAccessible2 interfaces would provide a proxy DLL with the application but since IAccessible2 is a standard used by more than one application it would be best if applications do not manage this DLL. This is to eliminate the case of two ore more applications installing a proxy DLL for IAccessible2 and then having one application’s uninstall remove the DLL needed by the other applications.

After discussion within the IAccessible2 community it was felt that the ATs should manage the DLL, i.e. copying it to the system32 directory and registering it at install time, but not removing or unregistering it at uninstall time. There are far fewer ATs than applications and thus a smaller group of developers to coordinate with.

You may choose to use the provided IAccessible2Proxy.dll file, or build your own.

Information about how to create a proxy DLL is available from several sources such as, “COM proxy stub dll and why do you need it” located at https://blogs.msdn.com/eldar/archive/2006/02/28/540981.aspx.

If you use that procedure and are using Visual Studio version 6, the step to add the linker module definition file is different than what is described in the article mentioned above. Instead do the following: Project, Add to Project, Files, Files of type: Definition files (.def).

Also, version data needs to be added to the DLL so that setup systems can detect the DLL version number and so the version data will appear in the file Explorer properties sheet.

The version info can be added using Visual Studio version 6 as follows:

  • From the main menu choose Insert, Resource and then choose Version from the list of resources and click on New.
  • From the FileView right click on the Resource Files folder and choose “Add Files to Folder…” and choose IAccessible2Proxy.rc.

Whenever the DLL is updated, such as when a new or changed interface is added, the file and product version fields in the upper section of the version resource file view should be updated, e.g. from 1,0,0,0 to 1,1,0,0. MSDN info on the MAKEDLLVERULL Macro indicates that these four fields are major version, minor version, build number, and QFE (Quick Fix Engineering, aka Service Pack) number. When you update the upper section of the version resource file view the strings in the lower section will also be updated.

In order to save you the trouble of creating IAccessible2 proxy from scratch, Visual Studio project files are provided so you don’t need to configure Visual Studio using the instructions provided above.

The DLL can be created from the merged IAccessible2 IDL (ia2_api_all.idl), and the following DEF file and Visual Studio DSP and DSW files.

  • IAccessible2Proxy.def
  • Accessible2Proxy.dsp
  • IAccessible2Proxy.dsw

Copy ia2_api_all.idl and the above files into a directory and use one of the build menu items.

Then install the DLL to the Windows system32 directory and register it.

To test the registration at the command prompt use: Regsvr32 IAccessible2Proxy.dll


[Article] [Discussion] [View source] [History]