ホーム › System.Wmi › MI_Value
MI_Value
共用体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| boolean | BYTE | 1 | +0 | +0 | Boolean値として解釈するメンバー(0/非0)。 |
| uint8 | BYTE | 1 | +0 | +0 | 符号なし8ビット整数として解釈するメンバー。 |
| sint8 | CHAR | 1 | +0 | +0 | 符号付き8ビット整数として解釈するメンバー。 |
| uint16 | WORD | 2 | +0 | +0 | 符号なし16ビット整数として解釈するメンバー。 |
| sint16 | SHORT | 2 | +0 | +0 | 符号付き16ビット整数として解釈するメンバー。 |
| uint32 | DWORD | 4 | +0 | +0 | 符号なし32ビット整数として解釈するメンバー。 |
| sint32 | INT | 4 | +0 | +0 | 符号付き32ビット整数として解釈するメンバー。 |
| uint64 | ULONGLONG | 8 | +0 | +0 | 符号なし64ビット整数として解釈するメンバー。 |
| sint64 | LONGLONG | 8 | +0 | +0 | 符号付き64ビット整数として解釈するメンバー。 |
| real32 | FLOAT | 4 | +0 | +0 | 単精度浮動小数点数として解釈するメンバー。 |
| real64 | DOUBLE | 8 | +0 | +0 | 倍精度浮動小数点数として解釈するメンバー。 |
| char16 | WORD | 2 | +0 | +0 | 16ビット文字として解釈するメンバー。 |
| datetime | MI_Datetime | 36 | +0 | +0 | 日時または時間間隔(MI_Datetime)として解釈するメンバー。 |
| string | WORD* | 8/4 | +0 | +0 | ワイド文字列へのポインターとして解釈するメンバー。 |
| instance | MI_Instance* | 8/4 | +0 | +0 | 埋め込みインスタンスへのポインターとして解釈するメンバー。 |
| reference | MI_Instance* | 8/4 | +0 | +0 | インスタンス参照へのポインターとして解釈するメンバー。 |
| booleana | MI_BooleanA | 16/8 | +0 | +0 | Boolean配列(MI_BooleanA)として解釈するメンバー。 |
| uint8a | MI_Uint8A | 16/8 | +0 | +0 | 符号なし8ビット整数配列として解釈するメンバー。 |
| sint8a | MI_Sint8A | 16/8 | +0 | +0 | 符号付き8ビット整数配列として解釈するメンバー。 |
| uint16a | MI_Uint16A | 16/8 | +0 | +0 | 符号なし16ビット整数配列として解釈するメンバー。 |
| sint16a | MI_Sint16A | 16/8 | +0 | +0 | 符号付き16ビット整数配列として解釈するメンバー。 |
| uint32a | MI_Uint32A | 16/8 | +0 | +0 | 符号なし32ビット整数配列として解釈するメンバー。 |
| sint32a | MI_Sint32A | 16/8 | +0 | +0 | 符号付き32ビット整数配列として解釈するメンバー。 |
| uint64a | MI_Uint64A | 16/8 | +0 | +0 | 符号なし64ビット整数配列として解釈するメンバー。 |
| sint64a | MI_Sint64A | 16/8 | +0 | +0 | 符号付き64ビット整数配列として解釈するメンバー。 |
| real32a | MI_Real32A | 16/8 | +0 | +0 | 単精度浮動小数点数配列として解釈するメンバー。 |
| real64a | MI_Real64A | 16/8 | +0 | +0 | 倍精度浮動小数点数配列として解釈するメンバー。 |
| char16a | MI_Char16A | 16/8 | +0 | +0 | 16ビット文字配列として解釈するメンバー。 |
| datetimea | MI_DatetimeA | 16/8 | +0 | +0 | MI_Datetime配列として解釈するメンバー。 |
| stringa | MI_StringA | 16/8 | +0 | +0 | ワイド文字列配列として解釈するメンバー。 |
| referencea | MI_ReferenceA | 16/8 | +0 | +0 | インスタンス参照配列として解釈するメンバー。 |
| instancea | MI_InstanceA | 16/8 | +0 | +0 | 埋め込みインスタンス配列として解釈するメンバー。 |
| array | MI_Array | 16/8 | +0 | +0 | 汎用配列(MI_Array)として解釈するメンバー。 |
各言語での定義
#include <windows.h>
// MI_Datetime (x64 36 / x86 36 バイト)
typedef struct MI_Datetime {
DWORD isTimestamp;
_u_e__Union u;
} MI_Datetime;
// MI_BooleanA (x64 16 / x86 8 バイト)
typedef struct MI_BooleanA {
BYTE* data;
DWORD size;
} MI_BooleanA;
// MI_Uint8A (x64 16 / x86 8 バイト)
typedef struct MI_Uint8A {
BYTE* data;
DWORD size;
} MI_Uint8A;
// MI_Sint8A (x64 16 / x86 8 バイト)
typedef struct MI_Sint8A {
CHAR* data;
DWORD size;
} MI_Sint8A;
// MI_Uint16A (x64 16 / x86 8 バイト)
typedef struct MI_Uint16A {
WORD* data;
DWORD size;
} MI_Uint16A;
// MI_Sint16A (x64 16 / x86 8 バイト)
typedef struct MI_Sint16A {
SHORT* data;
DWORD size;
} MI_Sint16A;
// MI_Uint32A (x64 16 / x86 8 バイト)
typedef struct MI_Uint32A {
DWORD* data;
DWORD size;
} MI_Uint32A;
// MI_Sint32A (x64 16 / x86 8 バイト)
typedef struct MI_Sint32A {
INT* data;
DWORD size;
} MI_Sint32A;
// MI_Uint64A (x64 16 / x86 8 バイト)
typedef struct MI_Uint64A {
ULONGLONG* data;
DWORD size;
} MI_Uint64A;
// MI_Sint64A (x64 16 / x86 8 バイト)
typedef struct MI_Sint64A {
LONGLONG* data;
DWORD size;
} MI_Sint64A;
// MI_Real32A (x64 16 / x86 8 バイト)
typedef struct MI_Real32A {
FLOAT* data;
DWORD size;
} MI_Real32A;
// MI_Real64A (x64 16 / x86 8 バイト)
typedef struct MI_Real64A {
DOUBLE* data;
DWORD size;
} MI_Real64A;
// MI_Char16A (x64 16 / x86 8 バイト)
typedef struct MI_Char16A {
WORD* data;
DWORD size;
} MI_Char16A;
// MI_DatetimeA (x64 16 / x86 8 バイト)
typedef struct MI_DatetimeA {
MI_Datetime* data;
DWORD size;
} MI_DatetimeA;
// MI_StringA (x64 16 / x86 8 バイト)
typedef struct MI_StringA {
WORD** data;
DWORD size;
} MI_StringA;
// MI_ReferenceA (x64 16 / x86 8 バイト)
typedef struct MI_ReferenceA {
MI_Instance** data;
DWORD size;
} MI_ReferenceA;
// MI_InstanceA (x64 16 / x86 8 バイト)
typedef struct MI_InstanceA {
MI_Instance** data;
DWORD size;
} MI_InstanceA;
// MI_Array (x64 16 / x86 8 バイト)
typedef struct MI_Array {
void* data;
DWORD size;
} MI_Array;
// MI_Value (x64 40 / x86 40 バイト)
typedef struct MI_Value {
BYTE boolean;
BYTE uint8;
CHAR sint8;
WORD uint16;
SHORT sint16;
DWORD uint32;
INT sint32;
ULONGLONG uint64;
LONGLONG sint64;
FLOAT real32;
DOUBLE real64;
WORD char16;
MI_Datetime datetime;
WORD* string;
MI_Instance* instance;
MI_Instance* reference;
MI_BooleanA booleana;
MI_Uint8A uint8a;
MI_Sint8A sint8a;
MI_Uint16A uint16a;
MI_Sint16A sint16a;
MI_Uint32A uint32a;
MI_Sint32A sint32a;
MI_Uint64A uint64a;
MI_Sint64A sint64a;
MI_Real32A real32a;
MI_Real64A real64a;
MI_Char16A char16a;
MI_DatetimeA datetimea;
MI_StringA stringa;
MI_ReferenceA referencea;
MI_InstanceA instancea;
MI_Array array;
} MI_Value;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Datetime
{
public uint isTimestamp;
public _u_e__Union u;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_BooleanA
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Uint8A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Sint8A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Uint16A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Sint16A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Uint32A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Sint32A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Uint64A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Sint64A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Real32A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Real64A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Char16A
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_DatetimeA
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_StringA
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_ReferenceA
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_InstanceA
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Array
{
public IntPtr data;
public uint size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_Value
{
public byte boolean;
public byte uint8;
public sbyte sint8;
public ushort uint16;
public short sint16;
public uint uint32;
public int sint32;
public ulong uint64;
public long sint64;
public float real32;
public double real64;
public ushort char16;
public MI_Datetime datetime;
public IntPtr string;
public IntPtr instance;
public IntPtr reference;
public MI_BooleanA booleana;
public MI_Uint8A uint8a;
public MI_Sint8A sint8a;
public MI_Uint16A uint16a;
public MI_Sint16A sint16a;
public MI_Uint32A uint32a;
public MI_Sint32A sint32a;
public MI_Uint64A uint64a;
public MI_Sint64A sint64a;
public MI_Real32A real32a;
public MI_Real64A real64a;
public MI_Char16A char16a;
public MI_DatetimeA datetimea;
public MI_StringA stringa;
public MI_ReferenceA referencea;
public MI_InstanceA instancea;
public MI_Array array;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Datetime
Public isTimestamp As UInteger
Public u As _u_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_BooleanA
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Uint8A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Sint8A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Uint16A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Sint16A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Uint32A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Sint32A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Uint64A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Sint64A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Real32A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Real64A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Char16A
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_DatetimeA
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_StringA
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_ReferenceA
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_InstanceA
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Array
Public data As IntPtr
Public size As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_Value
Public boolean As Byte
Public uint8 As Byte
Public sint8 As SByte
Public uint16 As UShort
Public sint16 As Short
Public uint32 As UInteger
Public sint32 As Integer
Public uint64 As ULong
Public sint64 As Long
Public real32 As Single
Public real64 As Double
Public char16 As UShort
Public datetime As MI_Datetime
Public string As IntPtr
Public instance As IntPtr
Public reference As IntPtr
Public booleana As MI_BooleanA
Public uint8a As MI_Uint8A
Public sint8a As MI_Sint8A
Public uint16a As MI_Uint16A
Public sint16a As MI_Sint16A
Public uint32a As MI_Uint32A
Public sint32a As MI_Sint32A
Public uint64a As MI_Uint64A
Public sint64a As MI_Sint64A
Public real32a As MI_Real32A
Public real64a As MI_Real64A
Public char16a As MI_Char16A
Public datetimea As MI_DatetimeA
Public stringa As MI_StringA
Public referencea As MI_ReferenceA
Public instancea As MI_InstanceA
Public array As MI_Array
End Structureimport ctypes
from ctypes import wintypes
class MI_Datetime(ctypes.Structure):
_fields_ = [
("isTimestamp", wintypes.DWORD),
("u", _u_e__Union),
]
class MI_BooleanA(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Uint8A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Sint8A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Uint16A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Sint16A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Uint32A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Sint32A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Uint64A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Sint64A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Real32A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Real64A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Char16A(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_DatetimeA(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_StringA(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_ReferenceA(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_InstanceA(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Array(ctypes.Structure):
_fields_ = [
("data", ctypes.c_void_p),
("size", wintypes.DWORD),
]
class MI_Value(ctypes.Structure):
_fields_ = [
("boolean", ctypes.c_ubyte),
("uint8", ctypes.c_ubyte),
("sint8", ctypes.c_byte),
("uint16", ctypes.c_ushort),
("sint16", ctypes.c_short),
("uint32", wintypes.DWORD),
("sint32", ctypes.c_int),
("uint64", ctypes.c_ulonglong),
("sint64", ctypes.c_longlong),
("real32", ctypes.c_float),
("real64", ctypes.c_double),
("char16", ctypes.c_ushort),
("datetime", MI_Datetime),
("string", ctypes.c_void_p),
("instance", ctypes.c_void_p),
("reference", ctypes.c_void_p),
("booleana", MI_BooleanA),
("uint8a", MI_Uint8A),
("sint8a", MI_Sint8A),
("uint16a", MI_Uint16A),
("sint16a", MI_Sint16A),
("uint32a", MI_Uint32A),
("sint32a", MI_Sint32A),
("uint64a", MI_Uint64A),
("sint64a", MI_Sint64A),
("real32a", MI_Real32A),
("real64a", MI_Real64A),
("char16a", MI_Char16A),
("datetimea", MI_DatetimeA),
("stringa", MI_StringA),
("referencea", MI_ReferenceA),
("instancea", MI_InstanceA),
("array", MI_Array),
]#[repr(C)]
pub struct MI_Datetime {
pub isTimestamp: u32,
pub u: _u_e__Union,
}
#[repr(C)]
pub struct MI_BooleanA {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Uint8A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Sint8A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Uint16A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Sint16A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Uint32A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Sint32A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Uint64A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Sint64A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Real32A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Real64A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Char16A {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_DatetimeA {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_StringA {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_ReferenceA {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_InstanceA {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Array {
pub data: *mut core::ffi::c_void,
pub size: u32,
}
#[repr(C)]
pub struct MI_Value {
pub boolean: u8,
pub uint8: u8,
pub sint8: i8,
pub uint16: u16,
pub sint16: i16,
pub uint32: u32,
pub sint32: i32,
pub uint64: u64,
pub sint64: i64,
pub real32: f32,
pub real64: f64,
pub char16: u16,
pub datetime: MI_Datetime,
pub string: *mut core::ffi::c_void,
pub instance: *mut core::ffi::c_void,
pub reference: *mut core::ffi::c_void,
pub booleana: MI_BooleanA,
pub uint8a: MI_Uint8A,
pub sint8a: MI_Sint8A,
pub uint16a: MI_Uint16A,
pub sint16a: MI_Sint16A,
pub uint32a: MI_Uint32A,
pub sint32a: MI_Sint32A,
pub uint64a: MI_Uint64A,
pub sint64a: MI_Sint64A,
pub real32a: MI_Real32A,
pub real64a: MI_Real64A,
pub char16a: MI_Char16A,
pub datetimea: MI_DatetimeA,
pub stringa: MI_StringA,
pub referencea: MI_ReferenceA,
pub instancea: MI_InstanceA,
pub array: MI_Array,
}import "golang.org/x/sys/windows"
type MI_Datetime struct {
isTimestamp uint32
u _u_e__Union
}
type MI_BooleanA struct {
data uintptr
size uint32
}
type MI_Uint8A struct {
data uintptr
size uint32
}
type MI_Sint8A struct {
data uintptr
size uint32
}
type MI_Uint16A struct {
data uintptr
size uint32
}
type MI_Sint16A struct {
data uintptr
size uint32
}
type MI_Uint32A struct {
data uintptr
size uint32
}
type MI_Sint32A struct {
data uintptr
size uint32
}
type MI_Uint64A struct {
data uintptr
size uint32
}
type MI_Sint64A struct {
data uintptr
size uint32
}
type MI_Real32A struct {
data uintptr
size uint32
}
type MI_Real64A struct {
data uintptr
size uint32
}
type MI_Char16A struct {
data uintptr
size uint32
}
type MI_DatetimeA struct {
data uintptr
size uint32
}
type MI_StringA struct {
data uintptr
size uint32
}
type MI_ReferenceA struct {
data uintptr
size uint32
}
type MI_InstanceA struct {
data uintptr
size uint32
}
type MI_Array struct {
data uintptr
size uint32
}
type MI_Value struct {
boolean byte
uint8 byte
sint8 int8
uint16 uint16
sint16 int16
uint32 uint32
sint32 int32
uint64 uint64
sint64 int64
real32 float32
real64 float64
char16 uint16
datetime MI_Datetime
string uintptr
instance uintptr
reference uintptr
booleana MI_BooleanA
uint8a MI_Uint8A
sint8a MI_Sint8A
uint16a MI_Uint16A
sint16a MI_Sint16A
uint32a MI_Uint32A
sint32a MI_Sint32A
uint64a MI_Uint64A
sint64a MI_Sint64A
real32a MI_Real32A
real64a MI_Real64A
char16a MI_Char16A
datetimea MI_DatetimeA
stringa MI_StringA
referencea MI_ReferenceA
instancea MI_InstanceA
array MI_Array
}type
MI_Datetime = record
isTimestamp: DWORD;
u: _u_e__Union;
end;
MI_BooleanA = record
data: Pointer;
size: DWORD;
end;
MI_Uint8A = record
data: Pointer;
size: DWORD;
end;
MI_Sint8A = record
data: Pointer;
size: DWORD;
end;
MI_Uint16A = record
data: Pointer;
size: DWORD;
end;
MI_Sint16A = record
data: Pointer;
size: DWORD;
end;
MI_Uint32A = record
data: Pointer;
size: DWORD;
end;
MI_Sint32A = record
data: Pointer;
size: DWORD;
end;
MI_Uint64A = record
data: Pointer;
size: DWORD;
end;
MI_Sint64A = record
data: Pointer;
size: DWORD;
end;
MI_Real32A = record
data: Pointer;
size: DWORD;
end;
MI_Real64A = record
data: Pointer;
size: DWORD;
end;
MI_Char16A = record
data: Pointer;
size: DWORD;
end;
MI_DatetimeA = record
data: Pointer;
size: DWORD;
end;
MI_StringA = record
data: Pointer;
size: DWORD;
end;
MI_ReferenceA = record
data: Pointer;
size: DWORD;
end;
MI_InstanceA = record
data: Pointer;
size: DWORD;
end;
MI_Array = record
data: Pointer;
size: DWORD;
end;
MI_Value = record
boolean: Byte;
uint8: Byte;
sint8: Shortint;
uint16: Word;
sint16: Smallint;
uint32: DWORD;
sint32: Integer;
uint64: UInt64;
sint64: Int64;
real32: Single;
real64: Double;
char16: Word;
datetime: MI_Datetime;
string: Pointer;
instance: Pointer;
reference: Pointer;
booleana: MI_BooleanA;
uint8a: MI_Uint8A;
sint8a: MI_Sint8A;
uint16a: MI_Uint16A;
sint16a: MI_Sint16A;
uint32a: MI_Uint32A;
sint32a: MI_Sint32A;
uint64a: MI_Uint64A;
sint64a: MI_Sint64A;
real32a: MI_Real32A;
real64a: MI_Real64A;
char16a: MI_Char16A;
datetimea: MI_DatetimeA;
stringa: MI_StringA;
referencea: MI_ReferenceA;
instancea: MI_InstanceA;
array: MI_Array;
end;const MI_Datetime = extern struct {
isTimestamp: u32,
u: _u_e__Union,
};
const MI_BooleanA = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Uint8A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Sint8A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Uint16A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Sint16A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Uint32A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Sint32A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Uint64A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Sint64A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Real32A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Real64A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Char16A = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_DatetimeA = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_StringA = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_ReferenceA = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_InstanceA = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Array = extern struct {
data: ?*anyopaque,
size: u32,
};
const MI_Value = extern struct {
boolean: u8,
uint8: u8,
sint8: i8,
uint16: u16,
sint16: i16,
uint32: u32,
sint32: i32,
uint64: u64,
sint64: i64,
real32: f32,
real64: f64,
char16: u16,
datetime: MI_Datetime,
string: ?*anyopaque,
instance: ?*anyopaque,
reference: ?*anyopaque,
booleana: MI_BooleanA,
uint8a: MI_Uint8A,
sint8a: MI_Sint8A,
uint16a: MI_Uint16A,
sint16a: MI_Sint16A,
uint32a: MI_Uint32A,
sint32a: MI_Sint32A,
uint64a: MI_Uint64A,
sint64a: MI_Sint64A,
real32a: MI_Real32A,
real64a: MI_Real64A,
char16a: MI_Char16A,
datetimea: MI_DatetimeA,
stringa: MI_StringA,
referencea: MI_ReferenceA,
instancea: MI_InstanceA,
array: MI_Array,
};type
MI_Datetime {.bycopy.} = object
isTimestamp: uint32
u: _u_e__Union
MI_BooleanA {.bycopy.} = object
data: pointer
size: uint32
MI_Uint8A {.bycopy.} = object
data: pointer
size: uint32
MI_Sint8A {.bycopy.} = object
data: pointer
size: uint32
MI_Uint16A {.bycopy.} = object
data: pointer
size: uint32
MI_Sint16A {.bycopy.} = object
data: pointer
size: uint32
MI_Uint32A {.bycopy.} = object
data: pointer
size: uint32
MI_Sint32A {.bycopy.} = object
data: pointer
size: uint32
MI_Uint64A {.bycopy.} = object
data: pointer
size: uint32
MI_Sint64A {.bycopy.} = object
data: pointer
size: uint32
MI_Real32A {.bycopy.} = object
data: pointer
size: uint32
MI_Real64A {.bycopy.} = object
data: pointer
size: uint32
MI_Char16A {.bycopy.} = object
data: pointer
size: uint32
MI_DatetimeA {.bycopy.} = object
data: pointer
size: uint32
MI_StringA {.bycopy.} = object
data: pointer
size: uint32
MI_ReferenceA {.bycopy.} = object
data: pointer
size: uint32
MI_InstanceA {.bycopy.} = object
data: pointer
size: uint32
MI_Array {.bycopy.} = object
data: pointer
size: uint32
MI_Value {.bycopy.} = object
boolean: uint8
uint8: uint8
sint8: int8
uint16: uint16
sint16: int16
uint32: uint32
sint32: int32
uint64: uint64
sint64: int64
real32: float32
real64: float64
char16: uint16
datetime: MI_Datetime
string: pointer
instance: pointer
reference: pointer
booleana: MI_BooleanA
uint8a: MI_Uint8A
sint8a: MI_Sint8A
uint16a: MI_Uint16A
sint16a: MI_Sint16A
uint32a: MI_Uint32A
sint32a: MI_Sint32A
uint64a: MI_Uint64A
sint64a: MI_Sint64A
real32a: MI_Real32A
real64a: MI_Real64A
char16a: MI_Char16A
datetimea: MI_DatetimeA
stringa: MI_StringA
referencea: MI_ReferenceA
instancea: MI_InstanceA
array: MI_Arraystruct MI_Datetime
{
uint isTimestamp;
_u_e__Union u;
}
struct MI_BooleanA
{
void* data;
uint size;
}
struct MI_Uint8A
{
void* data;
uint size;
}
struct MI_Sint8A
{
void* data;
uint size;
}
struct MI_Uint16A
{
void* data;
uint size;
}
struct MI_Sint16A
{
void* data;
uint size;
}
struct MI_Uint32A
{
void* data;
uint size;
}
struct MI_Sint32A
{
void* data;
uint size;
}
struct MI_Uint64A
{
void* data;
uint size;
}
struct MI_Sint64A
{
void* data;
uint size;
}
struct MI_Real32A
{
void* data;
uint size;
}
struct MI_Real64A
{
void* data;
uint size;
}
struct MI_Char16A
{
void* data;
uint size;
}
struct MI_DatetimeA
{
void* data;
uint size;
}
struct MI_StringA
{
void* data;
uint size;
}
struct MI_ReferenceA
{
void* data;
uint size;
}
struct MI_InstanceA
{
void* data;
uint size;
}
struct MI_Array
{
void* data;
uint size;
}
struct MI_Value
{
ubyte boolean;
ubyte uint8;
byte sint8;
ushort uint16;
short sint16;
uint uint32;
int sint32;
ulong uint64;
long sint64;
float real32;
double real64;
ushort char16;
MI_Datetime datetime;
void* string;
void* instance;
void* reference;
MI_BooleanA booleana;
MI_Uint8A uint8a;
MI_Sint8A sint8a;
MI_Uint16A uint16a;
MI_Sint16A sint16a;
MI_Uint32A uint32a;
MI_Sint32A sint32a;
MI_Uint64A uint64a;
MI_Sint64A sint64a;
MI_Real32A real32a;
MI_Real64A real64a;
MI_Char16A char16a;
MI_DatetimeA datetimea;
MI_StringA stringa;
MI_ReferenceA referencea;
MI_InstanceA instancea;
MI_Array array;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MI_Value サイズ: 40 バイト(x86)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; boolean : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; uint8 : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; sint8 : CHAR (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; uint16 : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; sint16 : SHORT (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; uint32 : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; sint32 : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; uint64 : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; sint64 : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; real32 : FLOAT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; real64 : DOUBLE (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; char16 : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; datetime : MI_Datetime (+0, 36byte) varptr(st)+0 を基点に操作(36byte:入れ子/配列)
; string : WORD* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; instance : MI_Instance* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; reference : MI_Instance* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; booleana : MI_BooleanA (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; uint8a : MI_Uint8A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; sint8a : MI_Sint8A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; uint16a : MI_Uint16A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; sint16a : MI_Sint16A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; uint32a : MI_Uint32A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; sint32a : MI_Sint32A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; uint64a : MI_Uint64A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; sint64a : MI_Sint64A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; real32a : MI_Real32A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; real64a : MI_Real64A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; char16a : MI_Char16A (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; datetimea : MI_DatetimeA (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; stringa : MI_StringA (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; referencea : MI_ReferenceA (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; instancea : MI_InstanceA (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; array : MI_Array (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MI_Value サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; boolean : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; uint8 : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; sint8 : CHAR (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; uint16 : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; sint16 : SHORT (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; uint32 : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; sint32 : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; uint64 : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; sint64 : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; real32 : FLOAT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; real64 : DOUBLE (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; char16 : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; datetime : MI_Datetime (+0, 36byte) varptr(st)+0 を基点に操作(36byte:入れ子/配列)
; string : WORD* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; instance : MI_Instance* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; reference : MI_Instance* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; booleana : MI_BooleanA (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; uint8a : MI_Uint8A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; sint8a : MI_Sint8A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; uint16a : MI_Uint16A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; sint16a : MI_Sint16A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; uint32a : MI_Uint32A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; sint32a : MI_Sint32A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; uint64a : MI_Uint64A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; sint64a : MI_Sint64A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; real32a : MI_Real32A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; real64a : MI_Real64A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; char16a : MI_Char16A (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; datetimea : MI_DatetimeA (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; stringa : MI_StringA (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; referencea : MI_ReferenceA (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; instancea : MI_InstanceA (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; array : MI_Array (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global MI_Datetime
#field int isTimestamp
#field byte u 32
#endstruct
#defstruct global MI_BooleanA
#field intptr data
#field int size
#endstruct
#defstruct global MI_Uint8A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Sint8A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Uint16A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Sint16A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Uint32A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Sint32A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Uint64A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Sint64A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Real32A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Real64A
#field intptr data
#field int size
#endstruct
#defstruct global MI_Char16A
#field intptr data
#field int size
#endstruct
#defstruct global MI_DatetimeA
#field intptr data
#field int size
#endstruct
#defstruct global MI_StringA
#field intptr data
#field int size
#endstruct
#defstruct global MI_ReferenceA
#field intptr data
#field int size
#endstruct
#defstruct global MI_InstanceA
#field intptr data
#field int size
#endstruct
#defstruct global MI_Array
#field intptr data
#field int size
#endstruct
#defstruct global MI_Value
#field byte boolean
#field byte uint8
#field byte sint8
#field short uint16
#field short sint16
#field int uint32
#field int sint32
#field int64 uint64
#field int64 sint64
#field float real32
#field double real64
#field short char16
#field MI_Datetime datetime
#field intptr string
#field intptr instance
#field intptr reference
#field MI_BooleanA booleana
#field MI_Uint8A uint8a
#field MI_Sint8A sint8a
#field MI_Uint16A uint16a
#field MI_Sint16A sint16a
#field MI_Uint32A uint32a
#field MI_Sint32A sint32a
#field MI_Uint64A uint64a
#field MI_Sint64A sint64a
#field MI_Real32A real32a
#field MI_Real64A real64a
#field MI_Char16A char16a
#field MI_DatetimeA datetimea
#field MI_StringA stringa
#field MI_ReferenceA referencea
#field MI_InstanceA instancea
#field MI_Array array
#endstruct
stdim st, MI_Value ; NSTRUCT 変数を確保
st->boolean = 100
mes "boolean=" + st->boolean