ホーム › System.RemoteManagement › WSMAN_CONNECT_DATA
WSMAN_CONNECT_DATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| data | WSMAN_DATA | 24/12 | +0 | +0 | 接続応答として受信したデータ。WSMAN_DATAで表す。 |
各言語での定義
#include <windows.h>
// WSMAN_DATA (x64 24 / x86 12 バイト)
typedef struct WSMAN_DATA {
WSManDataType type;
_Anonymous_e__Union Anonymous;
} WSMAN_DATA;
// WSMAN_CONNECT_DATA (x64 24 / x86 12 バイト)
typedef struct WSMAN_CONNECT_DATA {
WSMAN_DATA data;
} WSMAN_CONNECT_DATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSMAN_DATA
{
public int type;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSMAN_CONNECT_DATA
{
public WSMAN_DATA data;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSMAN_DATA
Public type As Integer
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSMAN_CONNECT_DATA
Public data As WSMAN_DATA
End Structureimport ctypes
from ctypes import wintypes
class WSMAN_DATA(ctypes.Structure):
_fields_ = [
("type", ctypes.c_int),
("Anonymous", _Anonymous_e__Union),
]
class WSMAN_CONNECT_DATA(ctypes.Structure):
_fields_ = [
("data", WSMAN_DATA),
]#[repr(C)]
pub struct WSMAN_DATA {
pub type: i32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct WSMAN_CONNECT_DATA {
pub data: WSMAN_DATA,
}import "golang.org/x/sys/windows"
type WSMAN_DATA struct {
type int32
Anonymous _Anonymous_e__Union
}
type WSMAN_CONNECT_DATA struct {
data WSMAN_DATA
}type
WSMAN_DATA = record
type: Integer;
Anonymous: _Anonymous_e__Union;
end;
WSMAN_CONNECT_DATA = record
data: WSMAN_DATA;
end;const WSMAN_DATA = extern struct {
type: i32,
Anonymous: _Anonymous_e__Union,
};
const WSMAN_CONNECT_DATA = extern struct {
data: WSMAN_DATA,
};type
WSMAN_DATA {.bycopy.} = object
type: int32
Anonymous: _Anonymous_e__Union
WSMAN_CONNECT_DATA {.bycopy.} = object
data: WSMAN_DATAstruct WSMAN_DATA
{
int type;
_Anonymous_e__Union Anonymous;
}
struct WSMAN_CONNECT_DATA
{
WSMAN_DATA data;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WSMAN_CONNECT_DATA サイズ: 12 バイト(x86)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; data : WSMAN_DATA (+0, 12byte) varptr(st)+0 を基点に操作(12byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WSMAN_CONNECT_DATA サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; data : WSMAN_DATA (+0, 24byte) varptr(st)+0 を基点に操作(24byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WSMAN_DATA
#field int type
#field byte Anonymous 16
#endstruct
#defstruct global WSMAN_CONNECT_DATA
#field WSMAN_DATA data
#endstruct
stdim st, WSMAN_CONNECT_DATA ; NSTRUCT 変数を確保