ホーム › NetworkManagement.WiFi › DOT11_WME_UPDATE_IE
DOT11_WME_UPDATE_IE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| uParamElemMinBeaconIntervals | DWORD | 4 | +0 | +0 | パラメータ要素更新までの最小ビーコン間隔数を表す。 |
| uWMEInfoElemOffset | DWORD | 4 | +4 | +4 | WME 情報要素への先頭からのオフセット。 |
| uWMEInfoElemLength | DWORD | 4 | +8 | +8 | WME 情報要素のバイト長を表す。 |
| uWMEParamElemOffset | DWORD | 4 | +12 | +12 | WME パラメータ要素への先頭からのオフセット。 |
| uWMEParamElemLength | DWORD | 4 | +16 | +16 | WME パラメータ要素のバイト長を表す。 |
| ucBuffer | BYTE | 1 | +20 | +20 | 情報要素データを格納する可変長バッファ。 |
各言語での定義
#include <windows.h>
// DOT11_WME_UPDATE_IE (x64 24 / x86 24 バイト)
typedef struct DOT11_WME_UPDATE_IE {
DWORD uParamElemMinBeaconIntervals;
DWORD uWMEInfoElemOffset;
DWORD uWMEInfoElemLength;
DWORD uWMEParamElemOffset;
DWORD uWMEParamElemLength;
BYTE ucBuffer[1];
} DOT11_WME_UPDATE_IE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_WME_UPDATE_IE
{
public uint uParamElemMinBeaconIntervals;
public uint uWMEInfoElemOffset;
public uint uWMEInfoElemLength;
public uint uWMEParamElemOffset;
public uint uWMEParamElemLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] ucBuffer;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_WME_UPDATE_IE
Public uParamElemMinBeaconIntervals As UInteger
Public uWMEInfoElemOffset As UInteger
Public uWMEInfoElemLength As UInteger
Public uWMEParamElemOffset As UInteger
Public uWMEParamElemLength As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public ucBuffer() As Byte
End Structureimport ctypes
from ctypes import wintypes
class DOT11_WME_UPDATE_IE(ctypes.Structure):
_fields_ = [
("uParamElemMinBeaconIntervals", wintypes.DWORD),
("uWMEInfoElemOffset", wintypes.DWORD),
("uWMEInfoElemLength", wintypes.DWORD),
("uWMEParamElemOffset", wintypes.DWORD),
("uWMEParamElemLength", wintypes.DWORD),
("ucBuffer", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct DOT11_WME_UPDATE_IE {
pub uParamElemMinBeaconIntervals: u32,
pub uWMEInfoElemOffset: u32,
pub uWMEInfoElemLength: u32,
pub uWMEParamElemOffset: u32,
pub uWMEParamElemLength: u32,
pub ucBuffer: [u8; 1],
}import "golang.org/x/sys/windows"
type DOT11_WME_UPDATE_IE struct {
uParamElemMinBeaconIntervals uint32
uWMEInfoElemOffset uint32
uWMEInfoElemLength uint32
uWMEParamElemOffset uint32
uWMEParamElemLength uint32
ucBuffer [1]byte
}type
DOT11_WME_UPDATE_IE = record
uParamElemMinBeaconIntervals: DWORD;
uWMEInfoElemOffset: DWORD;
uWMEInfoElemLength: DWORD;
uWMEParamElemOffset: DWORD;
uWMEParamElemLength: DWORD;
ucBuffer: array[0..0] of Byte;
end;const DOT11_WME_UPDATE_IE = extern struct {
uParamElemMinBeaconIntervals: u32,
uWMEInfoElemOffset: u32,
uWMEInfoElemLength: u32,
uWMEParamElemOffset: u32,
uWMEParamElemLength: u32,
ucBuffer: [1]u8,
};type
DOT11_WME_UPDATE_IE {.bycopy.} = object
uParamElemMinBeaconIntervals: uint32
uWMEInfoElemOffset: uint32
uWMEInfoElemLength: uint32
uWMEParamElemOffset: uint32
uWMEParamElemLength: uint32
ucBuffer: array[1, uint8]struct DOT11_WME_UPDATE_IE
{
uint uParamElemMinBeaconIntervals;
uint uWMEInfoElemOffset;
uint uWMEInfoElemLength;
uint uWMEParamElemOffset;
uint uWMEParamElemLength;
ubyte[1] ucBuffer;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_WME_UPDATE_IE サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; uParamElemMinBeaconIntervals : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; uWMEInfoElemOffset : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; uWMEInfoElemLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; uWMEParamElemOffset : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; uWMEParamElemLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ucBuffer : BYTE (+20, 1byte) varptr(st)+20 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_WME_UPDATE_IE
#field int uParamElemMinBeaconIntervals
#field int uWMEInfoElemOffset
#field int uWMEInfoElemLength
#field int uWMEParamElemOffset
#field int uWMEParamElemLength
#field byte ucBuffer 1
#endstruct
stdim st, DOT11_WME_UPDATE_IE ; NSTRUCT 変数を確保
st->uParamElemMinBeaconIntervals = 100
mes "uParamElemMinBeaconIntervals=" + st->uParamElemMinBeaconIntervals