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

DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS

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

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

フィールド

フィールドサイズx64x86説明
SelfTestTypeDOT11_MANUFACTURING_SELF_TEST_TYPE4+0+0実行されたセルフテストの種類。
uTestIDDWORD4+4+4テストを識別するID。
bResultBOOLEAN1+8+8テストの合否を示す真偽値。
uPinFailedBitMaskDWORD4+12+12失敗したピンを示すビットマスク。
pvContextvoid*8/4+16+16コールバック時に渡されたコンテキストポインタ。
uBytesWrittenOutDWORD4+24+20ucBufferOutに書き込まれたバイト数。
ucBufferOutBYTE1+28+24テスト結果の出力データを保持するバイト配列。

各言語での定義

#include <windows.h>

// DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS  (x64 32 / x86 28 バイト)
typedef struct DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS {
    DOT11_MANUFACTURING_SELF_TEST_TYPE SelfTestType;
    DWORD uTestID;
    BOOLEAN bResult;
    DWORD uPinFailedBitMask;
    void* pvContext;
    DWORD uBytesWrittenOut;
    BYTE ucBufferOut[1];
} DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS
{
    public int SelfTestType;
    public uint uTestID;
    [MarshalAs(UnmanagedType.U1)] public bool bResult;
    public uint uPinFailedBitMask;
    public IntPtr pvContext;
    public uint uBytesWrittenOut;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] ucBufferOut;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS
    Public SelfTestType As Integer
    Public uTestID As UInteger
    <MarshalAs(UnmanagedType.U1)> Public bResult As Boolean
    Public uPinFailedBitMask As UInteger
    Public pvContext As IntPtr
    Public uBytesWrittenOut As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public ucBufferOut() As Byte
End Structure
import ctypes
from ctypes import wintypes

class DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS(ctypes.Structure):
    _fields_ = [
        ("SelfTestType", ctypes.c_int),
        ("uTestID", wintypes.DWORD),
        ("bResult", ctypes.c_byte),
        ("uPinFailedBitMask", wintypes.DWORD),
        ("pvContext", ctypes.c_void_p),
        ("uBytesWrittenOut", wintypes.DWORD),
        ("ucBufferOut", ctypes.c_ubyte * 1),
    ]
#[repr(C)]
pub struct DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS {
    pub SelfTestType: i32,
    pub uTestID: u32,
    pub bResult: u8,
    pub uPinFailedBitMask: u32,
    pub pvContext: *mut core::ffi::c_void,
    pub uBytesWrittenOut: u32,
    pub ucBufferOut: [u8; 1],
}
import "golang.org/x/sys/windows"

type DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS struct {
	SelfTestType int32
	uTestID uint32
	bResult byte
	uPinFailedBitMask uint32
	pvContext uintptr
	uBytesWrittenOut uint32
	ucBufferOut [1]byte
}
type
  DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS = record
    SelfTestType: Integer;
    uTestID: DWORD;
    bResult: ByteBool;
    uPinFailedBitMask: DWORD;
    pvContext: Pointer;
    uBytesWrittenOut: DWORD;
    ucBufferOut: array[0..0] of Byte;
  end;
const DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS = extern struct {
    SelfTestType: i32,
    uTestID: u32,
    bResult: u8,
    uPinFailedBitMask: u32,
    pvContext: ?*anyopaque,
    uBytesWrittenOut: u32,
    ucBufferOut: [1]u8,
};
type
  DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS {.bycopy.} = object
    SelfTestType: int32
    uTestID: uint32
    bResult: uint8
    uPinFailedBitMask: uint32
    pvContext: pointer
    uBytesWrittenOut: uint32
    ucBufferOut: array[1, uint8]
struct DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS
{
    int SelfTestType;
    uint uTestID;
    ubyte bResult;
    uint uPinFailedBitMask;
    void* pvContext;
    uint uBytesWrittenOut;
    ubyte[1] ucBufferOut;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; SelfTestType : DOT11_MANUFACTURING_SELF_TEST_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; uTestID : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; bResult : BOOLEAN (+8, 1byte)  poke st,8,値  /  値 = peek(st,8)
; uPinFailedBitMask : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pvContext : void* (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; uBytesWrittenOut : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ucBufferOut : BYTE (+24, 1byte)  varptr(st)+24 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS サイズ: 32 バイト(x64)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; SelfTestType : DOT11_MANUFACTURING_SELF_TEST_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; uTestID : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; bResult : BOOLEAN (+8, 1byte)  poke st,8,値  /  値 = peek(st,8)
; uPinFailedBitMask : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pvContext : void* (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; uBytesWrittenOut : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ucBufferOut : BYTE (+28, 1byte)  varptr(st)+28 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS
    #field int SelfTestType
    #field int uTestID
    #field bool1 bResult
    #field int uPinFailedBitMask
    #field intptr pvContext
    #field int uBytesWrittenOut
    #field byte ucBufferOut 1
#endstruct

stdim st, DOT11_MANUFACTURING_SELF_TEST_QUERY_RESULTS        ; NSTRUCT 変数を確保
st->SelfTestType = 100
mes "SelfTestType=" + st->SelfTestType