Call to AccessibleObjectFromWindow mysteriously returns a __TransparentProxy?   What is going on?

Posted on 2009-02-23
Last Modified: 2013-11-17
I have a .NET 2.0 application which calls (via PInvoke) AccessibleObjectFromWindow() and it always returns an IAccessible object.   This works great in all cases but one.   When called from Windows 2000 SP4 and the target window is also a .NET 2.0 application, the object returned cannot be cast to IAccessible.   The debugger says its a System.Remoting.Proxies.__TransparentProxy.   Its important to repeat that this only happens on Windows 2000 (SP4) and only when its attempting to get the accessible object of another .NET 2.0 application.   Weird!!!
Question by:RXCTO
    LVL 39

    Assisted Solution

    Not sure if this is gonna help you, but you must be aware that SP4 was the latest service pack of Win2k. Also, the sysetm.Remoting.Proxies libs have only been introduced in the Win2K SP4 version and are not supported before that. If Microsoft introduced a bug there, it's likely to remain...

    But, in case you haven't done so yet, there's a security rollup package of all the patches that have come out since. Included in this security package is a patch for DCOM and RPC. I know it's a long shot, but if you haven't done so yet, maybe you can try an update, see if that helps (mainly security issues have been addressed, but quite some other things in the process, too).

    No SP5:

    Article about DCOM/RPC update:

    Download Win2K rollup package:

    Accepted Solution

    After working with engineers at microsoft I found a fix to this problem.   I hope it will help the next guy.   Apparently, because .NET 2.0 applications attempt to use some more advanced functions of MSAA, you cannot just use the Windows 2000 SP4 install.  You need to update the MSAA on that machine as well.  

    This is an exerpt from my microsoft communications:

    "Looking into this in more detail, the problem is that WinForms' accessibility implementation uses the Dynamic Annotation feature from Active Accessibility 2.0.  Dynamic Annotation isn't available in the version of Active Accessibility which ships with Windows 2000.  Because of this, attempts to read the accessibility information will receive the proxy interfaces and not know how to get the real information.
    If you upgrade the Windows 2000 system to use Active Accessibility 2.0 then your accessibility calls will be able to respect the Dynamic Annotation and read the WinForms accessibility information correctly."

    "I verified that the MSAA20_RDK.exe from can correctly install MSAA 2.0 and that after doing so my test app works correctly in AccExplorer32, in Inspect32, and in its calls to AccessibleObjectFromWindow.  I end up with c:\winnt\system32\oleacc.dll version 4.2.5406.0, dated Tue Oct 30 10:45:25 2001.  The file timestamp (as opposed to the version timestamp) is 05/15/2002 04:16p, which matches the rest of the files on your system, although I wouldn't expect to see them in the system32 directory.  I also found that modern machines can be fast enough that the setup can happen fast enough that you can't see the UI, so not noticing it running does not mean that it thought everything was installed correctly.  The redistributable has separate A and W versions for different OSes.  On Windows 2000 only the W version gets installed, but it is renamed to oleacc.dll so applications can find it."

    Hope this helps


    Author Comment

    Noone naswered my question successfully.
    LVL 39

    Expert Comment

    I understand and agree to the closing of the question. I'm glad you found a solution, I had never come up with this... ;)

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now