Win32 API 日本語リファレンス
ホームNetworkManagement.WiFi › DOT11_MSONEX_RESULT_PARAMS

DOT11_MSONEX_RESULT_PARAMS

構造体
サイズx64: 48 バイト / x86: 28 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
Dot11OnexAuthStatusONEX_AUTH_STATUS4+0+01X認証の結果ステータスを示す列挙値。
Dot11OneXReasonCodeONEX_REASON_CODE4+4+4認証結果に対応する理由コード。
pbMPPESendKeyBYTE*8/4+8+8MPPE送信キーへのポインター。暗号鍵データ。NULL可。
dwMPPESendKeyLenDWORD4+16+12MPPE送信キーのバイト長。
pbMPPERecvKeyBYTE*8/4+24+16MPPE受信キーへのポインター。暗号鍵データ。NULL可。
dwMPPERecvKeyLenDWORD4+32+20MPPE受信キーのバイト長。
pDot11EapResultDOT11_EAP_RESULT*8/4+40+24EAP結果情報へのポインター。NULL可。

各言語での定義

#include <windows.h>

// DOT11_MSONEX_RESULT_PARAMS  (x64 48 / x86 28 バイト)
typedef struct DOT11_MSONEX_RESULT_PARAMS {
    ONEX_AUTH_STATUS Dot11OnexAuthStatus;
    ONEX_REASON_CODE Dot11OneXReasonCode;
    BYTE* pbMPPESendKey;
    DWORD dwMPPESendKeyLen;
    BYTE* pbMPPERecvKey;
    DWORD dwMPPERecvKeyLen;
    DOT11_EAP_RESULT* pDot11EapResult;
} DOT11_MSONEX_RESULT_PARAMS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_MSONEX_RESULT_PARAMS
{
    public int Dot11OnexAuthStatus;
    public int Dot11OneXReasonCode;
    public IntPtr pbMPPESendKey;
    public uint dwMPPESendKeyLen;
    public IntPtr pbMPPERecvKey;
    public uint dwMPPERecvKeyLen;
    public IntPtr pDot11EapResult;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_MSONEX_RESULT_PARAMS
    Public Dot11OnexAuthStatus As Integer
    Public Dot11OneXReasonCode As Integer
    Public pbMPPESendKey As IntPtr
    Public dwMPPESendKeyLen As UInteger
    Public pbMPPERecvKey As IntPtr
    Public dwMPPERecvKeyLen As UInteger
    Public pDot11EapResult As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class DOT11_MSONEX_RESULT_PARAMS(ctypes.Structure):
    _fields_ = [
        ("Dot11OnexAuthStatus", ctypes.c_int),
        ("Dot11OneXReasonCode", ctypes.c_int),
        ("pbMPPESendKey", ctypes.c_void_p),
        ("dwMPPESendKeyLen", wintypes.DWORD),
        ("pbMPPERecvKey", ctypes.c_void_p),
        ("dwMPPERecvKeyLen", wintypes.DWORD),
        ("pDot11EapResult", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct DOT11_MSONEX_RESULT_PARAMS {
    pub Dot11OnexAuthStatus: i32,
    pub Dot11OneXReasonCode: i32,
    pub pbMPPESendKey: *mut core::ffi::c_void,
    pub dwMPPESendKeyLen: u32,
    pub pbMPPERecvKey: *mut core::ffi::c_void,
    pub dwMPPERecvKeyLen: u32,
    pub pDot11EapResult: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type DOT11_MSONEX_RESULT_PARAMS struct {
	Dot11OnexAuthStatus int32
	Dot11OneXReasonCode int32
	pbMPPESendKey uintptr
	dwMPPESendKeyLen uint32
	pbMPPERecvKey uintptr
	dwMPPERecvKeyLen uint32
	pDot11EapResult uintptr
}
type
  DOT11_MSONEX_RESULT_PARAMS = record
    Dot11OnexAuthStatus: Integer;
    Dot11OneXReasonCode: Integer;
    pbMPPESendKey: Pointer;
    dwMPPESendKeyLen: DWORD;
    pbMPPERecvKey: Pointer;
    dwMPPERecvKeyLen: DWORD;
    pDot11EapResult: Pointer;
  end;
const DOT11_MSONEX_RESULT_PARAMS = extern struct {
    Dot11OnexAuthStatus: i32,
    Dot11OneXReasonCode: i32,
    pbMPPESendKey: ?*anyopaque,
    dwMPPESendKeyLen: u32,
    pbMPPERecvKey: ?*anyopaque,
    dwMPPERecvKeyLen: u32,
    pDot11EapResult: ?*anyopaque,
};
type
  DOT11_MSONEX_RESULT_PARAMS {.bycopy.} = object
    Dot11OnexAuthStatus: int32
    Dot11OneXReasonCode: int32
    pbMPPESendKey: pointer
    dwMPPESendKeyLen: uint32
    pbMPPERecvKey: pointer
    dwMPPERecvKeyLen: uint32
    pDot11EapResult: pointer
struct DOT11_MSONEX_RESULT_PARAMS
{
    int Dot11OnexAuthStatus;
    int Dot11OneXReasonCode;
    void* pbMPPESendKey;
    uint dwMPPESendKeyLen;
    void* pbMPPERecvKey;
    uint dwMPPERecvKeyLen;
    void* pDot11EapResult;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DOT11_MSONEX_RESULT_PARAMS サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; Dot11OnexAuthStatus : ONEX_AUTH_STATUS (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Dot11OneXReasonCode : ONEX_REASON_CODE (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pbMPPESendKey : BYTE* (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dwMPPESendKeyLen : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pbMPPERecvKey : BYTE* (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; dwMPPERecvKeyLen : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; pDot11EapResult : DOT11_EAP_RESULT* (+24, 4byte)  varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_MSONEX_RESULT_PARAMS サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; Dot11OnexAuthStatus : ONEX_AUTH_STATUS (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Dot11OneXReasonCode : ONEX_REASON_CODE (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pbMPPESendKey : BYTE* (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dwMPPESendKeyLen : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pbMPPERecvKey : BYTE* (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; dwMPPERecvKeyLen : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; pDot11EapResult : DOT11_EAP_RESULT* (+40, 8byte)  varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_MSONEX_RESULT_PARAMS
    #field int Dot11OnexAuthStatus
    #field int Dot11OneXReasonCode
    #field intptr pbMPPESendKey
    #field int dwMPPESendKeyLen
    #field intptr pbMPPERecvKey
    #field int dwMPPERecvKeyLen
    #field intptr pDot11EapResult
#endstruct

stdim st, DOT11_MSONEX_RESULT_PARAMS        ; NSTRUCT 変数を確保
st->Dot11OnexAuthStatus = 100
mes "Dot11OnexAuthStatus=" + st->Dot11OnexAuthStatus