ホーム › NetworkManagement.WiFi › ONEX_RESULT_UPDATE_DATA
ONEX_RESULT_UPDATE_DATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| oneXStatus | ONEX_STATUS | 12 | +0 | +0 | 1X認証の状態情報。 |
| BackendSupport | ONEX_EAP_METHOD_BACKEND_SUPPORT | 4 | +12 | +12 | EAPメソッドのバックエンドサポート状況。 |
| fBackendEngaged | BOOL | 4 | +16 | +16 | バックエンド(認証サーバー)と通信が行われたかを示す真偽値。 |
| _bitfield | DWORD | 4 | +20 | +20 | 付随データの有無を示すフラグのビットフィールド。 |
| authParams | ONEX_VARIABLE_BLOB | 8 | +24 | +24 | 認証パラメータを指す可変長ブロブ。 |
| eapError | ONEX_VARIABLE_BLOB | 8 | +32 | +32 | EAPエラー情報を指す可変長ブロブ。 |
各言語での定義
#include <windows.h>
// ONEX_STATUS (x64 12 / x86 12 バイト)
typedef struct ONEX_STATUS {
ONEX_AUTH_STATUS authStatus;
DWORD dwReason;
DWORD dwError;
} ONEX_STATUS;
// ONEX_VARIABLE_BLOB (x64 8 / x86 8 バイト)
typedef struct ONEX_VARIABLE_BLOB {
DWORD dwSize;
DWORD dwOffset;
} ONEX_VARIABLE_BLOB;
// ONEX_RESULT_UPDATE_DATA (x64 40 / x86 40 バイト)
typedef struct ONEX_RESULT_UPDATE_DATA {
ONEX_STATUS oneXStatus;
ONEX_EAP_METHOD_BACKEND_SUPPORT BackendSupport;
BOOL fBackendEngaged;
DWORD _bitfield;
ONEX_VARIABLE_BLOB authParams;
ONEX_VARIABLE_BLOB eapError;
} ONEX_RESULT_UPDATE_DATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_STATUS
{
public int authStatus;
public uint dwReason;
public uint dwError;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_VARIABLE_BLOB
{
public uint dwSize;
public uint dwOffset;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_RESULT_UPDATE_DATA
{
public ONEX_STATUS oneXStatus;
public int BackendSupport;
[MarshalAs(UnmanagedType.Bool)] public bool fBackendEngaged;
public uint _bitfield;
public ONEX_VARIABLE_BLOB authParams;
public ONEX_VARIABLE_BLOB eapError;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_STATUS
Public authStatus As Integer
Public dwReason As UInteger
Public dwError As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_VARIABLE_BLOB
Public dwSize As UInteger
Public dwOffset As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_RESULT_UPDATE_DATA
Public oneXStatus As ONEX_STATUS
Public BackendSupport As Integer
<MarshalAs(UnmanagedType.Bool)> Public fBackendEngaged As Boolean
Public _bitfield As UInteger
Public authParams As ONEX_VARIABLE_BLOB
Public eapError As ONEX_VARIABLE_BLOB
End Structureimport ctypes
from ctypes import wintypes
class ONEX_STATUS(ctypes.Structure):
_fields_ = [
("authStatus", ctypes.c_int),
("dwReason", wintypes.DWORD),
("dwError", wintypes.DWORD),
]
class ONEX_VARIABLE_BLOB(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwOffset", wintypes.DWORD),
]
class ONEX_RESULT_UPDATE_DATA(ctypes.Structure):
_fields_ = [
("oneXStatus", ONEX_STATUS),
("BackendSupport", ctypes.c_int),
("fBackendEngaged", wintypes.BOOL),
("_bitfield", wintypes.DWORD),
("authParams", ONEX_VARIABLE_BLOB),
("eapError", ONEX_VARIABLE_BLOB),
]#[repr(C)]
pub struct ONEX_STATUS {
pub authStatus: i32,
pub dwReason: u32,
pub dwError: u32,
}
#[repr(C)]
pub struct ONEX_VARIABLE_BLOB {
pub dwSize: u32,
pub dwOffset: u32,
}
#[repr(C)]
pub struct ONEX_RESULT_UPDATE_DATA {
pub oneXStatus: ONEX_STATUS,
pub BackendSupport: i32,
pub fBackendEngaged: i32,
pub _bitfield: u32,
pub authParams: ONEX_VARIABLE_BLOB,
pub eapError: ONEX_VARIABLE_BLOB,
}import "golang.org/x/sys/windows"
type ONEX_STATUS struct {
authStatus int32
dwReason uint32
dwError uint32
}
type ONEX_VARIABLE_BLOB struct {
dwSize uint32
dwOffset uint32
}
type ONEX_RESULT_UPDATE_DATA struct {
oneXStatus ONEX_STATUS
BackendSupport int32
fBackendEngaged int32
_bitfield uint32
authParams ONEX_VARIABLE_BLOB
eapError ONEX_VARIABLE_BLOB
}type
ONEX_STATUS = record
authStatus: Integer;
dwReason: DWORD;
dwError: DWORD;
end;
ONEX_VARIABLE_BLOB = record
dwSize: DWORD;
dwOffset: DWORD;
end;
ONEX_RESULT_UPDATE_DATA = record
oneXStatus: ONEX_STATUS;
BackendSupport: Integer;
fBackendEngaged: BOOL;
_bitfield: DWORD;
authParams: ONEX_VARIABLE_BLOB;
eapError: ONEX_VARIABLE_BLOB;
end;const ONEX_STATUS = extern struct {
authStatus: i32,
dwReason: u32,
dwError: u32,
};
const ONEX_VARIABLE_BLOB = extern struct {
dwSize: u32,
dwOffset: u32,
};
const ONEX_RESULT_UPDATE_DATA = extern struct {
oneXStatus: ONEX_STATUS,
BackendSupport: i32,
fBackendEngaged: i32,
_bitfield: u32,
authParams: ONEX_VARIABLE_BLOB,
eapError: ONEX_VARIABLE_BLOB,
};type
ONEX_STATUS {.bycopy.} = object
authStatus: int32
dwReason: uint32
dwError: uint32
ONEX_VARIABLE_BLOB {.bycopy.} = object
dwSize: uint32
dwOffset: uint32
ONEX_RESULT_UPDATE_DATA {.bycopy.} = object
oneXStatus: ONEX_STATUS
BackendSupport: int32
fBackendEngaged: int32
_bitfield: uint32
authParams: ONEX_VARIABLE_BLOB
eapError: ONEX_VARIABLE_BLOBstruct ONEX_STATUS
{
int authStatus;
uint dwReason;
uint dwError;
}
struct ONEX_VARIABLE_BLOB
{
uint dwSize;
uint dwOffset;
}
struct ONEX_RESULT_UPDATE_DATA
{
ONEX_STATUS oneXStatus;
int BackendSupport;
int fBackendEngaged;
uint _bitfield;
ONEX_VARIABLE_BLOB authParams;
ONEX_VARIABLE_BLOB eapError;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ONEX_RESULT_UPDATE_DATA サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; oneXStatus : ONEX_STATUS (+0, 12byte) varptr(st)+0 を基点に操作(12byte:入れ子/配列)
; BackendSupport : ONEX_EAP_METHOD_BACKEND_SUPPORT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; fBackendEngaged : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; _bitfield : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; authParams : ONEX_VARIABLE_BLOB (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; eapError : ONEX_VARIABLE_BLOB (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global ONEX_STATUS
#field int authStatus
#field int dwReason
#field int dwError
#endstruct
#defstruct global ONEX_VARIABLE_BLOB
#field int dwSize
#field int dwOffset
#endstruct
#defstruct global ONEX_RESULT_UPDATE_DATA
#field ONEX_STATUS oneXStatus
#field int BackendSupport
#field bool fBackendEngaged
#field int _bitfield
#field ONEX_VARIABLE_BLOB authParams
#field ONEX_VARIABLE_BLOB eapError
#endstruct
stdim st, ONEX_RESULT_UPDATE_DATA ; NSTRUCT 変数を確保
st->BackendSupport = 100
mes "BackendSupport=" + st->BackendSupport