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