• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1287
  • Last Modified:

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

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!!!
0
RXCTO
Asked:
RXCTO
  • 2
  • 2
2 Solutions
 
abelCommented:
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: http://www.eweek.com/c/a/Windows/Microsoft-Scraps-Plans-for-Windows-2000-SP5/

Article about DCOM/RPC update: http://www.microsoft.com/technet/security/bulletin/ms04-012.mspx

Download Win2K rollup package: http://support.microsoft.com/kb/891861
0
 
RXCTOAuthor Commented:
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 http://www.microsoft.com/downloads/details.aspx?FamilyID=9b14f6e1-888a-4f1d-b1a1-da08ee4077df&DisplayLang=en 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



0
 
RXCTOAuthor Commented:
Noone naswered my question successfully.
0
 
abelCommented:
I understand and agree to the closing of the question. I'm glad you found a solution, I had never come up with this... ;)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now