ホーム › NetworkManagement.WiFi › DOT11_AUTH_CIPHER_PAIR
DOT11_AUTH_CIPHER_PAIR
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| AuthAlgoId | DOT11_AUTH_ALGORITHM | 4 | +0 | +0 | 認証アルゴリズム識別子。WPA2-PSK 等を表す。 |
| CipherAlgoId | DOT11_CIPHER_ALGORITHM | 4 | +4 | +4 | 暗号アルゴリズム識別子。CCMP・TKIP 等を表す。 |
各言語での定義
#include <windows.h>
// DOT11_AUTH_CIPHER_PAIR (x64 8 / x86 8 バイト)
typedef struct DOT11_AUTH_CIPHER_PAIR {
DOT11_AUTH_ALGORITHM AuthAlgoId;
DOT11_CIPHER_ALGORITHM CipherAlgoId;
} DOT11_AUTH_CIPHER_PAIR;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_AUTH_CIPHER_PAIR
{
public int AuthAlgoId;
public int CipherAlgoId;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_AUTH_CIPHER_PAIR
Public AuthAlgoId As Integer
Public CipherAlgoId As Integer
End Structureimport ctypes
from ctypes import wintypes
class DOT11_AUTH_CIPHER_PAIR(ctypes.Structure):
_fields_ = [
("AuthAlgoId", ctypes.c_int),
("CipherAlgoId", ctypes.c_int),
]#[repr(C)]
pub struct DOT11_AUTH_CIPHER_PAIR {
pub AuthAlgoId: i32,
pub CipherAlgoId: i32,
}import "golang.org/x/sys/windows"
type DOT11_AUTH_CIPHER_PAIR struct {
AuthAlgoId int32
CipherAlgoId int32
}type
DOT11_AUTH_CIPHER_PAIR = record
AuthAlgoId: Integer;
CipherAlgoId: Integer;
end;const DOT11_AUTH_CIPHER_PAIR = extern struct {
AuthAlgoId: i32,
CipherAlgoId: i32,
};type
DOT11_AUTH_CIPHER_PAIR {.bycopy.} = object
AuthAlgoId: int32
CipherAlgoId: int32struct DOT11_AUTH_CIPHER_PAIR
{
int AuthAlgoId;
int CipherAlgoId;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_AUTH_CIPHER_PAIR サイズ: 8 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 8 / 4 切り上げ)
; AuthAlgoId : DOT11_AUTH_ALGORITHM (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CipherAlgoId : DOT11_CIPHER_ALGORITHM (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_AUTH_CIPHER_PAIR
#field int AuthAlgoId
#field int CipherAlgoId
#endstruct
stdim st, DOT11_AUTH_CIPHER_PAIR ; NSTRUCT 変数を確保
st->AuthAlgoId = 100
mes "AuthAlgoId=" + st->AuthAlgoId