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

DOT11_SUPPORTED_DATA_RATES_VALUE

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

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

フィールド

フィールドサイズx64x86説明
ucSupportedTxDataRatesValueBYTE8+0+0対応する送信データレート値の配列。
ucSupportedRxDataRatesValueBYTE8+8+8対応する受信データレート値の配列。

各言語での定義

#include <windows.h>

// DOT11_SUPPORTED_DATA_RATES_VALUE  (x64 16 / x86 16 バイト)
typedef struct DOT11_SUPPORTED_DATA_RATES_VALUE {
    BYTE ucSupportedTxDataRatesValue[8];
    BYTE ucSupportedRxDataRatesValue[8];
} DOT11_SUPPORTED_DATA_RATES_VALUE;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_SUPPORTED_DATA_RATES_VALUE
{
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] ucSupportedTxDataRatesValue;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] ucSupportedRxDataRatesValue;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_SUPPORTED_DATA_RATES_VALUE
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public ucSupportedTxDataRatesValue() As Byte
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public ucSupportedRxDataRatesValue() As Byte
End Structure
import ctypes
from ctypes import wintypes

class DOT11_SUPPORTED_DATA_RATES_VALUE(ctypes.Structure):
    _fields_ = [
        ("ucSupportedTxDataRatesValue", ctypes.c_ubyte * 8),
        ("ucSupportedRxDataRatesValue", ctypes.c_ubyte * 8),
    ]
#[repr(C)]
pub struct DOT11_SUPPORTED_DATA_RATES_VALUE {
    pub ucSupportedTxDataRatesValue: [u8; 8],
    pub ucSupportedRxDataRatesValue: [u8; 8],
}
import "golang.org/x/sys/windows"

type DOT11_SUPPORTED_DATA_RATES_VALUE struct {
	ucSupportedTxDataRatesValue [8]byte
	ucSupportedRxDataRatesValue [8]byte
}
type
  DOT11_SUPPORTED_DATA_RATES_VALUE = record
    ucSupportedTxDataRatesValue: array[0..7] of Byte;
    ucSupportedRxDataRatesValue: array[0..7] of Byte;
  end;
const DOT11_SUPPORTED_DATA_RATES_VALUE = extern struct {
    ucSupportedTxDataRatesValue: [8]u8,
    ucSupportedRxDataRatesValue: [8]u8,
};
type
  DOT11_SUPPORTED_DATA_RATES_VALUE {.bycopy.} = object
    ucSupportedTxDataRatesValue: array[8, uint8]
    ucSupportedRxDataRatesValue: array[8, uint8]
struct DOT11_SUPPORTED_DATA_RATES_VALUE
{
    ubyte[8] ucSupportedTxDataRatesValue;
    ubyte[8] ucSupportedRxDataRatesValue;
}

HSP用 定義

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

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

stdim st, DOT11_SUPPORTED_DATA_RATES_VALUE        ; NSTRUCT 変数を確保