ホーム › Security.NetworkAccessProtection › IsolationInfoEx
IsolationInfoEx
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| isolationState | IsolationState | 4 | +0 | +0 | クライアントの隔離状態を表す。 |
| extendedIsolationState | ExtendedIsolationState | 4 | +4 | +4 | 拡張隔離状態(検疫種別など)を表す。 |
| probEndTime | FILETIME | 8 | +8 | +8 | プローブ期間の終了時刻をFILETIME形式で表す。 |
| failureUrl | CountedString | 16/8 | +16 | +16 | 隔離理由を示す修復用URLを格納する文字列。 |
各言語での定義
#include <windows.h>
// FILETIME (x64 8 / x86 8 バイト)
typedef struct FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;
// CountedString (x64 16 / x86 8 バイト)
typedef struct CountedString {
WORD length;
LPWSTR string;
} CountedString;
// IsolationInfoEx (x64 32 / x86 24 バイト)
typedef struct IsolationInfoEx {
IsolationState isolationState;
ExtendedIsolationState extendedIsolationState;
FILETIME probEndTime;
CountedString failureUrl;
} IsolationInfoEx;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FILETIME
{
public uint dwLowDateTime;
public uint dwHighDateTime;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CountedString
{
public ushort length;
public IntPtr string;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IsolationInfoEx
{
public int isolationState;
public int extendedIsolationState;
public FILETIME probEndTime;
public CountedString failureUrl;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FILETIME
Public dwLowDateTime As UInteger
Public dwHighDateTime As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CountedString
Public length As UShort
Public string As IntPtr
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IsolationInfoEx
Public isolationState As Integer
Public extendedIsolationState As Integer
Public probEndTime As FILETIME
Public failureUrl As CountedString
End Structureimport ctypes
from ctypes import wintypes
class FILETIME(ctypes.Structure):
_fields_ = [
("dwLowDateTime", wintypes.DWORD),
("dwHighDateTime", wintypes.DWORD),
]
class CountedString(ctypes.Structure):
_fields_ = [
("length", ctypes.c_ushort),
("string", ctypes.c_void_p),
]
class IsolationInfoEx(ctypes.Structure):
_fields_ = [
("isolationState", ctypes.c_int),
("extendedIsolationState", ctypes.c_int),
("probEndTime", FILETIME),
("failureUrl", CountedString),
]#[repr(C)]
pub struct FILETIME {
pub dwLowDateTime: u32,
pub dwHighDateTime: u32,
}
#[repr(C)]
pub struct CountedString {
pub length: u16,
pub string: *mut core::ffi::c_void,
}
#[repr(C)]
pub struct IsolationInfoEx {
pub isolationState: i32,
pub extendedIsolationState: i32,
pub probEndTime: FILETIME,
pub failureUrl: CountedString,
}import "golang.org/x/sys/windows"
type FILETIME struct {
dwLowDateTime uint32
dwHighDateTime uint32
}
type CountedString struct {
length uint16
string uintptr
}
type IsolationInfoEx struct {
isolationState int32
extendedIsolationState int32
probEndTime FILETIME
failureUrl CountedString
}type
FILETIME = record
dwLowDateTime: DWORD;
dwHighDateTime: DWORD;
end;
CountedString = record
length: Word;
string: Pointer;
end;
IsolationInfoEx = record
isolationState: Integer;
extendedIsolationState: Integer;
probEndTime: FILETIME;
failureUrl: CountedString;
end;const FILETIME = extern struct {
dwLowDateTime: u32,
dwHighDateTime: u32,
};
const CountedString = extern struct {
length: u16,
string: ?*anyopaque,
};
const IsolationInfoEx = extern struct {
isolationState: i32,
extendedIsolationState: i32,
probEndTime: FILETIME,
failureUrl: CountedString,
};type
FILETIME {.bycopy.} = object
dwLowDateTime: uint32
dwHighDateTime: uint32
CountedString {.bycopy.} = object
length: uint16
string: pointer
IsolationInfoEx {.bycopy.} = object
isolationState: int32
extendedIsolationState: int32
probEndTime: FILETIME
failureUrl: CountedStringstruct FILETIME
{
uint dwLowDateTime;
uint dwHighDateTime;
}
struct CountedString
{
ushort length;
void* string;
}
struct IsolationInfoEx
{
int isolationState;
int extendedIsolationState;
FILETIME probEndTime;
CountedString failureUrl;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IsolationInfoEx サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; isolationState : IsolationState (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; extendedIsolationState : ExtendedIsolationState (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; probEndTime : FILETIME (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; failureUrl : CountedString (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IsolationInfoEx サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; isolationState : IsolationState (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; extendedIsolationState : ExtendedIsolationState (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; probEndTime : FILETIME (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; failureUrl : CountedString (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global FILETIME
#field int dwLowDateTime
#field int dwHighDateTime
#endstruct
#defstruct global CountedString
#field short length
#field intptr string
#endstruct
#defstruct global IsolationInfoEx
#field int isolationState
#field int extendedIsolationState
#field FILETIME probEndTime
#field CountedString failureUrl
#endstruct
stdim st, IsolationInfoEx ; NSTRUCT 変数を確保
st->isolationState = 100
mes "isolationState=" + st->isolationState