AccessibleObjectFromWindow

U

Ulf

Hi,

I went with this question through nearly all forums, but didn't get
any feedback yet :(

For automated software tests, I need to use the AccessibleObject /
IAccessible function provided with .NET

All works fine once I have the AccessibleObject..... the problem is to
get an AccessibleObject(or an IAccessible) from an external window.

I tried to use AccessibleObjectFromWindow Api the following way :

public struct UUID
{
public int Data1;
public int Data2;
public int Data3;
public int Data4;
public int Data5;
public int Data6;
public int Data7;
public int Data8;
public int Data9;
public int Data10;
public int Data11;
}

[DllImport("OLEACC.dll")]
static extern long AccessibleObjectFromWindow (
Int32 hwnd,
Int32 dwId,
UUID riid,
[MarshalAs(UnmanagedType.AsAny)]object ppvObject);


I then call the API with :

UUID uid;
uid.Data1 = (int)0x618736e0;
uid.Data2 = (int)0x3c3d;
uid.Data3 = (int)0x11cf;
uid.Data4 = (int)0x81;
uid.Data5 = (int)0x0c;
uid.Data6 = (int)0x00;
uid.Data7 = (int)0xaa;
uid.Data8 = (int)0x00;
uid.Data9 = (int)0x38;
uid.Data10 = (int)0x9b;
uid.Data11 = (int)0x71;

IAccessible accObj = null;
long res = AccessibleObjectFromWindow(<anyHandle>,0,uid,accObj);

without any success..... :(

when reading the SDK documentation, I find no info on how to convert
AccessibleObjectFromWindow(HWND hwnd, DWORD dwID, REFIID riid,
(void**) ppvObject) into a c#-able form.
Does anybody have a hint where I could find c#-related info concerning
this topic ? (or help me finding out where I messed up my code ...)

thx a lot :)

Ulf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top