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