ホーム › UI.Accessibility › UIAutomationMethodInfo
UIAutomationMethodInfo
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pProgrammaticName | LPWSTR | 8/4 | +0 | +0 | メソッドのプログラム名へのワイド文字列ポインタ。 |
| doSetFocus | BOOL | 4 | +8 | +4 | メソッド実行前にフォーカスを設定するかを示すフラグ。 |
| cInParameters | DWORD | 4 | +12 | +8 | 入力パラメータの数。 |
| cOutParameters | DWORD | 4 | +16 | +12 | 出力パラメータの数。 |
| pParameterTypes | UIAutomationType* | 8/4 | +24 | +16 | 各パラメータの型を示す配列へのポインタ。 |
| pParameterNames | LPWSTR* | 8/4 | +32 | +20 | 各パラメータ名の配列へのポインタ。 |
各言語での定義
#include <windows.h>
// UIAutomationMethodInfo (x64 40 / x86 24 バイト)
typedef struct UIAutomationMethodInfo {
LPWSTR pProgrammaticName;
BOOL doSetFocus;
DWORD cInParameters;
DWORD cOutParameters;
UIAutomationType* pParameterTypes;
LPWSTR* pParameterNames;
} UIAutomationMethodInfo;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct UIAutomationMethodInfo
{
public IntPtr pProgrammaticName;
[MarshalAs(UnmanagedType.Bool)] public bool doSetFocus;
public uint cInParameters;
public uint cOutParameters;
public IntPtr pParameterTypes;
public IntPtr pParameterNames;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure UIAutomationMethodInfo
Public pProgrammaticName As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public doSetFocus As Boolean
Public cInParameters As UInteger
Public cOutParameters As UInteger
Public pParameterTypes As IntPtr
Public pParameterNames As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class UIAutomationMethodInfo(ctypes.Structure):
_fields_ = [
("pProgrammaticName", ctypes.c_void_p),
("doSetFocus", wintypes.BOOL),
("cInParameters", wintypes.DWORD),
("cOutParameters", wintypes.DWORD),
("pParameterTypes", ctypes.c_void_p),
("pParameterNames", ctypes.c_void_p),
]#[repr(C)]
pub struct UIAutomationMethodInfo {
pub pProgrammaticName: *mut core::ffi::c_void,
pub doSetFocus: i32,
pub cInParameters: u32,
pub cOutParameters: u32,
pub pParameterTypes: *mut core::ffi::c_void,
pub pParameterNames: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type UIAutomationMethodInfo struct {
pProgrammaticName uintptr
doSetFocus int32
cInParameters uint32
cOutParameters uint32
pParameterTypes uintptr
pParameterNames uintptr
}type
UIAutomationMethodInfo = record
pProgrammaticName: Pointer;
doSetFocus: BOOL;
cInParameters: DWORD;
cOutParameters: DWORD;
pParameterTypes: Pointer;
pParameterNames: Pointer;
end;const UIAutomationMethodInfo = extern struct {
pProgrammaticName: ?*anyopaque,
doSetFocus: i32,
cInParameters: u32,
cOutParameters: u32,
pParameterTypes: ?*anyopaque,
pParameterNames: ?*anyopaque,
};type
UIAutomationMethodInfo {.bycopy.} = object
pProgrammaticName: pointer
doSetFocus: int32
cInParameters: uint32
cOutParameters: uint32
pParameterTypes: pointer
pParameterNames: pointerstruct UIAutomationMethodInfo
{
void* pProgrammaticName;
int doSetFocus;
uint cInParameters;
uint cOutParameters;
void* pParameterTypes;
void* pParameterNames;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; UIAutomationMethodInfo サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; pProgrammaticName : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; doSetFocus : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cInParameters : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cOutParameters : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pParameterTypes : UIAutomationType* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pParameterNames : LPWSTR* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; UIAutomationMethodInfo サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; pProgrammaticName : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; doSetFocus : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cInParameters : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; cOutParameters : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pParameterTypes : UIAutomationType* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pParameterNames : LPWSTR* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global UIAutomationMethodInfo
#field intptr pProgrammaticName
#field bool doSetFocus
#field int cInParameters
#field int cOutParameters
#field intptr pParameterTypes
#field intptr pParameterNames
#endstruct
stdim st, UIAutomationMethodInfo ; NSTRUCT 変数を確保
st->doSetFocus = 100
mes "doSetFocus=" + st->doSetFocus