ホーム › NetworkManagement.WiFi › DOT11_WME_AC_PARAMETERS_LIST
DOT11_WME_AC_PARAMETERS_LIST
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| uNumOfEntries | DWORD | 4 | +0 | +0 | dot11WMEACParameters に実際に格納された要素数を表す。 |
| uTotalNumOfEntries | DWORD | 4 | +4 | +4 | 格納可能な WME AC パラメータの最大個数を表す。 |
| dot11WMEACParameters | DOT11_WME_AC_PARAMETERS | 6 | +8 | +8 | WME アクセスカテゴリパラメータを列挙する配列。可変長。 |
各言語での定義
#include <windows.h>
// DOT11_WME_AC_PARAMETERS (x64 6 / x86 6 バイト)
typedef struct DOT11_WME_AC_PARAMETERS {
BYTE ucAccessCategoryIndex;
BYTE ucAIFSN;
BYTE ucECWmin;
BYTE ucECWmax;
WORD usTXOPLimit;
} DOT11_WME_AC_PARAMETERS;
// DOT11_WME_AC_PARAMETERS_LIST (x64 16 / x86 16 バイト)
typedef struct DOT11_WME_AC_PARAMETERS_LIST {
DWORD uNumOfEntries;
DWORD uTotalNumOfEntries;
DOT11_WME_AC_PARAMETERS dot11WMEACParameters[1];
} DOT11_WME_AC_PARAMETERS_LIST;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_WME_AC_PARAMETERS
{
public byte ucAccessCategoryIndex;
public byte ucAIFSN;
public byte ucECWmin;
public byte ucECWmax;
public ushort usTXOPLimit;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_WME_AC_PARAMETERS_LIST
{
public uint uNumOfEntries;
public uint uTotalNumOfEntries;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public DOT11_WME_AC_PARAMETERS[] dot11WMEACParameters;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_WME_AC_PARAMETERS
Public ucAccessCategoryIndex As Byte
Public ucAIFSN As Byte
Public ucECWmin As Byte
Public ucECWmax As Byte
Public usTXOPLimit As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_WME_AC_PARAMETERS_LIST
Public uNumOfEntries As UInteger
Public uTotalNumOfEntries As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public dot11WMEACParameters() As DOT11_WME_AC_PARAMETERS
End Structureimport ctypes
from ctypes import wintypes
class DOT11_WME_AC_PARAMETERS(ctypes.Structure):
_fields_ = [
("ucAccessCategoryIndex", ctypes.c_ubyte),
("ucAIFSN", ctypes.c_ubyte),
("ucECWmin", ctypes.c_ubyte),
("ucECWmax", ctypes.c_ubyte),
("usTXOPLimit", ctypes.c_ushort),
]
class DOT11_WME_AC_PARAMETERS_LIST(ctypes.Structure):
_fields_ = [
("uNumOfEntries", wintypes.DWORD),
("uTotalNumOfEntries", wintypes.DWORD),
("dot11WMEACParameters", DOT11_WME_AC_PARAMETERS * 1),
]#[repr(C)]
pub struct DOT11_WME_AC_PARAMETERS {
pub ucAccessCategoryIndex: u8,
pub ucAIFSN: u8,
pub ucECWmin: u8,
pub ucECWmax: u8,
pub usTXOPLimit: u16,
}
#[repr(C)]
pub struct DOT11_WME_AC_PARAMETERS_LIST {
pub uNumOfEntries: u32,
pub uTotalNumOfEntries: u32,
pub dot11WMEACParameters: [DOT11_WME_AC_PARAMETERS; 1],
}import "golang.org/x/sys/windows"
type DOT11_WME_AC_PARAMETERS struct {
ucAccessCategoryIndex byte
ucAIFSN byte
ucECWmin byte
ucECWmax byte
usTXOPLimit uint16
}
type DOT11_WME_AC_PARAMETERS_LIST struct {
uNumOfEntries uint32
uTotalNumOfEntries uint32
dot11WMEACParameters [1]DOT11_WME_AC_PARAMETERS
}type
DOT11_WME_AC_PARAMETERS = record
ucAccessCategoryIndex: Byte;
ucAIFSN: Byte;
ucECWmin: Byte;
ucECWmax: Byte;
usTXOPLimit: Word;
end;
DOT11_WME_AC_PARAMETERS_LIST = record
uNumOfEntries: DWORD;
uTotalNumOfEntries: DWORD;
dot11WMEACParameters: array[0..0] of DOT11_WME_AC_PARAMETERS;
end;const DOT11_WME_AC_PARAMETERS = extern struct {
ucAccessCategoryIndex: u8,
ucAIFSN: u8,
ucECWmin: u8,
ucECWmax: u8,
usTXOPLimit: u16,
};
const DOT11_WME_AC_PARAMETERS_LIST = extern struct {
uNumOfEntries: u32,
uTotalNumOfEntries: u32,
dot11WMEACParameters: [1]DOT11_WME_AC_PARAMETERS,
};type
DOT11_WME_AC_PARAMETERS {.bycopy.} = object
ucAccessCategoryIndex: uint8
ucAIFSN: uint8
ucECWmin: uint8
ucECWmax: uint8
usTXOPLimit: uint16
DOT11_WME_AC_PARAMETERS_LIST {.bycopy.} = object
uNumOfEntries: uint32
uTotalNumOfEntries: uint32
dot11WMEACParameters: array[1, DOT11_WME_AC_PARAMETERS]struct DOT11_WME_AC_PARAMETERS
{
ubyte ucAccessCategoryIndex;
ubyte ucAIFSN;
ubyte ucECWmin;
ubyte ucECWmax;
ushort usTXOPLimit;
}
struct DOT11_WME_AC_PARAMETERS_LIST
{
uint uNumOfEntries;
uint uTotalNumOfEntries;
DOT11_WME_AC_PARAMETERS[1] dot11WMEACParameters;
}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_AC_PARAMETERS_LIST サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; uNumOfEntries : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; uTotalNumOfEntries : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dot11WMEACParameters : DOT11_WME_AC_PARAMETERS (+8, 6byte) varptr(st)+8 を基点に操作(6byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global DOT11_WME_AC_PARAMETERS
#field byte ucAccessCategoryIndex
#field byte ucAIFSN
#field byte ucECWmin
#field byte ucECWmax
#field short usTXOPLimit
#endstruct
#defstruct global DOT11_WME_AC_PARAMETERS_LIST
#field int uNumOfEntries
#field int uTotalNumOfEntries
#field DOT11_WME_AC_PARAMETERS dot11WMEACParameters 1
#endstruct
stdim st, DOT11_WME_AC_PARAMETERS_LIST ; NSTRUCT 変数を確保
st->uNumOfEntries = 100
mes "uNumOfEntries=" + st->uNumOfEntries