ホーム › NetworkManagement.MobileBroadband › MBN_INTERFACE_CAPS
MBN_INTERFACE_CAPS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cellularClass | MBN_CELLULAR_CLASS | 4 | +0 | +0 | セルラー方式の種別(GSM/CDMA、MBN_CELLULAR_CLASS)を示す。 |
| voiceClass | MBN_VOICE_CLASS | 4 | +4 | +4 | 音声通話対応の種別(MBN_VOICE_CLASS)を示す。 |
| dataClass | DWORD | 4 | +8 | +8 | 対応するデータクラス(通信規格世代)を示すビットマスクである。 |
| customDataClass | LPWSTR | 8/4 | +16 | +12 | カスタムデータクラスの説明を指すワイド文字列である。 |
| gsmBandClass | DWORD | 4 | +24 | +16 | 対応するGSMバンドクラスを示すビットマスクである。 |
| cdmaBandClass | DWORD | 4 | +28 | +20 | 対応するCDMAバンドクラスを示すビットマスクである。 |
| customBandClass | LPWSTR | 8/4 | +32 | +24 | カスタムバンドクラスの説明を指すワイド文字列である。 |
| smsCaps | DWORD | 4 | +40 | +28 | SMS機能の対応状況を示すビットマスクである。 |
| controlCaps | DWORD | 4 | +44 | +32 | 制御機能(暗証番号管理等)の対応状況を示すビットマスクである。 |
| deviceID | LPWSTR | 8/4 | +48 | +36 | デバイスを一意に識別するID(IMEI/ESN等)を指すワイド文字列である。 |
| manufacturer | LPWSTR | 8/4 | +56 | +40 | デバイス製造元名を指すワイド文字列である。 |
| model | LPWSTR | 8/4 | +64 | +44 | デバイスのモデル名を指すワイド文字列である。 |
| firmwareInfo | LPWSTR | 8/4 | +72 | +48 | ファームウェアのバージョン情報を指すワイド文字列である。 |
各言語での定義
#include <windows.h>
// MBN_INTERFACE_CAPS (x64 80 / x86 52 バイト)
typedef struct MBN_INTERFACE_CAPS {
MBN_CELLULAR_CLASS cellularClass;
MBN_VOICE_CLASS voiceClass;
DWORD dataClass;
LPWSTR customDataClass;
DWORD gsmBandClass;
DWORD cdmaBandClass;
LPWSTR customBandClass;
DWORD smsCaps;
DWORD controlCaps;
LPWSTR deviceID;
LPWSTR manufacturer;
LPWSTR model;
LPWSTR firmwareInfo;
} MBN_INTERFACE_CAPS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MBN_INTERFACE_CAPS
{
public int cellularClass;
public int voiceClass;
public uint dataClass;
public IntPtr customDataClass;
public uint gsmBandClass;
public uint cdmaBandClass;
public IntPtr customBandClass;
public uint smsCaps;
public uint controlCaps;
public IntPtr deviceID;
public IntPtr manufacturer;
public IntPtr model;
public IntPtr firmwareInfo;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MBN_INTERFACE_CAPS
Public cellularClass As Integer
Public voiceClass As Integer
Public dataClass As UInteger
Public customDataClass As IntPtr
Public gsmBandClass As UInteger
Public cdmaBandClass As UInteger
Public customBandClass As IntPtr
Public smsCaps As UInteger
Public controlCaps As UInteger
Public deviceID As IntPtr
Public manufacturer As IntPtr
Public model As IntPtr
Public firmwareInfo As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MBN_INTERFACE_CAPS(ctypes.Structure):
_fields_ = [
("cellularClass", ctypes.c_int),
("voiceClass", ctypes.c_int),
("dataClass", wintypes.DWORD),
("customDataClass", ctypes.c_void_p),
("gsmBandClass", wintypes.DWORD),
("cdmaBandClass", wintypes.DWORD),
("customBandClass", ctypes.c_void_p),
("smsCaps", wintypes.DWORD),
("controlCaps", wintypes.DWORD),
("deviceID", ctypes.c_void_p),
("manufacturer", ctypes.c_void_p),
("model", ctypes.c_void_p),
("firmwareInfo", ctypes.c_void_p),
]#[repr(C)]
pub struct MBN_INTERFACE_CAPS {
pub cellularClass: i32,
pub voiceClass: i32,
pub dataClass: u32,
pub customDataClass: *mut core::ffi::c_void,
pub gsmBandClass: u32,
pub cdmaBandClass: u32,
pub customBandClass: *mut core::ffi::c_void,
pub smsCaps: u32,
pub controlCaps: u32,
pub deviceID: *mut core::ffi::c_void,
pub manufacturer: *mut core::ffi::c_void,
pub model: *mut core::ffi::c_void,
pub firmwareInfo: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type MBN_INTERFACE_CAPS struct {
cellularClass int32
voiceClass int32
dataClass uint32
customDataClass uintptr
gsmBandClass uint32
cdmaBandClass uint32
customBandClass uintptr
smsCaps uint32
controlCaps uint32
deviceID uintptr
manufacturer uintptr
model uintptr
firmwareInfo uintptr
}type
MBN_INTERFACE_CAPS = record
cellularClass: Integer;
voiceClass: Integer;
dataClass: DWORD;
customDataClass: Pointer;
gsmBandClass: DWORD;
cdmaBandClass: DWORD;
customBandClass: Pointer;
smsCaps: DWORD;
controlCaps: DWORD;
deviceID: Pointer;
manufacturer: Pointer;
model: Pointer;
firmwareInfo: Pointer;
end;const MBN_INTERFACE_CAPS = extern struct {
cellularClass: i32,
voiceClass: i32,
dataClass: u32,
customDataClass: ?*anyopaque,
gsmBandClass: u32,
cdmaBandClass: u32,
customBandClass: ?*anyopaque,
smsCaps: u32,
controlCaps: u32,
deviceID: ?*anyopaque,
manufacturer: ?*anyopaque,
model: ?*anyopaque,
firmwareInfo: ?*anyopaque,
};type
MBN_INTERFACE_CAPS {.bycopy.} = object
cellularClass: int32
voiceClass: int32
dataClass: uint32
customDataClass: pointer
gsmBandClass: uint32
cdmaBandClass: uint32
customBandClass: pointer
smsCaps: uint32
controlCaps: uint32
deviceID: pointer
manufacturer: pointer
model: pointer
firmwareInfo: pointerstruct MBN_INTERFACE_CAPS
{
int cellularClass;
int voiceClass;
uint dataClass;
void* customDataClass;
uint gsmBandClass;
uint cdmaBandClass;
void* customBandClass;
uint smsCaps;
uint controlCaps;
void* deviceID;
void* manufacturer;
void* model;
void* firmwareInfo;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MBN_INTERFACE_CAPS サイズ: 52 バイト(x86)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; cellularClass : MBN_CELLULAR_CLASS (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; voiceClass : MBN_VOICE_CLASS (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dataClass : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; customDataClass : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; gsmBandClass : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cdmaBandClass : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; customBandClass : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; smsCaps : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; controlCaps : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; deviceID : LPWSTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; manufacturer : LPWSTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; model : LPWSTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; firmwareInfo : LPWSTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MBN_INTERFACE_CAPS サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; cellularClass : MBN_CELLULAR_CLASS (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; voiceClass : MBN_VOICE_CLASS (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dataClass : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; customDataClass : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; gsmBandClass : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cdmaBandClass : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; customBandClass : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; smsCaps : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; controlCaps : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; deviceID : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; manufacturer : LPWSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; model : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; firmwareInfo : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MBN_INTERFACE_CAPS
#field int cellularClass
#field int voiceClass
#field int dataClass
#field intptr customDataClass
#field int gsmBandClass
#field int cdmaBandClass
#field intptr customBandClass
#field int smsCaps
#field int controlCaps
#field intptr deviceID
#field intptr manufacturer
#field intptr model
#field intptr firmwareInfo
#endstruct
stdim st, MBN_INTERFACE_CAPS ; NSTRUCT 変数を確保
st->cellularClass = 100
mes "cellularClass=" + st->cellularClass