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