开发者

Accessibility: Managed vs Unmanaged code

开发者 https://www.devze.com 2023-01-05 23:42 出处:网络
I\'m about to begin working on a Accessibility project for Windows (targeting XP through 7) and would like some advice on the pros an cons of using managed code vs unmanaged code. Basically the softwa

I'm about to begin working on a Accessibility project for Windows (targeting XP through 7) and would like some advice on the pros an cons of using managed code vs unmanaged code. Basically the software will need to be able to read text from open windows, access menus, and other common functions pr开发者_运维问答ograms like a JAWS or another screen reader would be able to do. The question is, can I do this with C# or do I need to use C++?

For the last two years I've been developing a lot of C# code so it seems the quickest way to get started would be to play around with the System.Windows.Automation namespace. On the other hand, I haven't done much C++ or COM programming in quite a while and would have to spend some time refreshing before using unmanaged code.

What are the limitations of using C# code for Accessibility software? Are they severe enough to justify putting in a fair amount of time to refresh my C++ and COM skills because I'd run into a lot of things that just wouldn't be possible (or much more difficult) with managed code? Is the Automation namespace compatible with older applications (not using .NET or WPF)?


Definitely managed code

Even if you run into situations where you're comfortable using COM/unmanaged you can use COM/unmanaged for those modules.

.NET offers seamless interop between managed and unmanaged code. with .NET 4.0 and C# 4.0 interop is even better ..

And above all else make sure you design a loosely coupled system so that there's always room for plugging in another module in an entirely different technology..

Just my two cents..

0

精彩评论

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