ホーム › System.Diagnostics.Debug.Extensions › DEBUG_PROCESSOR_IDENTIFICATION_IA64
DEBUG_PROCESSOR_IDENTIFICATION_IA64
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Model | DWORD | 4 | +0 | +0 | IA64プロセッサのモデル値。 |
| Revision | DWORD | 4 | +4 | +4 | IA64プロセッサのリビジョン値。 |
| Family | DWORD | 4 | +8 | +8 | IA64プロセッサのファミリ値。 |
| ArchRev | DWORD | 4 | +12 | +12 | IA64アーキテクチャのリビジョン値。 |
| VendorString | CHAR | 16 | +16 | +16 | プロセッサのベンダー文字列(ASCII)。 |
各言語での定義
#include <windows.h>
// DEBUG_PROCESSOR_IDENTIFICATION_IA64 (x64 32 / x86 32 バイト)
typedef struct DEBUG_PROCESSOR_IDENTIFICATION_IA64 {
DWORD Model;
DWORD Revision;
DWORD Family;
DWORD ArchRev;
CHAR VendorString[16];
} DEBUG_PROCESSOR_IDENTIFICATION_IA64;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEBUG_PROCESSOR_IDENTIFICATION_IA64
{
public uint Model;
public uint Revision;
public uint Family;
public uint ArchRev;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public sbyte[] VendorString;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_PROCESSOR_IDENTIFICATION_IA64
Public Model As UInteger
Public Revision As UInteger
Public Family As UInteger
Public ArchRev As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public VendorString() As SByte
End Structureimport ctypes
from ctypes import wintypes
class DEBUG_PROCESSOR_IDENTIFICATION_IA64(ctypes.Structure):
_fields_ = [
("Model", wintypes.DWORD),
("Revision", wintypes.DWORD),
("Family", wintypes.DWORD),
("ArchRev", wintypes.DWORD),
("VendorString", ctypes.c_byte * 16),
]#[repr(C)]
pub struct DEBUG_PROCESSOR_IDENTIFICATION_IA64 {
pub Model: u32,
pub Revision: u32,
pub Family: u32,
pub ArchRev: u32,
pub VendorString: [i8; 16],
}import "golang.org/x/sys/windows"
type DEBUG_PROCESSOR_IDENTIFICATION_IA64 struct {
Model uint32
Revision uint32
Family uint32
ArchRev uint32
VendorString [16]int8
}type
DEBUG_PROCESSOR_IDENTIFICATION_IA64 = record
Model: DWORD;
Revision: DWORD;
Family: DWORD;
ArchRev: DWORD;
VendorString: array[0..15] of Shortint;
end;const DEBUG_PROCESSOR_IDENTIFICATION_IA64 = extern struct {
Model: u32,
Revision: u32,
Family: u32,
ArchRev: u32,
VendorString: [16]i8,
};type
DEBUG_PROCESSOR_IDENTIFICATION_IA64 {.bycopy.} = object
Model: uint32
Revision: uint32
Family: uint32
ArchRev: uint32
VendorString: array[16, int8]struct DEBUG_PROCESSOR_IDENTIFICATION_IA64
{
uint Model;
uint Revision;
uint Family;
uint ArchRev;
byte[16] VendorString;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEBUG_PROCESSOR_IDENTIFICATION_IA64 サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Model : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Revision : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Family : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ArchRev : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; VendorString : CHAR (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEBUG_PROCESSOR_IDENTIFICATION_IA64
#field int Model
#field int Revision
#field int Family
#field int ArchRev
#field byte VendorString 16
#endstruct
stdim st, DEBUG_PROCESSOR_IDENTIFICATION_IA64 ; NSTRUCT 変数を確保
st->Model = 100
mes "Model=" + st->Model