Win32 API 日本語リファレンス
ホームSecurity.ExtensibleAuthenticationProtocol › EAP_AUTHENTICATOR_METHOD_ROUTINES

EAP_AUTHENTICATOR_METHOD_ROUTINES

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

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

フィールド

フィールドサイズx64x86説明
dwSizeInBytesDWORD4+0+0この構造体のバイト数。
pEapTypeEAP_METHOD_TYPE*8/4+8+4このルーチン群が対応するEAP方式の種別へのポインタ。
EapMethodAuthenticatorInitializeINT_PTR8/4+16+8EapMethodAuthenticatorInitialize関数へのポインタ。
EapMethodAuthenticatorBeginSessionINT_PTR8/4+24+12EapMethodAuthenticatorBeginSession関数へのポインタ。
EapMethodAuthenticatorUpdateInnerMethodParamsINT_PTR8/4+32+16EapMethodAuthenticatorUpdateInnerMethodParams関数へのポインタ。
EapMethodAuthenticatorReceivePacketINT_PTR8/4+40+20EapMethodAuthenticatorReceivePacket関数へのポインタ。
EapMethodAuthenticatorSendPacketINT_PTR8/4+48+24EapMethodAuthenticatorSendPacket関数へのポインタ。
EapMethodAuthenticatorGetAttributesINT_PTR8/4+56+28EapMethodAuthenticatorGetAttributes関数へのポインタ。
EapMethodAuthenticatorSetAttributesINT_PTR8/4+64+32EapMethodAuthenticatorSetAttributes関数へのポインタ。
EapMethodAuthenticatorGetResultINT_PTR8/4+72+36EapMethodAuthenticatorGetResult関数へのポインタ。
EapMethodAuthenticatorEndSessionINT_PTR8/4+80+40EapMethodAuthenticatorEndSession関数へのポインタ。
EapMethodAuthenticatorShutdownINT_PTR8/4+88+44EapMethodAuthenticatorShutdown関数へのポインタ。

各言語での定義

#include <windows.h>

