ホーム › UI.Xaml.Diagnostics › PropertyChainValue
PropertyChainValue
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Index | DWORD | 4 | +0 | +0 | プロパティのインデックスである。 |
| Type | LPWSTR | 8/4 | +8 | +4 | プロパティの型名(Unicode 文字列)へのポインタである。 |
| DeclaringType | LPWSTR | 8/4 | +16 | +8 | プロパティを宣言する型名(Unicode 文字列)へのポインタである。 |
| ValueType | LPWSTR | 8/4 | +24 | +12 | 値の型名(Unicode 文字列)へのポインタである。 |
| ItemType | LPWSTR | 8/4 | +32 | +16 | コレクション要素の型名(Unicode 文字列)へのポインタである。 |
| Value | LPWSTR | 8/4 | +40 | +20 | プロパティの値(Unicode 文字列)へのポインタである。 |
| Overridden | BOOL | 4 | +48 | +24 | 値がオーバーライドされているかどうかを示すブール値である。 |
| MetadataBits | LONGLONG | 8 | +56 | +32 | プロパティのメタデータを示すビットフラグである。 |
| PropertyName | LPWSTR | 8/4 | +64 | +40 | プロパティの名前(Unicode 文字列)へのポインタである。 |
| PropertyChainIndex | DWORD | 4 | +72 | +44 | プロパティチェーン内のインデックスである。 |
各言語での定義
#include <windows.h>
// PropertyChainValue (x64 80 / x86 48 バイト)
typedef struct PropertyChainValue {
DWORD Index;
LPWSTR Type;
LPWSTR DeclaringType;
LPWSTR ValueType;
LPWSTR ItemType;
LPWSTR Value;
BOOL Overridden;
LONGLONG MetadataBits;
LPWSTR PropertyName;
DWORD PropertyChainIndex;
} PropertyChainValue;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PropertyChainValue
{
public uint Index;
public IntPtr Type;
public IntPtr DeclaringType;
public IntPtr ValueType;
public IntPtr ItemType;
public IntPtr Value;
[MarshalAs(UnmanagedType.Bool)] public bool Overridden;
public long MetadataBits;
public IntPtr PropertyName;
public uint PropertyChainIndex;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PropertyChainValue
Public Index As UInteger
Public Type As IntPtr
Public DeclaringType As IntPtr
Public ValueType As IntPtr
Public ItemType As IntPtr
Public Value As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public Overridden As Boolean
Public MetadataBits As Long
Public PropertyName As IntPtr
Public PropertyChainIndex As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PropertyChainValue(ctypes.Structure):
_fields_ = [
("Index", wintypes.DWORD),
("Type", ctypes.c_void_p),
("DeclaringType", ctypes.c_void_p),
("ValueType", ctypes.c_void_p),
("ItemType", ctypes.c_void_p),
("Value", ctypes.c_void_p),
("Overridden", wintypes.BOOL),
("MetadataBits", ctypes.c_longlong),
("PropertyName", ctypes.c_void_p),
("PropertyChainIndex", wintypes.DWORD),
]#[repr(C)]
pub struct PropertyChainValue {
pub Index: u32,
pub Type: *mut core::ffi::c_void,
pub DeclaringType: *mut core::ffi::c_void,
pub ValueType: *mut core::ffi::c_void,
pub ItemType: *mut core::ffi::c_void,
pub Value: *mut core::ffi::c_void,
pub Overridden: i32,
pub MetadataBits: i64,
pub PropertyName: *mut core::ffi::c_void,
pub PropertyChainIndex: u32,
}import "golang.org/x/sys/windows"
type PropertyChainValue struct {
Index uint32
Type uintptr
DeclaringType uintptr
ValueType uintptr
ItemType uintptr
Value uintptr
Overridden int32
MetadataBits int64
PropertyName uintptr
PropertyChainIndex uint32
}type
PropertyChainValue = record
Index: DWORD;
Type: Pointer;
DeclaringType: Pointer;
ValueType: Pointer;
ItemType: Pointer;
Value: Pointer;
Overridden: BOOL;
MetadataBits: Int64;
PropertyName: Pointer;
PropertyChainIndex: DWORD;
end;const PropertyChainValue = extern struct {
Index: u32,
Type: ?*anyopaque,
DeclaringType: ?*anyopaque,
ValueType: ?*anyopaque,
ItemType: ?*anyopaque,
Value: ?*anyopaque,
Overridden: i32,
MetadataBits: i64,
PropertyName: ?*anyopaque,
PropertyChainIndex: u32,
};type
PropertyChainValue {.bycopy.} = object
Index: uint32
Type: pointer
DeclaringType: pointer
ValueType: pointer
ItemType: pointer
Value: pointer
Overridden: int32
MetadataBits: int64
PropertyName: pointer
PropertyChainIndex: uint32struct PropertyChainValue
{
uint Index;
void* Type;
void* DeclaringType;
void* ValueType;
void* ItemType;
void* Value;
int Overridden;
long MetadataBits;
void* PropertyName;
uint PropertyChainIndex;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; PropertyChainValue サイズ: 48 バイト(x86)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; Index : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Type : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DeclaringType : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ValueType : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ItemType : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Value : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Overridden : BOOL (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; MetadataBits : LONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; PropertyName : LPWSTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; PropertyChainIndex : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PropertyChainValue サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; Index : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Type : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; DeclaringType : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ValueType : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ItemType : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Value : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; Overridden : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; MetadataBits : LONGLONG (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; PropertyName : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; PropertyChainIndex : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PropertyChainValue
#field int Index
#field intptr Type
#field intptr DeclaringType
#field intptr ValueType
#field intptr ItemType
#field intptr Value
#field bool Overridden
#field int64 MetadataBits
#field intptr PropertyName
#field int PropertyChainIndex
#endstruct
stdim st, PropertyChainValue ; NSTRUCT 変数を確保
st->Index = 100
mes "Index=" + st->Index