ホーム › Devices.DeviceAndDriverInstallation › IRQ_RANGE
IRQ_RANGE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| IRQR_Min | DWORD | 4 | +0 | +0 | 許容されるIRQ番号の下限値。 |
| IRQR_Max | DWORD | 4 | +4 | +4 | 許容されるIRQ番号の上限値。 |
| IRQR_Flags | IRQD_FLAGS | 4 | +8 | +8 | IRQ記述子のフラグ群(IRQD_FLAGS)。 |
各言語での定義
#include <windows.h>
// IRQ_RANGE (x64 12 / x86 12 バイト)
#pragma pack(push, 1)
typedef struct IRQ_RANGE {
DWORD IRQR_Min;
DWORD IRQR_Max;
IRQD_FLAGS IRQR_Flags;
} IRQ_RANGE;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct IRQ_RANGE
{
public uint IRQR_Min;
public uint IRQR_Max;
public uint IRQR_Flags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure IRQ_RANGE
Public IRQR_Min As UInteger
Public IRQR_Max As UInteger
Public IRQR_Flags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class IRQ_RANGE(ctypes.Structure):
_pack_ = 1
_fields_ = [
("IRQR_Min", wintypes.DWORD),
("IRQR_Max", wintypes.DWORD),
("IRQR_Flags", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct IRQ_RANGE {
pub IRQR_Min: u32,
pub IRQR_Max: u32,
pub IRQR_Flags: u32,
}import "golang.org/x/sys/windows"
type IRQ_RANGE struct {
IRQR_Min uint32
IRQR_Max uint32
IRQR_Flags uint32
}type
IRQ_RANGE = packed record
IRQR_Min: DWORD;
IRQR_Max: DWORD;
IRQR_Flags: DWORD;
end;const IRQ_RANGE = extern struct {
IRQR_Min: u32,
IRQR_Max: u32,
IRQR_Flags: u32,
};type
IRQ_RANGE {.packed.} = object
IRQR_Min: uint32
IRQR_Max: uint32
IRQR_Flags: uint32align(1)
struct IRQ_RANGE
{
uint IRQR_Min;
uint IRQR_Max;
uint IRQR_Flags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IRQ_RANGE サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; IRQR_Min : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; IRQR_Max : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; IRQR_Flags : IRQD_FLAGS (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IRQ_RANGE, pack=1
#field int IRQR_Min
#field int IRQR_Max
#field int IRQR_Flags
#endstruct
stdim st, IRQ_RANGE ; NSTRUCT 変数を確保
st->IRQR_Min = 100
mes "IRQR_Min=" + st->IRQR_Min