ホーム › UI.Accessibility › UiaCacheRequest
UiaCacheRequest
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pViewCondition | UiaCondition* | 8/4 | +0 | +0 | ツリービューを定義する条件へのポインタ。 |
| Scope | TreeScope | 4 | +8 | +4 | キャッシュ対象とするツリー範囲を示す値。 |
| pProperties | INT* | 8/4 | +16 | +8 | キャッシュするプロパティIDの配列へのポインタ。 |
| cProperties | INT | 4 | +24 | +12 | キャッシュするプロパティの数。 |
| pPatterns | INT* | 8/4 | +32 | +16 | キャッシュするパターンIDの配列へのポインタ。 |
| cPatterns | INT | 4 | +40 | +20 | キャッシュするパターンの数。 |
| automationElementMode | AutomationElementMode | 4 | +44 | +24 | 要素を完全形式・参照のみのどちらで返すかを示す値。 |
各言語での定義
#include <windows.h>
// UiaCacheRequest (x64 48 / x86 28 バイト)
typedef struct UiaCacheRequest {
UiaCondition* pViewCondition;
TreeScope Scope;
INT* pProperties;
INT cProperties;
INT* pPatterns;
INT cPatterns;
AutomationElementMode automationElementMode;
} UiaCacheRequest;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct UiaCacheRequest
{
public IntPtr pViewCondition;
public int Scope;
public IntPtr pProperties;
public int cProperties;
public IntPtr pPatterns;
public int cPatterns;
public int automationElementMode;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure UiaCacheRequest
Public pViewCondition As IntPtr
Public Scope As Integer
Public pProperties As IntPtr
Public cProperties As Integer
Public pPatterns As IntPtr
Public cPatterns As Integer
Public automationElementMode As Integer
End Structureimport ctypes
from ctypes import wintypes
class UiaCacheRequest(ctypes.Structure):
_fields_ = [
("pViewCondition", ctypes.c_void_p),
("Scope", ctypes.c_int),
("pProperties", ctypes.c_void_p),
("cProperties", ctypes.c_int),
("pPatterns", ctypes.c_void_p),
("cPatterns", ctypes.c_int),
("automationElementMode", ctypes.c_int),
]#[repr(C)]
pub struct UiaCacheRequest {
pub pViewCondition: *mut core::ffi::c_void,
pub Scope: i32,
pub pProperties: *mut core::ffi::c_void,
pub cProperties: i32,
pub pPatterns: *mut core::ffi::c_void,
pub cPatterns: i32,
pub automationElementMode: i32,
}import "golang.org/x/sys/windows"
type UiaCacheRequest struct {
pViewCondition uintptr
Scope int32
pProperties uintptr
cProperties int32
pPatterns uintptr
cPatterns int32
automationElementMode int32
}type
UiaCacheRequest = record
pViewCondition: Pointer;
Scope: Integer;
pProperties: Pointer;
cProperties: Integer;
pPatterns: Pointer;
cPatterns: Integer;
automationElementMode: Integer;
end;const UiaCacheRequest = extern struct {
pViewCondition: ?*anyopaque,
Scope: i32,
pProperties: ?*anyopaque,
cProperties: i32,
pPatterns: ?*anyopaque,
cPatterns: i32,
automationElementMode: i32,
};type
UiaCacheRequest {.bycopy.} = object
pViewCondition: pointer
Scope: int32
pProperties: pointer
cProperties: int32
pPatterns: pointer
cPatterns: int32
automationElementMode: int32struct UiaCacheRequest
{
void* pViewCondition;
int Scope;
void* pProperties;
int cProperties;
void* pPatterns;
int cPatterns;
int automationElementMode;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; UiaCacheRequest サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; pViewCondition : UiaCondition* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Scope : TreeScope (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pProperties : INT* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cProperties : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pPatterns : INT* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cPatterns : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; automationElementMode : AutomationElementMode (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; UiaCacheRequest サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; pViewCondition : UiaCondition* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; Scope : TreeScope (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pProperties : INT* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; cProperties : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pPatterns : INT* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; cPatterns : INT (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; automationElementMode : AutomationElementMode (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global UiaCacheRequest
#field intptr pViewCondition
#field int Scope
#field intptr pProperties
#field int cProperties
#field intptr pPatterns
#field int cPatterns
#field int automationElementMode
#endstruct
stdim st, UiaCacheRequest ; NSTRUCT 変数を確保
st->Scope = 100
mes "Scope=" + st->Scope