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

WLAN_INTERFACE_CAPABILITY

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

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

フィールド

フィールドサイズx64x86説明
interfaceTypeWLAN_INTERFACE_TYPE4+0+0インターフェイスの種類。
bDot11DSupportedBOOL4+4+4802.11d(規制ドメイン)をサポートするかを示す真偽値。
dwMaxDesiredSsidListSizeDWORD4+8+8希望SSIDリストの最大サイズ。
dwMaxDesiredBssidListSizeDWORD4+12+12希望BSSIDリストの最大サイズ。
dwNumberOfSupportedPhysDWORD4+16+16サポートするPHYの数。
dot11PhyTypesDOT11_PHY_TYPE256+20+20サポートするPHYタイプの配列。

各言語での定義

#include <windows.h>

// WLAN_INTERFACE_CAPABILITY  (x64 276 / x86 276 バイト)
typedef struct WLAN_INTERFACE_CAPABILITY {
    WLAN_INTERFACE_TYPE interfaceType;
    BOOL bDot11DSupported;
    DWORD dwMaxDesiredSsidListSize;
    DWORD dwMaxDesiredBssidListSize;
    DWORD dwNumberOfSupportedPhys;
    DOT11_PHY_TYPE dot11PhyTypes[64];
} WLAN_INTERFACE_CAPABILITY;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WLAN_INTERFACE_CAPABILITY
{
    public int interfaceType;
    [MarshalAs(UnmanagedType.Bool)] public bool bDot11DSupported;
    public uint dwMaxDesiredSsidListSize;
    public uint dwMaxDesiredBssidListSize;
    public uint dwNumberOfSupportedPhys;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public int[] dot11PhyTypes;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WLAN_INTERFACE_CAPABILITY
    Public interfaceType As Integer
    <MarshalAs(UnmanagedType.Bool)> Public bDot11DSupported As Boolean
    Public dwMaxDesiredSsidListSize As UInteger
    Public dwMaxDesiredBssidListSize As UInteger
    Public dwNumberOfSupportedPhys As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public dot11PhyTypes() As Integer
End Structure
import ctypes
from ctypes import wintypes

class WLAN_INTERFACE_CAPABILITY(ctypes.Structure):
    _fields_ = [
        ("interfaceType", ctypes.c_int),
        ("bDot11DSupported", wintypes.BOOL),
        ("dwMaxDesiredSsidListSize", wintypes.DWORD),
        ("dwMaxDesiredBssidListSize", wintypes.DWORD),
        ("dwNumberOfSupportedPhys", wintypes.DWORD),
        ("dot11PhyTypes", ctypes.c_int * 64),
    ]
#[repr(C)]
pub struct WLAN_INTERFACE_CAPABILITY {
    pub interfaceType: i32,
    pub bDot11DSupported: i32,
    pub dwMaxDesiredSsidListSize: u32,
    pub dwMaxDesiredBssidListSize: u32,
    pub dwNumberOfSupportedPhys: u32,
    pub dot11PhyTypes: [i32; 64],
}
import "golang.org/x/sys/windows"

type WLAN_INTERFACE_CAPABILITY struct {
	interfaceType int32
	bDot11DSupported int32
	dwMaxDesiredSsidListSize uint32
	dwMaxDesiredBssidListSize uint32
	dwNumberOfSupportedPhys uint32
	dot11PhyTypes [64]int32
}
type
  WLAN_INTERFACE_CAPABILITY = record
    interfaceType: Integer;
    bDot11DSupported: BOOL;
    dwMaxDesiredSsidListSize: DWORD;
    dwMaxDesiredBssidListSize: DWORD;
    dwNumberOfSupportedPhys: DWORD;
    dot11PhyTypes: array[0..63] of Integer;
  end;
const WLAN_INTERFACE_CAPABILITY = extern struct {
    interfaceType: i32,
    bDot11DSupported: i32,
    dwMaxDesiredSsidListSize: u32,
    dwMaxDesiredBssidListSize: u32,
    dwNumberOfSupportedPhys: u32,
    dot11PhyTypes: [64]i32,
};
type
  WLAN_INTERFACE_CAPABILITY {.bycopy.} = object
    interfaceType: int32
    bDot11DSupported: int32
    dwMaxDesiredSsidListSize: uint32
    dwMaxDesiredBssidListSize: uint32
    dwNumberOfSupportedPhys: uint32
    dot11PhyTypes: array[64, int32]
struct WLAN_INTERFACE_CAPABILITY
{
    int interfaceType;
    int bDot11DSupported;
    uint dwMaxDesiredSsidListSize;
    uint dwMaxDesiredBssidListSize;
    uint dwNumberOfSupportedPhys;
    int[64] dot11PhyTypes;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WLAN_INTERFACE_CAPABILITY サイズ: 276 バイト(x64)
dim st, 69    ; 4byte整数×69(構造体サイズ 276 / 4 切り上げ)
; interfaceType : WLAN_INTERFACE_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; bDot11DSupported : BOOL (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; dwMaxDesiredSsidListSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dwMaxDesiredBssidListSize : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; dwNumberOfSupportedPhys : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; dot11PhyTypes : DOT11_PHY_TYPE (+20, 256byte)  varptr(st)+20 を基点に操作(256byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WLAN_INTERFACE_CAPABILITY
    #field int interfaceType
    #field bool bDot11DSupported
    #field int dwMaxDesiredSsidListSize
    #field int dwMaxDesiredBssidListSize
    #field int dwNumberOfSupportedPhys
    #field int dot11PhyTypes 64
#endstruct

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