ホーム › System.SystemServices › NON_PAGED_DEBUG_INFO
NON_PAGED_DEBUG_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Signature | WORD | 2 | +0 | +0 | 非ページデバッグ情報のシグネチャ。 |
| Flags | WORD | 2 | +2 | +2 | フラグフィールド。 |
| Size | DWORD | 4 | +4 | +4 | 本構造体および後続データの合計サイズ。 |
| Machine | WORD | 2 | +8 | +8 | 対象マシン種別。 |
| Characteristics | WORD | 2 | +10 | +10 | イメージの特性フラグ。 |
| TimeDateStamp | DWORD | 4 | +12 | +12 | 対応イメージのタイムスタンプ。 |
| CheckSum | DWORD | 4 | +16 | +16 | 対応イメージのチェックサム。 |
| SizeOfImage | DWORD | 4 | +20 | +20 | イメージのサイズをバイト単位で示す。 |
| ImageBase | ULONGLONG | 8 | +24 | +24 | イメージのベースアドレス(64ビット)。 |
各言語での定義
#include <windows.h>
// NON_PAGED_DEBUG_INFO (x64 32 / x86 32 バイト)
#pragma pack(push, 4)
typedef struct NON_PAGED_DEBUG_INFO {
WORD Signature;
WORD Flags;
DWORD Size;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD SizeOfImage;
ULONGLONG ImageBase;
} NON_PAGED_DEBUG_INFO;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct NON_PAGED_DEBUG_INFO
{
public ushort Signature;
public ushort Flags;
public uint Size;
public ushort Machine;
public ushort Characteristics;
public uint TimeDateStamp;
public uint CheckSum;
public uint SizeOfImage;
public ulong ImageBase;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure NON_PAGED_DEBUG_INFO
Public Signature As UShort
Public Flags As UShort
Public Size As UInteger
Public Machine As UShort
Public Characteristics As UShort
Public TimeDateStamp As UInteger
Public CheckSum As UInteger
Public SizeOfImage As UInteger
Public ImageBase As ULong
End Structureimport ctypes
from ctypes import wintypes
class NON_PAGED_DEBUG_INFO(ctypes.Structure):
_pack_ = 4
_fields_ = [
("Signature", ctypes.c_ushort),
("Flags", ctypes.c_ushort),
("Size", wintypes.DWORD),
("Machine", ctypes.c_ushort),
("Characteristics", ctypes.c_ushort),
("TimeDateStamp", wintypes.DWORD),
("CheckSum", wintypes.DWORD),
("SizeOfImage", wintypes.DWORD),
("ImageBase", ctypes.c_ulonglong),
]#[repr(C, packed(4))]
pub struct NON_PAGED_DEBUG_INFO {
pub Signature: u16,
pub Flags: u16,
pub Size: u32,
pub Machine: u16,
pub Characteristics: u16,
pub TimeDateStamp: u32,
pub CheckSum: u32,
pub SizeOfImage: u32,
pub ImageBase: u64,
}import "golang.org/x/sys/windows"
type NON_PAGED_DEBUG_INFO struct {
Signature uint16
Flags uint16
Size uint32
Machine uint16
Characteristics uint16
TimeDateStamp uint32
CheckSum uint32
SizeOfImage uint32
ImageBase uint64
}type
NON_PAGED_DEBUG_INFO = packed record
Signature: Word;
Flags: Word;
Size: DWORD;
Machine: Word;
Characteristics: Word;
TimeDateStamp: DWORD;
CheckSum: DWORD;
SizeOfImage: DWORD;
ImageBase: UInt64;
end;const NON_PAGED_DEBUG_INFO = extern struct {
Signature: u16,
Flags: u16,
Size: u32,
Machine: u16,
Characteristics: u16,
TimeDateStamp: u32,
CheckSum: u32,
SizeOfImage: u32,
ImageBase: u64,
};type
NON_PAGED_DEBUG_INFO {.packed.} = object
Signature: uint16
Flags: uint16
Size: uint32
Machine: uint16
Characteristics: uint16
TimeDateStamp: uint32
CheckSum: uint32
SizeOfImage: uint32
ImageBase: uint64align(4)
struct NON_PAGED_DEBUG_INFO
{
ushort Signature;
ushort Flags;
uint Size;
ushort Machine;
ushort Characteristics;
uint TimeDateStamp;
uint CheckSum;
uint SizeOfImage;
ulong ImageBase;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NON_PAGED_DEBUG_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Signature : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; Flags : WORD (+2, 2byte) wpoke st,2,値 / 値 = wpeek(st,2)
; Size : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Machine : WORD (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; Characteristics : WORD (+10, 2byte) wpoke st,10,値 / 値 = wpeek(st,10)
; TimeDateStamp : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CheckSum : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SizeOfImage : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ImageBase : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NON_PAGED_DEBUG_INFO, pack=4
#field short Signature
#field short Flags
#field int Size
#field short Machine
#field short Characteristics
#field int TimeDateStamp
#field int CheckSum
#field int SizeOfImage
#field int64 ImageBase
#endstruct
stdim st, NON_PAGED_DEBUG_INFO ; NSTRUCT 変数を確保
st->Signature = 100
mes "Signature=" + st->Signature