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

NDIS_802_11_AUTHENTICATION_ENCRYPTION

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

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

フィールド

フィールドサイズx64x86説明
AuthModeSupportedNDIS_802_11_AUTHENTICATION_MODE4+0+0サポートする認証モード(Open/WPA/WPA2等)。
EncryptStatusSupportedNDIS_802_11_WEP_STATUS4+4+4サポートする暗号化方式(WEP/TKIP/AES等)。

各言語での定義

#include <windows.h>

// NDIS_802_11_AUTHENTICATION_ENCRYPTION  (x64 8 / x86 8 バイト)
typedef struct NDIS_802_11_AUTHENTICATION_ENCRYPTION {
    NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
    NDIS_802_11_WEP_STATUS EncryptStatusSupported;
} NDIS_802_11_AUTHENTICATION_ENCRYPTION;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_802_11_AUTHENTICATION_ENCRYPTION
{
    public int AuthModeSupported;
    public int EncryptStatusSupported;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_802_11_AUTHENTICATION_ENCRYPTION
    Public AuthModeSupported As Integer
    Public EncryptStatusSupported As Integer
End Structure
import ctypes
from ctypes import wintypes

class NDIS_802_11_AUTHENTICATION_ENCRYPTION(ctypes.Structure):
    _fields_ = [
        ("AuthModeSupported", ctypes.c_int),
        ("EncryptStatusSupported", ctypes.c_int),
    ]
#[repr(C)]
pub struct NDIS_802_11_AUTHENTICATION_ENCRYPTION {
    pub AuthModeSupported: i32,
    pub EncryptStatusSupported: i32,
}
import "golang.org/x/sys/windows"

type NDIS_802_11_AUTHENTICATION_ENCRYPTION struct {
	AuthModeSupported int32
	EncryptStatusSupported int32
}
type
  NDIS_802_11_AUTHENTICATION_ENCRYPTION = record
    AuthModeSupported: Integer;
    EncryptStatusSupported: Integer;
  end;
const NDIS_802_11_AUTHENTICATION_ENCRYPTION = extern struct {
    AuthModeSupported: i32,
    EncryptStatusSupported: i32,
};
type
  NDIS_802_11_AUTHENTICATION_ENCRYPTION {.bycopy.} = object
    AuthModeSupported: int32
    EncryptStatusSupported: int32
struct NDIS_802_11_AUTHENTICATION_ENCRYPTION
{
    int AuthModeSupported;
    int EncryptStatusSupported;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NDIS_802_11_AUTHENTICATION_ENCRYPTION サイズ: 8 バイト(x64)
dim st, 2    ; 4byte整数×2(構造体サイズ 8 / 4 切り上げ)
; AuthModeSupported : NDIS_802_11_AUTHENTICATION_MODE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; EncryptStatusSupported : NDIS_802_11_WEP_STATUS (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NDIS_802_11_AUTHENTICATION_ENCRYPTION
    #field int AuthModeSupported
    #field int EncryptStatusSupported
#endstruct

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