ホーム › System.Wmi › MI_DestinationOptionsFT
MI_DestinationOptionsFT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Delete | INT_PTR | 8/4 | +0 | +0 | 接続先オプションを削除する関数ポインタ。 |
| SetString | INT_PTR | 8/4 | +8 | +4 | 文字列オプションを設定する関数ポインタ。 |
| SetNumber | INT_PTR | 8/4 | +16 | +8 | 数値オプションを設定する関数ポインタ。 |
| AddCredentials | INT_PTR | 8/4 | +24 | +12 | 接続用資格情報を追加する関数ポインタ。 |
| GetString | INT_PTR | 8/4 | +32 | +16 | 文字列オプションを取得する関数ポインタ。 |
| GetNumber | INT_PTR | 8/4 | +40 | +20 | 数値オプションを取得する関数ポインタ。 |
| GetOptionCount | INT_PTR | 8/4 | +48 | +24 | オプションの数を取得する関数ポインタ。 |
| GetOptionAt | INT_PTR | 8/4 | +56 | +28 | インデックス指定でオプションを取得する関数ポインタ。 |
| GetOption | INT_PTR | 8/4 | +64 | +32 | 名前指定でオプションを取得する関数ポインタ。 |
| GetCredentialsCount | INT_PTR | 8/4 | +72 | +36 | 登録された資格情報の数を取得する関数ポインタ。 |
| GetCredentialsAt | INT_PTR | 8/4 | +80 | +40 | インデックス指定で資格情報を取得する関数ポインタ。 |
| GetCredentialsPasswordAt | INT_PTR | 8/4 | +88 | +44 | インデックス指定でパスワード付き資格情報を取得する関数ポインタ。 |
| Clone | INT_PTR | 8/4 | +96 | +48 | 接続先オプションを複製する関数ポインタ。 |
| SetInterval | INT_PTR | 8/4 | +104 | +52 | 間隔オプションを設定する関数ポインタ。 |
| GetInterval | INT_PTR | 8/4 | +112 | +56 | 間隔オプションを取得する関数ポインタ。 |
各言語での定義
#include <windows.h>
// MI_DestinationOptionsFT (x64 120 / x86 60 バイト)
typedef struct MI_DestinationOptionsFT {
INT_PTR Delete;
INT_PTR SetString;
INT_PTR SetNumber;
INT_PTR AddCredentials;
INT_PTR GetString;
INT_PTR GetNumber;
INT_PTR GetOptionCount;
INT_PTR GetOptionAt;
INT_PTR GetOption;
INT_PTR GetCredentialsCount;
INT_PTR GetCredentialsAt;
INT_PTR GetCredentialsPasswordAt;
INT_PTR Clone;
INT_PTR SetInterval;
INT_PTR GetInterval;
} MI_DestinationOptionsFT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_DestinationOptionsFT
{
public IntPtr Delete;
public IntPtr SetString;
public IntPtr SetNumber;
public IntPtr AddCredentials;
public IntPtr GetString;
public IntPtr GetNumber;
public IntPtr GetOptionCount;
public IntPtr GetOptionAt;
public IntPtr GetOption;
public IntPtr GetCredentialsCount;
public IntPtr GetCredentialsAt;
public IntPtr GetCredentialsPasswordAt;
public IntPtr Clone;
public IntPtr SetInterval;
public IntPtr GetInterval;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_DestinationOptionsFT
Public Delete As IntPtr
Public SetString As IntPtr
Public SetNumber As IntPtr
Public AddCredentials As IntPtr
Public GetString As IntPtr
Public GetNumber As IntPtr
Public GetOptionCount As IntPtr
Public GetOptionAt As IntPtr
Public GetOption As IntPtr
Public GetCredentialsCount As IntPtr
Public GetCredentialsAt As IntPtr
Public GetCredentialsPasswordAt As IntPtr
Public Clone As IntPtr
Public SetInterval As IntPtr
Public GetInterval As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MI_DestinationOptionsFT(ctypes.Structure):
_fields_ = [
("Delete", ctypes.c_ssize_t),
("SetString", ctypes.c_ssize_t),
("SetNumber", ctypes.c_ssize_t),
("AddCredentials", ctypes.c_ssize_t),
("GetString", ctypes.c_ssize_t),
("GetNumber", ctypes.c_ssize_t),
("GetOptionCount", ctypes.c_ssize_t),
("GetOptionAt", ctypes.c_ssize_t),
("GetOption", ctypes.c_ssize_t),
("GetCredentialsCount", ctypes.c_ssize_t),
("GetCredentialsAt", ctypes.c_ssize_t),
("GetCredentialsPasswordAt", ctypes.c_ssize_t),
("Clone", ctypes.c_ssize_t),
("SetInterval", ctypes.c_ssize_t),
("GetInterval", ctypes.c_ssize_t),
]#[repr(C)]
pub struct MI_DestinationOptionsFT {
pub Delete: isize,
pub SetString: isize,
pub SetNumber: isize,
pub AddCredentials: isize,
pub GetString: isize,
pub GetNumber: isize,
pub GetOptionCount: isize,
pub GetOptionAt: isize,
pub GetOption: isize,
pub GetCredentialsCount: isize,
pub GetCredentialsAt: isize,
pub GetCredentialsPasswordAt: isize,
pub Clone: isize,
pub SetInterval: isize,
pub GetInterval: isize,
}import "golang.org/x/sys/windows"
type MI_DestinationOptionsFT struct {
Delete uintptr
SetString uintptr
SetNumber uintptr
AddCredentials uintptr
GetString uintptr
GetNumber uintptr
GetOptionCount uintptr
GetOptionAt uintptr
GetOption uintptr
GetCredentialsCount uintptr
GetCredentialsAt uintptr
GetCredentialsPasswordAt uintptr
Clone uintptr
SetInterval uintptr
GetInterval uintptr
}type
MI_DestinationOptionsFT = record
Delete: NativeInt;
SetString: NativeInt;
SetNumber: NativeInt;
AddCredentials: NativeInt;
GetString: NativeInt;
GetNumber: NativeInt;
GetOptionCount: NativeInt;
GetOptionAt: NativeInt;
GetOption: NativeInt;
GetCredentialsCount: NativeInt;
GetCredentialsAt: NativeInt;
GetCredentialsPasswordAt: NativeInt;
Clone: NativeInt;
SetInterval: NativeInt;
GetInterval: NativeInt;
end;const MI_DestinationOptionsFT = extern struct {
Delete: isize,
SetString: isize,
SetNumber: isize,
AddCredentials: isize,
GetString: isize,
GetNumber: isize,
GetOptionCount: isize,
GetOptionAt: isize,
GetOption: isize,
GetCredentialsCount: isize,
GetCredentialsAt: isize,
GetCredentialsPasswordAt: isize,
Clone: isize,
SetInterval: isize,
GetInterval: isize,
};type
MI_DestinationOptionsFT {.bycopy.} = object
Delete: int
SetString: int
SetNumber: int
AddCredentials: int
GetString: int
GetNumber: int
GetOptionCount: int
GetOptionAt: int
GetOption: int
GetCredentialsCount: int
GetCredentialsAt: int
GetCredentialsPasswordAt: int
Clone: int
SetInterval: int
GetInterval: intstruct MI_DestinationOptionsFT
{
ptrdiff_t Delete;
ptrdiff_t SetString;
ptrdiff_t SetNumber;
ptrdiff_t AddCredentials;
ptrdiff_t GetString;
ptrdiff_t GetNumber;
ptrdiff_t GetOptionCount;
ptrdiff_t GetOptionAt;
ptrdiff_t GetOption;
ptrdiff_t GetCredentialsCount;
ptrdiff_t GetCredentialsAt;
ptrdiff_t GetCredentialsPasswordAt;
ptrdiff_t Clone;
ptrdiff_t SetInterval;
ptrdiff_t GetInterval;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MI_DestinationOptionsFT サイズ: 60 バイト(x86)
dim st, 15 ; 4byte整数×15(構造体サイズ 60 / 4 切り上げ)
; Delete : INT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; SetString : INT_PTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SetNumber : INT_PTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; AddCredentials : INT_PTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; GetString : INT_PTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; GetNumber : INT_PTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; GetOptionCount : INT_PTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; GetOptionAt : INT_PTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; GetOption : INT_PTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; GetCredentialsCount : INT_PTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; GetCredentialsAt : INT_PTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; GetCredentialsPasswordAt : INT_PTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; Clone : INT_PTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; SetInterval : INT_PTR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; GetInterval : INT_PTR (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MI_DestinationOptionsFT サイズ: 120 バイト(x64)
dim st, 30 ; 4byte整数×30(構造体サイズ 120 / 4 切り上げ)
; Delete : INT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; SetString : INT_PTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SetNumber : INT_PTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; AddCredentials : INT_PTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; GetString : INT_PTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; GetNumber : INT_PTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; GetOptionCount : INT_PTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; GetOptionAt : INT_PTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; GetOption : INT_PTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; GetCredentialsCount : INT_PTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; GetCredentialsAt : INT_PTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; GetCredentialsPasswordAt : INT_PTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; Clone : INT_PTR (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; SetInterval : INT_PTR (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; GetInterval : INT_PTR (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MI_DestinationOptionsFT
#field intptr Delete
#field intptr SetString
#field intptr SetNumber
#field intptr AddCredentials
#field intptr GetString
#field intptr GetNumber
#field intptr GetOptionCount
#field intptr GetOptionAt
#field intptr GetOption
#field intptr GetCredentialsCount
#field intptr GetCredentialsAt
#field intptr GetCredentialsPasswordAt
#field intptr Clone
#field intptr SetInterval
#field intptr GetInterval
#endstruct
stdim st, MI_DestinationOptionsFT ; NSTRUCT 変数を確保
st->Delete = 100
mes "Delete=" + st->Delete