// EAP_AUTHENTICATOR_METHOD_ROUTINES  (x64 96 / x86 48 バイト)
typedef struct EAP_AUTHENTICATOR_METHOD_ROUTINES {
    DWORD dwSizeInBytes;
    EAP_METHOD_TYPE* pEapType;
    INT_PTR EapMethodAuthenticatorInitialize;
    INT_PTR EapMethodAuthenticatorBeginSession;
    INT_PTR EapMethodAuthenticatorUpdateInnerMethodParams;
    INT_PTR EapMethodAuthenticatorReceivePacket;
    INT_PTR EapMethodAuthenticatorSendPacket;
    INT_PTR EapMethodAuthenticatorGetAttributes;
    INT_PTR EapMethodAuthenticatorSetAttributes;
    INT_PTR EapMethodAuthenticatorGetResult;
    INT_PTR EapMethodAuthenticatorEndSession;
    INT_PTR EapMethodAuthenticatorShutdown;
} EAP_AUTHENTICATOR_METHOD_ROUTINES;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EAP_AUTHENTICATOR_METHOD_ROUTINES
{
    public uint dwSizeInBytes;
    public IntPtr pEapType;
    public IntPtr EapMethodAuthenticatorInitialize;
    public IntPtr EapMethodAuthenticatorBeginSession;
    public IntPtr EapMethodAuthenticatorUpdateInnerMethodParams;
    public IntPtr EapMethodAuthenticatorReceivePacket;
    public IntPtr EapMethodAuthenticatorSendPacket;
    public IntPtr EapMethodAuthenticatorGetAttributes;
    public IntPtr EapMethodAuthenticatorSetAttributes;
    public IntPtr EapMethodAuthenticatorGetResult;
    public IntPtr EapMethodAuthenticatorEndSession;
    public IntPtr EapMethodAuthenticatorShutdown;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EAP_AUTHENTICATOR_METHOD_ROUTINES
    Public dwSizeInBytes As UInteger
    Public pEapType As IntPtr
    Public EapMethodAuthenticatorInitialize As IntPtr
    Public EapMethodAuthenticatorBeginSession As IntPtr
    Public EapMethodAuthenticatorUpdateInnerMethodParams As IntPtr
    Public EapMethodAuthenticatorReceivePacket As IntPtr
    Public EapMethodAuthenticatorSendPacket As IntPtr
    Public EapMethodAuthenticatorGetAttributes As IntPtr
    Public EapMethodAuthenticatorSetAttributes As IntPtr
    Public EapMethodAuthenticatorGetResult As IntPtr
    Public EapMethodAuthenticatorEndSession As IntPtr
    Public EapMethodAuthenticatorShutdown As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class EAP_AUTHENTICATOR_METHOD_ROUTINES(ctypes.Structure):
    _fields_ = [
        ("dwSizeInBytes", wintypes.DWORD),
        ("pEapType", ctypes.c_void_p),
        ("EapMethodAuthenticatorInitialize", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorBeginSession", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorUpdateInnerMethodParams", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorReceivePacket", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorSendPacket", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorGetAttributes", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorSetAttributes", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorGetResult", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorEndSession", ctypes.c_ssize_t),
        ("EapMethodAuthenticatorShutdown", ctypes.c_ssize_t),
    ]
#[repr(C)]
pub struct EAP_AUTHENTICATOR_METHOD_ROUTINES {
    pub dwSizeInBytes: u32,
    pub pEapType: *mut core::ffi::c_void,
    pub EapMethodAuthenticatorInitialize: isize,
    pub EapMethodAuthenticatorBeginSession: isize,
    pub EapMethodAuthenticatorUpdateInnerMethodParams: isize,
    pub EapMethodAuthenticatorReceivePacket: isize,
    pub EapMethodAuthenticatorSendPacket: isize,
    pub EapMethodAuthenticatorGetAttributes: isize,
    pub EapMethodAuthenticatorSetAttributes: isize,
    pub EapMethodAuthenticatorGetResult: isize,
    pub EapMethodAuthenticatorEndSession: isize,
    pub EapMethodAuthenticatorShutdown: isize,
}
import "golang.org/x/sys/windows"

type EAP_AUTHENTICATOR_METHOD_ROUTINES struct {
	dwSizeInBytes uint32
	pEapType uintptr
	EapMethodAuthenticatorInitialize uintptr
	EapMethodAuthenticatorBeginSession uintptr
	EapMethodAuthenticatorUpdateInnerMethodParams uintptr
	EapMethodAuthenticatorReceivePacket uintptr
	EapMethodAuthenticatorSendPacket uintptr
	EapMethodAuthenticatorGetAttributes uintptr
	EapMethodAuthenticatorSetAttributes uintptr
	EapMethodAuthenticatorGetResult uintptr
	EapMethodAuthenticatorEndSession uintptr
	EapMethodAuthenticatorShutdown uintptr
}
type
  EAP_AUTHENTICATOR_METHOD_ROUTINES = record
    dwSizeInBytes: DWORD;
    pEapType: Pointer;
    EapMethodAuthenticatorInitialize: NativeInt;
    EapMethodAuthenticatorBeginSession: NativeInt;
    EapMethodAuthenticatorUpdateInnerMethodParams: NativeInt;
    EapMethodAuthenticatorReceivePacket: NativeInt;
    EapMethodAuthenticatorSendPacket: NativeInt;
    EapMethodAuthenticatorGetAttributes: NativeInt;
    EapMethodAuthenticatorSetAttributes: NativeInt;
    EapMethodAuthenticatorGetResult: NativeInt;
    EapMethodAuthenticatorEndSession: NativeInt;
    EapMethodAuthenticatorShutdown: NativeInt;
  end;
const EAP_AUTHENTICATOR_METHOD_ROUTINES = extern struct {
    dwSizeInBytes: u32,
    pEapType: ?*anyopaque,
    EapMethodAuthenticatorInitialize: isize,
    EapMethodAuthenticatorBeginSession: isize,
    EapMethodAuthenticatorUpdateInnerMethodParams: isize,
    EapMethodAuthenticatorReceivePacket: isize,
    EapMethodAuthenticatorSendPacket: isize,
    EapMethodAuthenticatorGetAttributes: isize,
    EapMethodAuthenticatorSetAttributes: isize,
    EapMethodAuthenticatorGetResult: isize,
    EapMethodAuthenticatorEndSession: isize,
    EapMethodAuthenticatorShutdown: isize,
};
type
  EAP_AUTHENTICATOR_METHOD_ROUTINES {.bycopy.} = object
    dwSizeInBytes: uint32
    pEapType: pointer
    EapMethodAuthenticatorInitialize: int
    EapMethodAuthenticatorBeginSession: int
    EapMethodAuthenticatorUpdateInnerMethodParams: int
    EapMethodAuthenticatorReceivePacket: int
    EapMethodAuthenticatorSendPacket: int
    EapMethodAuthenticatorGetAttributes: int
    EapMethodAuthenticatorSetAttributes: int
    EapMethodAuthenticatorGetResult: int
    EapMethodAuthenticatorEndSession: int
    EapMethodAuthenticatorShutdown: int
struct EAP_AUTHENTICATOR_METHOD_ROUTINES
{
    uint dwSizeInBytes;
    void* pEapType;
    ptrdiff_t EapMethodAuthenticatorInitialize;
    ptrdiff_t EapMethodAuthenticatorBeginSession;
    ptrdiff_t EapMethodAuthenticatorUpdateInnerMethodParams;
    ptrdiff_t EapMethodAuthenticatorReceivePacket;
    ptrdiff_t EapMethodAuthenticatorSendPacket;
    ptrdiff_t EapMethodAuthenticatorGetAttributes;
    ptrdiff_t EapMethodAuthenticatorSetAttributes;
    ptrdiff_t EapMethodAuthenticatorGetResult;
    ptrdiff_t EapMethodAuthenticatorEndSession;
    ptrdiff_t EapMethodAuthenticatorShutdown;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; EAP_AUTHENTICATOR_METHOD_ROUTINES サイズ: 48 バイト(x86)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; dwSizeInBytes : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pEapType : EAP_METHOD_TYPE* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; EapMethodAuthenticatorInitialize : INT_PTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; EapMethodAuthenticatorBeginSession : INT_PTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; EapMethodAuthenticatorUpdateInnerMethodParams : INT_PTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; EapMethodAuthenticatorReceivePacket : INT_PTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; EapMethodAuthenticatorSendPacket : INT_PTR (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; EapMethodAuthenticatorGetAttributes : INT_PTR (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; EapMethodAuthenticatorSetAttributes : INT_PTR (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; EapMethodAuthenticatorGetResult : INT_PTR (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; EapMethodAuthenticatorEndSession : INT_PTR (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; EapMethodAuthenticatorShutdown : INT_PTR (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EAP_AUTHENTICATOR_METHOD_ROUTINES サイズ: 96 バイト(x64)
dim st, 24    ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; dwSizeInBytes : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pEapType : EAP_METHOD_TYPE* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; EapMethodAuthenticatorInitialize : INT_PTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; EapMethodAuthenticatorBeginSession : INT_PTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; EapMethodAuthenticatorUpdateInnerMethodParams : INT_PTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; EapMethodAuthenticatorReceivePacket : INT_PTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; EapMethodAuthenticatorSendPacket : INT_PTR (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; EapMethodAuthenticatorGetAttributes : INT_PTR (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; EapMethodAuthenticatorSetAttributes : INT_PTR (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; EapMethodAuthenticatorGetResult : INT_PTR (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; EapMethodAuthenticatorEndSession : INT_PTR (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; EapMethodAuthenticatorShutdown : INT_PTR (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global EAP_AUTHENTICATOR_METHOD_ROUTINES
    #field int dwSizeInBytes
    #field intptr pEapType
    #field intptr EapMethodAuthenticatorInitialize
    #field intptr EapMethodAuthenticatorBeginSession
    #field intptr EapMethodAuthenticatorUpdateInnerMethodParams
    #field intptr EapMethodAuthenticatorReceivePacket
    #field intptr EapMethodAuthenticatorSendPacket
    #field intptr EapMethodAuthenticatorGetAttributes
    #field intptr EapMethodAuthenticatorSetAttributes
    #field intptr EapMethodAuthenticatorGetResult
    #field intptr EapMethodAuthenticatorEndSession
    #field intptr EapMethodAuthenticatorShutdown
#endstruct

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