[Accessibility-ia2] IAccessible2::windowHandle

Pete Brunet brunet at us.ibm.com
Mon Feb 19 23:03:41 PST 2007


Alexander, IA2 is not designed to be used with the dispatch interface.  It 
works fine via vtbl access.  Tell us more about what you are trying to do 
and how you are trying to do it.  Or perhaps the following will be 
helpful.

The other day Larry Weiss was trying to get a AT tool to "talk to" an IA2 
implementation in Eclipse.  He had to create a proxy DLL using the recipe 
posted here: 
    https://blogs.msdn.com/eldar/archive/2006/02/28/540981.aspx

He then registered it with the system using
    regsvr32 IAccessible2Proxy.dll

After this the system marshaller knew the method signatures and the sizes 
of the parameters.

I spent most of the day trying to get Larry's files published to the FSG 
web site but am still working with the site admin to get past some 
roadblocks so for now I am attaching the generated DLL and the Visual 
Studio workspace and project files:

   

If you get errors when running MIDL such as
    error MIDL2311 : statements outside library block are illegal in 
mktyplib compatability mode : [ Interface 'IAccessibleValue'  ]
    error MIDL2096 : duplicated attribute : [uuid] [ Interface 
'IAccessibleValue'  ]
uncheck the "MkTypLib compatible" checkbox on the MIDL tab of the Project 
Settings dialog box of Visual Studio.  (Larry is using VC6 so you menus 
and dialogs may be different.)

BTW, If you need to create a type lib I have a version of the current 
"merged" version of the IDL with a library statement that will allow MIDL 
to create a typelib.  Our python users are using the generated typelib to 
talk to IA2 via comtypes.  I am also attaching that prior to being able to 
get it out on the FSG site.  Besides the library section this IDL has two 
small changes:
    * Added changed events for column, section
    * Fixed broken URL to LGPL license (removed period at end)



Pete Brunet
                                                                          
IBM Accessibility Architecture and Development
11501 Burnet Road, MS 9022E004, Austin, TX 78758
Voice: (512) 838-4594, TL 678-4594, Fax: (512) 838-9666
Ionosphere: WS4G




Alexander Surkov <surkov.alexander at gmail.com> 
Sent by: accessibility-ia2-bounces at lists.freestandards.org
02/19/2007 10:08 AM

To

cc
accessibility-ia2 at lists.freestandards.org
Subject
Re: [Accessibility-ia2] IAccessible2::windowHandle






So, Can anybody fix IAccessible2 interface at 
http://accessibility.freestandards.org/a11yspecs/ia2/api/ ?

Alexander.

Cohrs, Christian пишет:
> Hi Alexander,
>
> you are right about that. HWND is not an OLE automation compatible data
> type. OLE_HANLDE should work, it's just an int.
>
> Best regards,
> Christian 
>
> -----Original Message-----
> From: accessibility-ia2-bounces at lists.freestandards.org
> [mailto:accessibility-ia2-bounces at lists.freestandards.org] On Behalf Of
> Alexander Surkov
> Sent: Freitag, 16. Februar 2007 19:35
> To: accessibility-ia2 at lists.freestandards.org
> Subject: [Accessibility-ia2] IAccessible2::windowHandle
>
> I try to create marshaling proxy for IA2 interfaces. I get linking
> errors:
>
>    Creating library IA2Marshal.lib and object IA2Marshal.exp
> Accessible2_p.obj : error LNK2001: unresolved external symbol 
> _HWND_UserFree at 8
> Accessible2_p.obj : error LNK2001: unresolved external symbol 
> _HWND_UserUnmarsha
> l at 12
> Accessible2_p.obj : error LNK2001: unresolved external symbol 
> _HWND_UserMarshal@
> 12
> Accessible2_p.obj : error LNK2001: unresolved external symbol 
> _HWND_UserSize at 12
> IA2Marshal.dll : fatal error LNK1120: 4 unresolved externals
>
> These errors are involved with IAccessible2::windowHandle property that 
> is defined as
>
> [propget] HRESULT windowHandle
> (
>   [out, retval] HWND *windowHandle
> );
>
> It looks it isn't correct to use HWND type in COM interfaces. After some
>
> investigation I find out I should use OLE_HANDLE instead. Also I should 
> import "ocidl.idl" additionally. I'm not big guy in MS COM programming. 
> So, please advise me. Am I right about OLE_HANDLE or what do I do wrong?
>
> If you need any additional information please let me know.
>
> Thank you.
> Alexander Surkov.
>
> _______________________________________________
> Accessibility-ia2 mailing list
> Accessibility-ia2 at lists.freestandards.org
> http://lists.freestandards.org/mailman/listinfo/accessibility-ia2
>
> 

_______________________________________________
Accessibility-ia2 mailing list
Accessibility-ia2 at lists.freestandards.org
http://lists.freestandards.org/mailman/listinfo/accessibility-ia2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IAccessible2Proxy.dll
Type: application/octet-stream
Size: 122880 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IAccessible2Proxy.dsw
Type: application/octet-stream
Size: 557 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IAccessible2Proxy.dsp
Type: application/octet-stream
Size: 7769 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IAccessible2Proxy.def
Type: application/octet-stream
Size: 202 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ia2-api-all-test.idl
Type: application/octet-stream
Size: 100226 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20070220/89ba79cc/attachment-0004.obj 


More information about the Accessibility-ia2 mailing list