开发者

MSAA COM-based?

I'm wondering if MSAA is COM-based, then one should be able to use CreateObject("Accessibility") to create an instance and call its methods. I had no success doing that. I have "OLEACC.DLL" in SYSTEM32 and it's registered with Windows. But the CreateObject fails.

Any thoughts?

I would like to u开发者_如何学Cse functions like AccessibleObjectFromPoint() to get the IAccessible object of the control at the given point.

Has anybody had such an experience?

Any input would be highly appreciated,

Thanks,

Kamil


MSAA is COM based. However, there is no co-creatable class exposed, it exposes only interfaces. That's the reason you can't do CreateObject().

The MSAA-exposed APIs, like AccessibleObjectFromPoint and AccessibleObjectFromWindow are dll-exported C++ methods. You can use them from C++ by linking the proper lib or doing LoadLibrary/GetProcAddress with the function name. From C#, you can get the P/nvoke declaration for these from Pinvoke.net. For example, here's the DllImport for AccessibleObjectFromWindow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