473,385 Members | 1,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

AccessibleObjectFromWindow

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,accOb j);

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
Nov 15 '05 #1
0 3909

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ulf | last post by:
Hi, I'm working on automated tests with c#. For a new project I need the functions provided by MSAA, but all (few...) info I find is for c++. I tried to use P/Invoke for the oleacc.dll, but so...
0
by: Sven Gnagi | last post by:
Hi, I'm trying to find out how I could use the AccessibleObject functions in C# on controls in third- party applications. e.g. how do I get the AccessibleObject.Name for a control, when I have...
4
by: Sven Gnagi | last post by:
Hi folks, I have some serious problems with one of the API calls ... I try to use : public static extern long AccessibleObjectFromWindow ( long hwnd, long dwId,
0
by: Matt S via .NET 247 | last post by:
Hi all, I am using c# and pinvoking AccessibleObjectFromWindow and I get out an IAccessible object, but I want an AccessibleObject. How do I use IAccessible to instantiate an AccessibleObject? ...
0
by: andyalmq | last post by:
I'm trying to utilize the Active Accessibility SDK in order to create a test automation tool. I've been attempting with no success to utilize AccessibleObjectFromWindow using PInvoke in C#. I'm...
0
by: Logan | last post by:
I was wondering if anyone had any suggestions on how to get accessability information form a window handle. I know this is possible and even found some sample code but it doesn't seem to work....
22
tbarto
by: tbarto | last post by:
Hi everybody For some time I have been working on an UI testing application. The application under test was developed in C#, and my application has been developed in C# as well. I do not have a...
0
tbarto
by: tbarto | last post by:
Hi I would appreciate if somebody could help me with that problem. I have the following code: public static extern object AccessibleObjectFromWindow(IntPtr hwnd, uint dwId, ref...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.