Hallo zusammen,
ich versuche seit einigen Tagen die Struktur in AutoIt für einen DllCall abzubilden.
C
BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActions *actions)
/**
******************************************************
* AccessibleAction packages
******************************************************
*/
#define MAX_STRING_SIZE 1024
#define SHORT_STRING_SIZE 256
#define MAX_ACTION_INFO 256
#define MAX_ACTIONS_TO_DO 32
// 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;
// struct for requesting the actions associated with a component
typedef struct GetAccessibleActionsPackageTag {
long vmID;
JOBJECT64 accessibleContext; // the component
AccessibleActions rAccessibleActions; // the actions
} GetAccessibleActionsPackage;
/**
Alles anzeigen
Meine bisherigen Versuche sehen wie folgt aus:
AutoIt
; Variante 1
Local $tAccessibleActionName = DllStructCreate('WCHAR name[256]')
Local $ptrAccessibleActionName = DllStructGetPtr($tAccessibleActionName)
Local $tAccessibleActions = DllStructCreate('INT actionsCount;PTR actionInfo')
DllStructSetData($tAccessibleActions, 'actionInfo', $ptrAccessibleActionName)
DllCall($g_hAccessBridgeDll, 'BOOL:cdecl', 'getAccessibleActions','long', $vmId, 'long', $acButton, 'struct*', $tAccessibleActions)
; Variante 2
Local $tagAccessibleActions = "INT actionsCount;WCHAR name[256];"
Local $tAccessibleActions = DllStructCreate($tagAccessibleActions)
DllCall($g_hAccessBridgeDll, 'BOOL:cdecl', 'getAccessibleActions','long', $vmId, 'long', $acButton, 'struct*', $tAccessibleActions)
; Variante 3
DllCall($g_hAccessBridgeDll, 'BOOL:cdecl', 'getAccessibleActions','long', $vmId, 'long', $acButton, 'struct', DllStructCreate('int actionsCount;WCHAR name[256]'))
Alles anzeigen
Alle Varianten führten bisher zum Absturz des Scriptes.
Mit "long vmID" und "AccessibleContext accessibleContext" kann ich ohne Probleme die Element-Info's auslesen (z.B. Name, Rolle etc.). Somit schließe ich diese Parameter als Fehlerquelle aus.
Danke und viele Grüße
Espyre