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

EAP_CRED_EXPIRY_REQ

構造体
サイズx64: 32 バイト / x86: 24 バイト

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

フィールド

フィールドサイズx64x86説明
curCredsEAP_CONFIG_INPUT_FIELD_ARRAY16/12+0+0現在の資格情報を入力するフィールド配列。
newCredsEAP_CONFIG_INPUT_FIELD_ARRAY16/12+16+12新しい資格情報を入力するフィールド配列。

各言語での定義

#include <windows.h>

// EAP_CONFIG_INPUT_FIELD_ARRAY  (x64 16 / x86 12 バイト)
typedef struct EAP_CONFIG_INPUT_FIELD_ARRAY {
    DWORD dwVersion;
    DWORD dwNumberOfFields;
    EAP_CONFIG_INPUT_FIELD_DATA* pFields;
} EAP_CONFIG_INPUT_FIELD_ARRAY;

// EAP_CRED_EXPIRY_REQ  (x64 32 / x86 24 バイト)
typedef struct EAP_CRED_EXPIRY_REQ {
    EAP_CONFIG_INPUT_FIELD_ARRAY curCreds;
    EAP_CONFIG_INPUT_FIELD_ARRAY newCreds;
} EAP_CRED_EXPIRY_REQ;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EAP_CONFIG_INPUT_FIELD_ARRAY
{
    public uint dwVersion;
    public uint dwNumberOfFields;
    public IntPtr pFields;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EAP_CRED_EXPIRY_REQ
{
    public EAP_CONFIG_INPUT_FIELD_ARRAY curCreds;
    public EAP_CONFIG_INPUT_FIELD_ARRAY newCreds;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EAP_CONFIG_INPUT_FIELD_ARRAY
    Public dwVersion As UInteger
    Public dwNumberOfFields As UInteger
    Public pFields As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EAP_CRED_EXPIRY_REQ
    Public curCreds As EAP_CONFIG_INPUT_FIELD_ARRAY
    Public newCreds As EAP_CONFIG_INPUT_FIELD_ARRAY
End Structure
import ctypes
from ctypes import wintypes

class EAP_CONFIG_INPUT_FIELD_ARRAY(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("dwNumberOfFields", wintypes.DWORD),
        ("pFields", ctypes.c_void_p),
    ]

class EAP_CRED_EXPIRY_REQ(ctypes.Structure):
    _fields_ = [
        ("curCreds", EAP_CONFIG_INPUT_FIELD_ARRAY),
        ("newCreds", EAP_CONFIG_INPUT_FIELD_ARRAY),
    ]
#[repr(C)]
pub struct EAP_CONFIG_INPUT_FIELD_ARRAY {
    pub dwVersion: u32,
    pub dwNumberOfFields: u32,
    pub pFields: *mut core::ffi::c_void,
}

#[repr(C)]
pub struct EAP_CRED_EXPIRY_REQ {
    pub curCreds: EAP_CONFIG_INPUT_FIELD_ARRAY,
    pub newCreds: EAP_CONFIG_INPUT_FIELD_ARRAY,
}
import "golang.org/x/sys/windows"

type EAP_CONFIG_INPUT_FIELD_ARRAY struct {
	dwVersion uint32
	dwNumberOfFields uint32
	pFields uintptr
}

type EAP_CRED_EXPIRY_REQ struct {
	curCreds EAP_CONFIG_INPUT_FIELD_ARRAY
	newCreds EAP_CONFIG_INPUT_FIELD_ARRAY
}
type
  EAP_CONFIG_INPUT_FIELD_ARRAY = record
    dwVersion: DWORD;
    dwNumberOfFields: DWORD;
    pFields: Pointer;
  end;

  EAP_CRED_EXPIRY_REQ = record
    curCreds: EAP_CONFIG_INPUT_FIELD_ARRAY;
    newCreds: EAP_CONFIG_INPUT_FIELD_ARRAY;
  end;
const EAP_CONFIG_INPUT_FIELD_ARRAY = extern struct {
    dwVersion: u32,
    dwNumberOfFields: u32,
    pFields: ?*anyopaque,
};

const EAP_CRED_EXPIRY_REQ = extern struct {
    curCreds: EAP_CONFIG_INPUT_FIELD_ARRAY,
    newCreds: EAP_CONFIG_INPUT_FIELD_ARRAY,
};
type
  EAP_CONFIG_INPUT_FIELD_ARRAY {.bycopy.} = object
    dwVersion: uint32
    dwNumberOfFields: uint32
    pFields: pointer

  EAP_CRED_EXPIRY_REQ {.bycopy.} = object
    curCreds: EAP_CONFIG_INPUT_FIELD_ARRAY
    newCreds: EAP_CONFIG_INPUT_FIELD_ARRAY
struct EAP_CONFIG_INPUT_FIELD_ARRAY
{
    uint dwVersion;
    uint dwNumberOfFields;
    void* pFields;
}

struct EAP_CRED_EXPIRY_REQ
{
    EAP_CONFIG_INPUT_FIELD_ARRAY curCreds;
    EAP_CONFIG_INPUT_FIELD_ARRAY newCreds;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; EAP_CRED_EXPIRY_REQ サイズ: 24 バイト(x86)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; curCreds : EAP_CONFIG_INPUT_FIELD_ARRAY (+0, 12byte)  varptr(st)+0 を基点に操作(12byte:入れ子/配列)
; newCreds : EAP_CONFIG_INPUT_FIELD_ARRAY (+12, 12byte)  varptr(st)+12 を基点に操作(12byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EAP_CRED_EXPIRY_REQ サイズ: 32 バイト(x64)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; curCreds : EAP_CONFIG_INPUT_FIELD_ARRAY (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; newCreds : EAP_CONFIG_INPUT_FIELD_ARRAY (+16, 16byte)  varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global EAP_CONFIG_INPUT_FIELD_ARRAY
    #field int dwVersion
    #field int dwNumberOfFields
    #field intptr pFields
#endstruct

#defstruct global EAP_CRED_EXPIRY_REQ
    #field EAP_CONFIG_INPUT_FIELD_ARRAY curCreds
    #field EAP_CONFIG_INPUT_FIELD_ARRAY newCreds
#endstruct

stdim st, EAP_CRED_EXPIRY_REQ        ; NSTRUCT 変数を確保