ホーム › NetworkManagement.Dhcp › DHCP_SERVER_CONFIG_INFO_VQ
DHCP_SERVER_CONFIG_INFO_VQ
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| APIProtocolSupport | DWORD | 4 | +0 | +0 | サーバーがサポートするRPCプロトコルを示すフラグ。 |
| DatabaseName | LPWSTR | 8/4 | +8 | +4 | DHCPデータベースのファイル名を示すワイド文字列。NULL可。 |
| DatabasePath | LPWSTR | 8/4 | +16 | +8 | DHCPデータベースの格納パスを示すワイド文字列。NULL可。 |
| BackupPath | LPWSTR | 8/4 | +24 | +12 | データベースバックアップの格納パスを示すワイド文字列。NULL可。 |
| BackupInterval | DWORD | 4 | +32 | +16 | 自動バックアップの実行間隔を分単位で示す。 |
| DatabaseLoggingFlag | DWORD | 4 | +36 | +20 | データベースのトランザクションログ記録を有効化するフラグ。 |
| RestoreFlag | DWORD | 4 | +40 | +24 | 起動時にバックアップから復元するかを示すフラグ。 |
| DatabaseCleanupInterval | DWORD | 4 | +44 | +28 | 期限切れレコードの整理間隔を分単位で示す。 |
| DebugFlag | DWORD | 4 | +48 | +32 | サーバーのデバッグ出力を制御するフラグ。 |
| dwPingRetries | DWORD | 4 | +52 | +36 | アドレス割当前の競合検査(ping)の再試行回数を示す。 |
| cbBootTableString | DWORD | 4 | +56 | +40 | wszBootTableStringのバイト数を示す。 |
| wszBootTableString | LPWSTR | 8/4 | +64 | +44 | BOOTPブートテーブルの内容を示すワイド文字列。NULL可。 |
| fAuditLog | BOOL | 4 | +72 | +48 | 監査ログ記録が有効かを示すブール値。 |
| QuarantineOn | BOOL | 4 | +76 | +52 | ネットワークアクセス保護(検疫)が有効かを示すブール値。 |
| QuarDefFail | DWORD | 4 | +80 | +56 | 検疫判定が失敗した場合の既定動作を示す。 |
| QuarRuntimeStatus | BOOL | 4 | +84 | +60 | 検疫機能の実行時の有効状態を示すブール値。 |
各言語での定義
#include <windows.h>
// DHCP_SERVER_CONFIG_INFO_VQ (x64 88 / x86 64 バイト)
typedef struct DHCP_SERVER_CONFIG_INFO_VQ {
DWORD APIProtocolSupport;
LPWSTR DatabaseName;
LPWSTR DatabasePath;
LPWSTR BackupPath;
DWORD BackupInterval;
DWORD DatabaseLoggingFlag;
DWORD RestoreFlag;
DWORD DatabaseCleanupInterval;
DWORD DebugFlag;
DWORD dwPingRetries;
DWORD cbBootTableString;
LPWSTR wszBootTableString;
BOOL fAuditLog;
BOOL QuarantineOn;
DWORD QuarDefFail;
BOOL QuarRuntimeStatus;
} DHCP_SERVER_CONFIG_INFO_VQ;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DHCP_SERVER_CONFIG_INFO_VQ
{
public uint APIProtocolSupport;
public IntPtr DatabaseName;
public IntPtr DatabasePath;
public IntPtr BackupPath;
public uint BackupInterval;
public uint DatabaseLoggingFlag;
public uint RestoreFlag;
public uint DatabaseCleanupInterval;
public uint DebugFlag;
public uint dwPingRetries;
public uint cbBootTableString;
public IntPtr wszBootTableString;
[MarshalAs(UnmanagedType.Bool)] public bool fAuditLog;
[MarshalAs(UnmanagedType.Bool)] public bool QuarantineOn;
public uint QuarDefFail;
[MarshalAs(UnmanagedType.Bool)] public bool QuarRuntimeStatus;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DHCP_SERVER_CONFIG_INFO_VQ
Public APIProtocolSupport As UInteger
Public DatabaseName As IntPtr
Public DatabasePath As IntPtr
Public BackupPath As IntPtr
Public BackupInterval As UInteger
Public DatabaseLoggingFlag As UInteger
Public RestoreFlag As UInteger
Public DatabaseCleanupInterval As UInteger
Public DebugFlag As UInteger
Public dwPingRetries As UInteger
Public cbBootTableString As UInteger
Public wszBootTableString As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public fAuditLog As Boolean
<MarshalAs(UnmanagedType.Bool)> Public QuarantineOn As Boolean
Public QuarDefFail As UInteger
<MarshalAs(UnmanagedType.Bool)> Public QuarRuntimeStatus As Boolean
End Structureimport ctypes
from ctypes import wintypes
class DHCP_SERVER_CONFIG_INFO_VQ(ctypes.Structure):
_fields_ = [
("APIProtocolSupport", wintypes.DWORD),
("DatabaseName", ctypes.c_void_p),
("DatabasePath", ctypes.c_void_p),
("BackupPath", ctypes.c_void_p),
("BackupInterval", wintypes.DWORD),
("DatabaseLoggingFlag", wintypes.DWORD),
("RestoreFlag", wintypes.DWORD),
("DatabaseCleanupInterval", wintypes.DWORD),
("DebugFlag", wintypes.DWORD),
("dwPingRetries", wintypes.DWORD),
("cbBootTableString", wintypes.DWORD),
("wszBootTableString", ctypes.c_void_p),
("fAuditLog", wintypes.BOOL),
("QuarantineOn", wintypes.BOOL),
("QuarDefFail", wintypes.DWORD),
("QuarRuntimeStatus", wintypes.BOOL),
]#[repr(C)]
pub struct DHCP_SERVER_CONFIG_INFO_VQ {
pub APIProtocolSupport: u32,
pub DatabaseName: *mut core::ffi::c_void,
pub DatabasePath: *mut core::ffi::c_void,
pub BackupPath: *mut core::ffi::c_void,
pub BackupInterval: u32,
pub DatabaseLoggingFlag: u32,
pub RestoreFlag: u32,
pub DatabaseCleanupInterval: u32,
pub DebugFlag: u32,
pub dwPingRetries: u32,
pub cbBootTableString: u32,
pub wszBootTableString: *mut core::ffi::c_void,
pub fAuditLog: i32,
pub QuarantineOn: i32,
pub QuarDefFail: u32,
pub QuarRuntimeStatus: i32,
}import "golang.org/x/sys/windows"
type DHCP_SERVER_CONFIG_INFO_VQ struct {
APIProtocolSupport uint32
DatabaseName uintptr
DatabasePath uintptr
BackupPath uintptr
BackupInterval uint32
DatabaseLoggingFlag uint32
RestoreFlag uint32
DatabaseCleanupInterval uint32
DebugFlag uint32
dwPingRetries uint32
cbBootTableString uint32
wszBootTableString uintptr
fAuditLog int32
QuarantineOn int32
QuarDefFail uint32
QuarRuntimeStatus int32
}type
DHCP_SERVER_CONFIG_INFO_VQ = record
APIProtocolSupport: DWORD;
DatabaseName: Pointer;
DatabasePath: Pointer;
BackupPath: Pointer;
BackupInterval: DWORD;
DatabaseLoggingFlag: DWORD;
RestoreFlag: DWORD;
DatabaseCleanupInterval: DWORD;
DebugFlag: DWORD;
dwPingRetries: DWORD;
cbBootTableString: DWORD;
wszBootTableString: Pointer;
fAuditLog: BOOL;
QuarantineOn: BOOL;
QuarDefFail: DWORD;
QuarRuntimeStatus: BOOL;
end;const DHCP_SERVER_CONFIG_INFO_VQ = extern struct {
APIProtocolSupport: u32,
DatabaseName: ?*anyopaque,
DatabasePath: ?*anyopaque,
BackupPath: ?*anyopaque,
BackupInterval: u32,
DatabaseLoggingFlag: u32,
RestoreFlag: u32,
DatabaseCleanupInterval: u32,
DebugFlag: u32,
dwPingRetries: u32,
cbBootTableString: u32,
wszBootTableString: ?*anyopaque,
fAuditLog: i32,
QuarantineOn: i32,
QuarDefFail: u32,
QuarRuntimeStatus: i32,
};type
DHCP_SERVER_CONFIG_INFO_VQ {.bycopy.} = object
APIProtocolSupport: uint32
DatabaseName: pointer
DatabasePath: pointer
BackupPath: pointer
BackupInterval: uint32
DatabaseLoggingFlag: uint32
RestoreFlag: uint32
DatabaseCleanupInterval: uint32
DebugFlag: uint32
dwPingRetries: uint32
cbBootTableString: uint32
wszBootTableString: pointer
fAuditLog: int32
QuarantineOn: int32
QuarDefFail: uint32
QuarRuntimeStatus: int32struct DHCP_SERVER_CONFIG_INFO_VQ
{
uint APIProtocolSupport;
void* DatabaseName;
void* DatabasePath;
void* BackupPath;
uint BackupInterval;
uint DatabaseLoggingFlag;
uint RestoreFlag;
uint DatabaseCleanupInterval;
uint DebugFlag;
uint dwPingRetries;
uint cbBootTableString;
void* wszBootTableString;
int fAuditLog;
int QuarantineOn;
uint QuarDefFail;
int QuarRuntimeStatus;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DHCP_SERVER_CONFIG_INFO_VQ サイズ: 64 バイト(x86)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; APIProtocolSupport : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; DatabaseName : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DatabasePath : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; BackupPath : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; BackupInterval : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; DatabaseLoggingFlag : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; RestoreFlag : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; DatabaseCleanupInterval : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; DebugFlag : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwPingRetries : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; cbBootTableString : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; wszBootTableString : LPWSTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; fAuditLog : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; QuarantineOn : BOOL (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; QuarDefFail : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; QuarRuntimeStatus : BOOL (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DHCP_SERVER_CONFIG_INFO_VQ サイズ: 88 バイト(x64)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; APIProtocolSupport : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; DatabaseName : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; DatabasePath : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; BackupPath : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; BackupInterval : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; DatabaseLoggingFlag : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; RestoreFlag : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; DatabaseCleanupInterval : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; DebugFlag : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; dwPingRetries : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; cbBootTableString : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; wszBootTableString : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; fAuditLog : BOOL (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; QuarantineOn : BOOL (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; QuarDefFail : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; QuarRuntimeStatus : BOOL (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DHCP_SERVER_CONFIG_INFO_VQ
#field int APIProtocolSupport
#field intptr DatabaseName
#field intptr DatabasePath
#field intptr BackupPath
#field int BackupInterval
#field int DatabaseLoggingFlag
#field int RestoreFlag
#field int DatabaseCleanupInterval
#field int DebugFlag
#field int dwPingRetries
#field int cbBootTableString
#field intptr wszBootTableString
#field bool fAuditLog
#field bool QuarantineOn
#field int QuarDefFail
#field bool QuarRuntimeStatus
#endstruct
stdim st, DHCP_SERVER_CONFIG_INFO_VQ ; NSTRUCT 変数を確保
st->APIProtocolSupport = 100
mes "APIProtocolSupport=" + st->APIProtocolSupport