WLAN_PROFILE_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| strProfileName | WCHAR | 512 | +0 | +0 | プロファイルの名前です。プロファイルがプロビジョニング用の場合、この値はドメイン名になることがあります。プロファイル名では大文字と小文字が区別されます。この文字列は NULL で終端されていなければなりません。 Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: プロファイルの名前は、ワイヤレスネットワークの SSID から自動的に導出されます。インフラストラクチャネットワークのプロファイルの場合、プロファイルの名前はネットワークの SSID です。アドホックネットワークのプロファイルの場合、プロファイルの名前はアドホックネットワークの SSID の後ろに | ||||||
| dwFlags | DWORD | 4 | +512 | +512 | ワイヤレスプロファイルの設定を指定するフラグのセットです。これらの値は Wlanapi.h ヘッダーファイルで定義されています。 Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: dwFlags は 0 でなければなりません。ユーザーごとのプロファイルはサポートされていません。 これらのフラグビットは組み合わせて指定できます
|
公式ドキュメント
WLAN_PROFILE_INFO 構造体には、プロファイルに関する基本情報が格納されます。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// WLAN_PROFILE_INFO (x64 516 / x86 516 バイト)
typedef struct WLAN_PROFILE_INFO {
WCHAR strProfileName[256];
DWORD dwFlags;
} WLAN_PROFILE_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WLAN_PROFILE_INFO
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string strProfileName;
public uint dwFlags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WLAN_PROFILE_INFO
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public strProfileName As String
Public dwFlags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class WLAN_PROFILE_INFO(ctypes.Structure):
_fields_ = [
("strProfileName", ctypes.c_wchar * 256),
("dwFlags", wintypes.DWORD),
]#[repr(C)]
pub struct WLAN_PROFILE_INFO {
pub strProfileName: [u16; 256],
pub dwFlags: u32,
}import "golang.org/x/sys/windows"
type WLAN_PROFILE_INFO struct {
strProfileName [256]uint16
dwFlags uint32
}type
WLAN_PROFILE_INFO = record
strProfileName: array[0..255] of WideChar;
dwFlags: DWORD;
end;const WLAN_PROFILE_INFO = extern struct {
strProfileName: [256]u16,
dwFlags: u32,
};type
WLAN_PROFILE_INFO {.bycopy.} = object
strProfileName: array[256, uint16]
dwFlags: uint32struct WLAN_PROFILE_INFO
{
wchar[256] strProfileName;
uint dwFlags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WLAN_PROFILE_INFO サイズ: 516 バイト(x64)
dim st, 129 ; 4byte整数×129(構造体サイズ 516 / 4 切り上げ)
; strProfileName : WCHAR (+0, 512byte) varptr(st)+0 を基点に操作(512byte:入れ子/配列)
; dwFlags : DWORD (+512, 4byte) st.128 = 値 / 値 = st.128 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WLAN_PROFILE_INFO
#field wchar strProfileName 256
#field int dwFlags
#endstruct
stdim st, WLAN_PROFILE_INFO ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags