AccessibleObjectFromWindow...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbarto
    New Member
    • Feb 2007
    • 19

    AccessibleObjectFromWindow...

    Hi

    I would appreciate if somebody could help me with that problem. I have the following code:

    Code:
            
    
    [DllImport("oleacc.dll", PreserveSig = false)]
    [return: MarshalAs(UnmanagedType.Interface)]
    public static extern object AccessibleObjectFromWindow(IntPtr hwnd, uint dwId, ref Guid riid);
    
    Guid uid = new Guid("618736e0-3c3d-11cf-810c-00aa00389b71");
    
    object ob = AccessibleObjectFromWindow(_parent.GetHandle(),
                OBJID_CLIENT, ref uid);
    
    IAccessible accObj = (IAccessible)ob;
    What I mean is that when working on Win XP, the type of the object ( ob ) is System._ComObje ct , but as I was trying on Win 2000 the type was System.Runtime. Remoting.Proxie s._TransparentP roxy . Obviously, I was unable to cast that type to IAccessible, which caused an exception. Does anybody have any idea about those differences?
Working...