1 Replies - 1853 Views - Last Post: 21 January 2011 - 01:01 AM Rate Topic: -----

#1 Guest_ujjval*


Reputation:

Java Access Bridge with c#

Posted 21 January 2011 - 12:03 AM

Hello ,

i am using "WindowsAccessBridge.dll" with c# for capturing Java Application context. capturing working fine but my problem is when i am trying to collect all action regarding selected context that time it will give me the error. i think structure definition which i am defined is wrong please look at this c code which are given by java access bridge.

//**********************************************
// an action assocated with a component
typedef struct AccessibleActionInfoTag {
wchar_t name[SHORT_STRING_SIZE]; // action name
} AccessibleActionInfo;
//**********************************************

//**********************************************
// all of the actions associated with a component
typedef struct AccessibleActionsTag {
jint actionsCount; // number of actions
AccessibleActionInfo actionInfo[MAX_ACTION_INFO]; // the action information
} AccessibleActions;
//**********************************************


and here my c# code for using above structure

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AccessibleActionInfo
{

public string name;

}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AccessibleActions
{
[MarshalAs(UnmanagedType.I4)]
public int actionsCount;
[MarshalAs(UnmanagedType.Struct, SizeConst = 256)]
public AccessibleActionInfo actionInfo;
}
//here defined the method for collect action for java control
[DllImport("WindowsAccessBridge.dll", CallingConvention = CallingConvention.Cdecl)]
private extern static string getAccessibleActions(long vmID, IntPtr ac, out AccessibleActions textInfo);

//here defined instance for AccessibleActions structure
private static AccessibleActions actionjava = new AccessibleActions();

//here i am using to collect action
getAccessibleActions(javaVmID, ac1, out actionjava);

Please anyone know what is wrong with my code then please reply me..

Thnx a lot....
Ujjval J Parekh.

Is This A Good Question/Topic? 0

Replies To: Java Access Bridge with c#

#2 masijade  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 196
  • View blog
  • Posts: 580
  • Joined: 03-April 10

Re: Java Access Bridge with c#

Posted 21 January 2011 - 01:01 AM

Uhm, not a Java question, just so you know.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1