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