ホーム › Graphics.Printing › NOTIFICATION_CONFIG_1
NOTIFICATION_CONFIG_1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で指定する。 |
| fdwFlags | DWORD | 4 | +4 | +4 | 通知の動作を制御するフラグ。 |
| pfnNotifyCallback | ROUTER_NOTIFY_CALLBACK | 8/4 | +8 | +8 | 通知を受け取るルーターコールバック関数(ROUTER_NOTIFY_CALLBACK)。 |
| pContext | void* | 8/4 | +16 | +12 | コールバックに渡される任意のコンテキストポインター。 |
各言語での定義
#include <windows.h>
// NOTIFICATION_CONFIG_1 (x64 24 / x86 16 バイト)
typedef struct NOTIFICATION_CONFIG_1 {
DWORD cbSize;
DWORD fdwFlags;
ROUTER_NOTIFY_CALLBACK pfnNotifyCallback;
void* pContext;
} NOTIFICATION_CONFIG_1;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NOTIFICATION_CONFIG_1
{
public uint cbSize;
public uint fdwFlags;
public IntPtr pfnNotifyCallback;
public IntPtr pContext;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NOTIFICATION_CONFIG_1
Public cbSize As UInteger
Public fdwFlags As UInteger
Public pfnNotifyCallback As IntPtr
Public pContext As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class NOTIFICATION_CONFIG_1(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("fdwFlags", wintypes.DWORD),
("pfnNotifyCallback", ctypes.c_void_p),
("pContext", ctypes.c_void_p),
]#[repr(C)]
pub struct NOTIFICATION_CONFIG_1 {
pub cbSize: u32,
pub fdwFlags: u32,
pub pfnNotifyCallback: *mut core::ffi::c_void,
pub pContext: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type NOTIFICATION_CONFIG_1 struct {
cbSize uint32
fdwFlags uint32
pfnNotifyCallback uintptr
pContext uintptr
}type
NOTIFICATION_CONFIG_1 = record
cbSize: DWORD;
fdwFlags: DWORD;
pfnNotifyCallback: Pointer;
pContext: Pointer;
end;const NOTIFICATION_CONFIG_1 = extern struct {
cbSize: u32,
fdwFlags: u32,
pfnNotifyCallback: ?*anyopaque,
pContext: ?*anyopaque,
};type
NOTIFICATION_CONFIG_1 {.bycopy.} = object
cbSize: uint32
fdwFlags: uint32
pfnNotifyCallback: pointer
pContext: pointerstruct NOTIFICATION_CONFIG_1
{
uint cbSize;
uint fdwFlags;
void* pfnNotifyCallback;
void* pContext;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NOTIFICATION_CONFIG_1 サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fdwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pfnNotifyCallback : ROUTER_NOTIFY_CALLBACK (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pContext : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NOTIFICATION_CONFIG_1 サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fdwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pfnNotifyCallback : ROUTER_NOTIFY_CALLBACK (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pContext : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NOTIFICATION_CONFIG_1
#field int cbSize
#field int fdwFlags
#field intptr pfnNotifyCallback
#field intptr pContext
#endstruct
stdim st, NOTIFICATION_CONFIG_1 ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize