ホーム › NetworkManagement.WiFi › DOT11_PHY_TYPE_INFO
DOT11_PHY_TYPE_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dot11PhyType | DOT11_PHY_TYPE | 4 | +0 | +0 | 対象とする PHY 種別を示す列挙値。 |
| bUseParameters | BOOLEAN | 1 | +4 | +4 | 以下のパラメータを使用するか示すフラグ。 |
| uProbeDelay | DWORD | 4 | +8 | +8 | プローブ要求送信前の遅延時間を表す。 |
| uMinChannelTime | DWORD | 4 | +12 | +12 | チャネルごとの最小滞在時間を表す。 |
| uMaxChannelTime | DWORD | 4 | +16 | +16 | チャネルごとの最大滞在時間を表す。 |
| ChDescriptionType | CH_DESCRIPTION_TYPE | 4 | +20 | +20 | チャネル記述の形式を示す列挙値。 |
| uChannelListSize | DWORD | 4 | +24 | +24 | ucChannelListBuffer のバイトサイズを表す。 |
| ucChannelListBuffer | BYTE | 1 | +28 | +28 | スキャン対象チャネル一覧を格納するバッファ。可変長。 |
各言語での定義
#include <windows.h>
// DOT11_PHY_TYPE_INFO (x64 32 / x86 32 バイト)
typedef struct DOT11_PHY_TYPE_INFO {
DOT11_PHY_TYPE dot11PhyType;
BOOLEAN bUseParameters;
DWORD uProbeDelay;
DWORD uMinChannelTime;
DWORD uMaxChannelTime;
CH_DESCRIPTION_TYPE ChDescriptionType;
DWORD uChannelListSize;
BYTE ucChannelListBuffer[1];
} DOT11_PHY_TYPE_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_PHY_TYPE_INFO
{
public int dot11PhyType;
[MarshalAs(UnmanagedType.U1)] public bool bUseParameters;
public uint uProbeDelay;
public uint uMinChannelTime;
public uint uMaxChannelTime;
public int ChDescriptionType;
public uint uChannelListSize;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] ucChannelListBuffer;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_PHY_TYPE_INFO
Public dot11PhyType As Integer
<MarshalAs(UnmanagedType.U1)> Public bUseParameters As Boolean
Public uProbeDelay As UInteger
Public uMinChannelTime As UInteger
Public uMaxChannelTime As UInteger
Public ChDescriptionType As Integer
Public uChannelListSize As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public ucChannelListBuffer() As Byte
End Structureimport ctypes
from ctypes import wintypes
class DOT11_PHY_TYPE_INFO(ctypes.Structure):
_fields_ = [
("dot11PhyType", ctypes.c_int),
("bUseParameters", ctypes.c_byte),
("uProbeDelay", wintypes.DWORD),
("uMinChannelTime", wintypes.DWORD),
("uMaxChannelTime", wintypes.DWORD),
("ChDescriptionType", ctypes.c_int),
("uChannelListSize", wintypes.DWORD),
("ucChannelListBuffer", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct DOT11_PHY_TYPE_INFO {
pub dot11PhyType: i32,
pub bUseParameters: u8,
pub uProbeDelay: u32,
pub uMinChannelTime: u32,
pub uMaxChannelTime: u32,
pub ChDescriptionType: i32,
pub uChannelListSize: u32,
pub ucChannelListBuffer: [u8; 1],
}import "golang.org/x/sys/windows"
type DOT11_PHY_TYPE_INFO struct {
dot11PhyType int32
bUseParameters byte
uProbeDelay uint32
uMinChannelTime uint32
uMaxChannelTime uint32
ChDescriptionType int32
uChannelListSize uint32
ucChannelListBuffer [1]byte
}type
DOT11_PHY_TYPE_INFO = record
dot11PhyType: Integer;
bUseParameters: ByteBool;
uProbeDelay: DWORD;
uMinChannelTime: DWORD;
uMaxChannelTime: DWORD;
ChDescriptionType: Integer;
uChannelListSize: DWORD;
ucChannelListBuffer: array[0..0] of Byte;
end;const DOT11_PHY_TYPE_INFO = extern struct {
dot11PhyType: i32,
bUseParameters: u8,
uProbeDelay: u32,
uMinChannelTime: u32,
uMaxChannelTime: u32,
ChDescriptionType: i32,
uChannelListSize: u32,
ucChannelListBuffer: [1]u8,
};type
DOT11_PHY_TYPE_INFO {.bycopy.} = object
dot11PhyType: int32
bUseParameters: uint8
uProbeDelay: uint32
uMinChannelTime: uint32
uMaxChannelTime: uint32
ChDescriptionType: int32
uChannelListSize: uint32
ucChannelListBuffer: array[1, uint8]struct DOT11_PHY_TYPE_INFO
{
int dot11PhyType;
ubyte bUseParameters;
uint uProbeDelay;
uint uMinChannelTime;
uint uMaxChannelTime;
int ChDescriptionType;
uint uChannelListSize;
ubyte[1] ucChannelListBuffer;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_PHY_TYPE_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; dot11PhyType : DOT11_PHY_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; bUseParameters : BOOLEAN (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; uProbeDelay : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; uMinChannelTime : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; uMaxChannelTime : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ChDescriptionType : CH_DESCRIPTION_TYPE (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uChannelListSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ucChannelListBuffer : BYTE (+28, 1byte) varptr(st)+28 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_PHY_TYPE_INFO
#field int dot11PhyType
#field bool1 bUseParameters
#field int uProbeDelay
#field int uMinChannelTime
#field int uMaxChannelTime
#field int ChDescriptionType
#field int uChannelListSize
#field byte ucChannelListBuffer 1
#endstruct
stdim st, DOT11_PHY_TYPE_INFO ; NSTRUCT 変数を確保
st->dot11PhyType = 100
mes "dot11PhyType=" + st->dot11PhyType