ホーム › System.Hypervisor › WHV_ACCESS_GPA_CONTROLS
WHV_ACCESS_GPA_CONTROLS
共用体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| AsUINT64 | ULONGLONG | 8 | +0 | +0 | GPAアクセス制御フラグ全体を64ビット整数として表す。 |
| Anonymous | _Anonymous_e__Struct | 8 | +0 | +0 | アクセス種別等の個別制御ビットを保持する無名構造体である。 |
構造体: _Anonymous_e__Struct x64 8B / x86 8B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| CacheType | WHV_CACHE_TYPE | 4 | +0 | +0 |
| Reserved | DWORD | 4 | +4 | +4 |
各言語での定義
#include <windows.h>
// WHV_ACCESS_GPA_CONTROLS (x64 8 / x86 8 バイト)
typedef struct WHV_ACCESS_GPA_CONTROLS {
ULONGLONG AsUINT64;
_Anonymous_e__Struct Anonymous;
} WHV_ACCESS_GPA_CONTROLS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WHV_ACCESS_GPA_CONTROLS
{
public ulong AsUINT64;
public _Anonymous_e__Struct Anonymous;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WHV_ACCESS_GPA_CONTROLS
Public AsUINT64 As ULong
Public Anonymous As _Anonymous_e__Struct
End Structureimport ctypes
from ctypes import wintypes
class WHV_ACCESS_GPA_CONTROLS(ctypes.Structure):
_fields_ = [
("AsUINT64", ctypes.c_ulonglong),
("Anonymous", _Anonymous_e__Struct),
]#[repr(C)]
pub struct WHV_ACCESS_GPA_CONTROLS {
pub AsUINT64: u64,
pub Anonymous: _Anonymous_e__Struct,
}import "golang.org/x/sys/windows"
type WHV_ACCESS_GPA_CONTROLS struct {
AsUINT64 uint64
Anonymous _Anonymous_e__Struct
}type
WHV_ACCESS_GPA_CONTROLS = record
AsUINT64: UInt64;
Anonymous: _Anonymous_e__Struct;
end;const WHV_ACCESS_GPA_CONTROLS = extern struct {
AsUINT64: u64,
Anonymous: _Anonymous_e__Struct,
};type
WHV_ACCESS_GPA_CONTROLS {.bycopy.} = object
AsUINT64: uint64
Anonymous: _Anonymous_e__Structstruct WHV_ACCESS_GPA_CONTROLS
{
ulong AsUINT64;
_Anonymous_e__Struct Anonymous;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WHV_ACCESS_GPA_CONTROLS サイズ: 8 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 8 / 4 切り上げ)
; AsUINT64 : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; Anonymous : _Anonymous_e__Struct (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WHV_ACCESS_GPA_CONTROLS
#field int64 AsUINT64
#field _Anonymous_e__Struct Anonymous
#endstruct
stdim st, WHV_ACCESS_GPA_CONTROLS ; NSTRUCT 変数を確保
st->AsUINT64 = 100
mes "AsUINT64=" + st->AsUINT64