473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any idea how to get this API to work?

Private Declare Function AccessibleChildren Lib "oleacc" (ByVal
paccContainer As IAccessible, _
ByVal iChildStart As Integer, _
ByVal cChildren As Integer, _
ByVal rgvarChildren() As Object, _
ByVal pcObtained As Integer) As UInteger

Dim iTMP As Accessibility.IAccessible
Dim lngTMP2 As Integer
iTMP = lngTMP
Dim lngCount As Integer
lngCount = iTMP.accChildCount
Dim Children(lngCount - 1) As Object

Call AccessibleChildren(iTMP, 0, (lngCount - 1), Children(0), lngTMP2)

I can't get the 'rgvarChildren' parameter correct.

My code's translated from the following C# code:

[DllImport("Oleacc.dll")]
public static extern int AccessibleChildren(
Accessibility.IAccessible paccContainer,
int iChildStart,
int cChildren,
[Out] object[] rgvarChildren,
out int pcObtained);

int _ChildCount = IACurrent.accChildCount;
object[] _Children = new object[_ChildCount];
int _out;

AccessibleChildren(IACurrent,0,_ChildCount-1,_Children,out _out);

It doesn't work on VB 2005. An empty Children is returned.
However, it does work on VB6 by declaring Children as a Variant. Any
ideas?

Thanks in advance

Sep 4 '07 #1
2 1470
On 2007-09-04 18:28, codercode wrote:
Private Declare Function AccessibleChildren Lib "oleacc" (ByVal
paccContainer As IAccessible, _
ByVal iChildStart As Integer, _
ByVal cChildren As Integer, _
ByVal rgvarChildren() As Object, _
ByVal pcObtained As Integer) As UInteger

Dim iTMP As Accessibility.IAccessible
Dim lngTMP2 As Integer
iTMP = lngTMP
Dim lngCount As Integer
lngCount = iTMP.accChildCount
Dim Children(lngCount - 1) As Object

Call AccessibleChildren(iTMP, 0, (lngCount - 1), Children(0), lngTMP2)

I can't get the 'rgvarChildren' parameter correct.

My code's translated from the following C# code:

[DllImport("Oleacc.dll")]
public static extern int AccessibleChildren(
Accessibility.IAccessible paccContainer,
int iChildStart,
int cChildren,
[Out] object[] rgvarChildren,
out int pcObtained);

int _ChildCount = IACurrent.accChildCount;
object[] _Children = new object[_ChildCount];
int _out;

AccessibleChildren(IACurrent,0,_ChildCount-1,_Children,out _out);

It doesn't work on VB 2005. An empty Children is returned.
However, it does work on VB6 by declaring Children as a Variant. Any
ideas?
I will just assume that you posted this to the wrong group.

--
Erik Wikström
Sep 4 '07 #2

codercode <wo********@gmail.comwrote in message...
>
int _ChildCount = IACurrent.accChildCount;
An underscore followed by an uppercase character is reserved to the
implementation.

The code you showed is not compilable.

FAQ http://www.parashift.com/c++-faq-lite

--
Bob R
POVrookie
Sep 4 '07 #3

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

Similar topics

29
1924
by: Jim Hubbard | last post by:
Yet another hotfix alert (http://www.kbalertz.com/Feedback_823535.aspx) that states "To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix." ...
1
11789
by: Lipei | last post by:
I have once try IntelliJ IDEA.And I can refactor easily,I can add try and catch just by a few clicks.It also can help me analazy the program's error.(e.g It warned me that I did't initialize the...
5
1710
by: Hugo Elias | last post by:
Hi all, I have an idea for a better IDE. Though I don't have the skills required to write such a thing, if anyone's looking for a killer app, maybe this is it. If I'm typing at a rate of 10...
12
15484
by: Generic Usenet Account | last post by:
I am going through some legacy code that has an "isNull()" method defined on certain classes. I can see that this can be a good way to eliminate certain types of crashes, by making this the first...
0
357
by: John Crowley | last post by:
I keep running into this over and over again... I want a block server control that renders a header and footer, and child controls in between. But I don't want a templated control, for the...
2
2023
by: Nathan | last post by:
I've spent a good part of the afternoon searching Google and the newsgroups for some sort of answer - so I apologize if I'm asking something that has already been asked and answered. I'm using...
54
3583
by: sam.s.kong | last post by:
Hi! I've been programming ASP for 5 years and am now learning PHP. In ASP, you can use GetRows function which returns 2 by 2 array of Recordset. Actually, it's a recommended way in ASP when you...
12
1797
by: Paul H | last post by:
A little off topic this one because the database may not be written in Access. I am just looking for some advice.. I have an idea to help prevent a particular type of crime, a database will be...
32
5764
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
28
2066
by: onkar | last post by:
This idea might be vey crazy. But I hope to get answers to this .. from comp.lang.c If a compiler is designed such that it automatically adds a free() matching every malloc() then is it not a...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.