S
Sven Gnagi
Hi folks,
I have some serious problems with one of the API calls ...
I try to use :
[DllImport("oleacc.dll",CharSet=CharSet.Auto)]
public static extern long AccessibleObjectFromWindow (
long hwnd,
long dwId,
[MarshalAs(UnmanagedType.Struct)]UUID riid,
[MarshalAs(UnmanagedType.Interface)]object ppvObject);
public struct UUID
{
public long Data1;
public int Data2;
public int Data3;
[MarshalAs(UnmanagedType.ByValArray,SizeConst=8)]
public byte[] Data4;
}
public static void TestAA()
{
UUID uid;
uid.Data1 = (long)0x618736e0;
uid.Data2 = (int)0x3c3d;
uid.Data3 = (int)0x11cf;
uid.Data4 = new Byte[8];
uid.Data4[0] = (byte)0x81;
uid.Data4[1] = (byte)0x0c;
uid.Data4[2] = (byte)0x00;
uid.Data4[3] = (byte)0xaa;
uid.Data4[4] = (byte)0x00;
uid.Data4[5] = (byte)0x38;
uid.Data4[6] = (byte)0x9b;
uid.Data4[7] = (byte)0x71;
IAccessible accObj = null;
long ret = AccessibleObjectFromWindow
(wHandle,OBJID_WINDOW,uid,accObj);
but always get a E_INVALIDARG return value.
I also tried
[DllImport("oleacc.dll",CharSet=CharSet.Auto)]
public static extern long AccessibleObjectFromWindow (
long hwnd,
long dwId,
[MarshalAs(UnmanagedType.Struct)]UUID riid,
[MarshalAs(UnmanagedType.AsAny)]object ppvObject);
could someone give me a hint where I make my mistake ?
thx
Sven
I have some serious problems with one of the API calls ...
I try to use :
[DllImport("oleacc.dll",CharSet=CharSet.Auto)]
public static extern long AccessibleObjectFromWindow (
long hwnd,
long dwId,
[MarshalAs(UnmanagedType.Struct)]UUID riid,
[MarshalAs(UnmanagedType.Interface)]object ppvObject);
public struct UUID
{
public long Data1;
public int Data2;
public int Data3;
[MarshalAs(UnmanagedType.ByValArray,SizeConst=8)]
public byte[] Data4;
}
public static void TestAA()
{
UUID uid;
uid.Data1 = (long)0x618736e0;
uid.Data2 = (int)0x3c3d;
uid.Data3 = (int)0x11cf;
uid.Data4 = new Byte[8];
uid.Data4[0] = (byte)0x81;
uid.Data4[1] = (byte)0x0c;
uid.Data4[2] = (byte)0x00;
uid.Data4[3] = (byte)0xaa;
uid.Data4[4] = (byte)0x00;
uid.Data4[5] = (byte)0x38;
uid.Data4[6] = (byte)0x9b;
uid.Data4[7] = (byte)0x71;
IAccessible accObj = null;
long ret = AccessibleObjectFromWindow
(wHandle,OBJID_WINDOW,uid,accObj);
but always get a E_INVALIDARG return value.
I also tried
[DllImport("oleacc.dll",CharSet=CharSet.Auto)]
public static extern long AccessibleObjectFromWindow (
long hwnd,
long dwId,
[MarshalAs(UnmanagedType.Struct)]UUID riid,
[MarshalAs(UnmanagedType.AsAny)]object ppvObject);
could someone give me a hint where I make my mistake ?
thx

Sven