ホーム › System.Ioctl › VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| HeaderSize | WORD | 2 | +0 | +0 | このヘッダー構造体のバイト単位サイズ。 |
| Flags | DWORD | 4 | +4 | +4 | 仮想化インスタンスの動作を制御するフラグ。 |
| NotificationInfoSize | DWORD | 4 | +8 | +8 | 通知情報領域のバイト単位サイズ。 |
| NotificationInfoOffset | WORD | 2 | +12 | +12 | 通知情報へのバイト単位オフセット。 |
| ProviderMajorVersion | WORD | 2 | +14 | +14 | プロバイダーのメジャーバージョン番号。 |
各言語での定義
#include <windows.h>
// VIRTUALIZATION_INSTANCE_INFO_INPUT_EX (x64 16 / x86 16 バイト)
typedef struct VIRTUALIZATION_INSTANCE_INFO_INPUT_EX {
WORD HeaderSize;
DWORD Flags;
DWORD NotificationInfoSize;
WORD NotificationInfoOffset;
WORD ProviderMajorVersion;
} VIRTUALIZATION_INSTANCE_INFO_INPUT_EX;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
{
public ushort HeaderSize;
public uint Flags;
public uint NotificationInfoSize;
public ushort NotificationInfoOffset;
public ushort ProviderMajorVersion;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
Public HeaderSize As UShort
Public Flags As UInteger
Public NotificationInfoSize As UInteger
Public NotificationInfoOffset As UShort
Public ProviderMajorVersion As UShort
End Structureimport ctypes
from ctypes import wintypes
class VIRTUALIZATION_INSTANCE_INFO_INPUT_EX(ctypes.Structure):
_fields_ = [
("HeaderSize", ctypes.c_ushort),
("Flags", wintypes.DWORD),
("NotificationInfoSize", wintypes.DWORD),
("NotificationInfoOffset", ctypes.c_ushort),
("ProviderMajorVersion", ctypes.c_ushort),
]#[repr(C)]
pub struct VIRTUALIZATION_INSTANCE_INFO_INPUT_EX {
pub HeaderSize: u16,
pub Flags: u32,
pub NotificationInfoSize: u32,
pub NotificationInfoOffset: u16,
pub ProviderMajorVersion: u16,
}import "golang.org/x/sys/windows"
type VIRTUALIZATION_INSTANCE_INFO_INPUT_EX struct {
HeaderSize uint16
Flags uint32
NotificationInfoSize uint32
NotificationInfoOffset uint16
ProviderMajorVersion uint16
}type
VIRTUALIZATION_INSTANCE_INFO_INPUT_EX = record
HeaderSize: Word;
Flags: DWORD;
NotificationInfoSize: DWORD;
NotificationInfoOffset: Word;
ProviderMajorVersion: Word;
end;const VIRTUALIZATION_INSTANCE_INFO_INPUT_EX = extern struct {
HeaderSize: u16,
Flags: u32,
NotificationInfoSize: u32,
NotificationInfoOffset: u16,
ProviderMajorVersion: u16,
};type
VIRTUALIZATION_INSTANCE_INFO_INPUT_EX {.bycopy.} = object
HeaderSize: uint16
Flags: uint32
NotificationInfoSize: uint32
NotificationInfoOffset: uint16
ProviderMajorVersion: uint16struct VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
{
ushort HeaderSize;
uint Flags;
uint NotificationInfoSize;
ushort NotificationInfoOffset;
ushort ProviderMajorVersion;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VIRTUALIZATION_INSTANCE_INFO_INPUT_EX サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; HeaderSize : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; NotificationInfoSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; NotificationInfoOffset : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; ProviderMajorVersion : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global VIRTUALIZATION_INSTANCE_INFO_INPUT_EX
#field short HeaderSize
#field int Flags
#field int NotificationInfoSize
#field short NotificationInfoOffset
#field short ProviderMajorVersion
#endstruct
stdim st, VIRTUALIZATION_INSTANCE_INFO_INPUT_EX ; NSTRUCT 変数を確保
st->HeaderSize = 100
mes "HeaderSize=" + st->HeaderSize