ホーム › System.RemoteManagement › WSMAN_PROXY_INFO
WSMAN_PROXY_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| accessType | DWORD | 4 | +0 | +0 | プロキシのアクセス種別を示すフラグ。直接/自動検出等。 |
| authenticationCredentials | WSMAN_AUTHENTICATION_CREDENTIALS | 24/12 | +8 | +4 | プロキシ認証の資格情報。WSMAN_AUTHENTICATION_CREDENTIALSで表す。 |
各言語での定義
#include <windows.h>
// WSMAN_AUTHENTICATION_CREDENTIALS (x64 24 / x86 12 バイト)
typedef struct WSMAN_AUTHENTICATION_CREDENTIALS {
DWORD authenticationMechanism;
_Anonymous_e__Union Anonymous;
} WSMAN_AUTHENTICATION_CREDENTIALS;
// WSMAN_PROXY_INFO (x64 32 / x86 16 バイト)
typedef struct WSMAN_PROXY_INFO {
DWORD accessType;
WSMAN_AUTHENTICATION_CREDENTIALS authenticationCredentials;
} WSMAN_PROXY_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSMAN_AUTHENTICATION_CREDENTIALS
{
public uint authenticationMechanism;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSMAN_PROXY_INFO
{
public uint accessType;
public WSMAN_AUTHENTICATION_CREDENTIALS authenticationCredentials;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSMAN_AUTHENTICATION_CREDENTIALS
Public authenticationMechanism As UInteger
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSMAN_PROXY_INFO
Public accessType As UInteger
Public authenticationCredentials As WSMAN_AUTHENTICATION_CREDENTIALS
End Structureimport ctypes
from ctypes import wintypes
class WSMAN_AUTHENTICATION_CREDENTIALS(ctypes.Structure):
_fields_ = [
("authenticationMechanism", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class WSMAN_PROXY_INFO(ctypes.Structure):
_fields_ = [
("accessType", wintypes.DWORD),
("authenticationCredentials", WSMAN_AUTHENTICATION_CREDENTIALS),
]#[repr(C)]
pub struct WSMAN_AUTHENTICATION_CREDENTIALS {
pub authenticationMechanism: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct WSMAN_PROXY_INFO {
pub accessType: u32,
pub authenticationCredentials: WSMAN_AUTHENTICATION_CREDENTIALS,
}import "golang.org/x/sys/windows"
type WSMAN_AUTHENTICATION_CREDENTIALS struct {
authenticationMechanism uint32
Anonymous _Anonymous_e__Union
}
type WSMAN_PROXY_INFO struct {
accessType uint32
authenticationCredentials WSMAN_AUTHENTICATION_CREDENTIALS
}type
WSMAN_AUTHENTICATION_CREDENTIALS = record
authenticationMechanism: DWORD;
Anonymous: _Anonymous_e__Union;
end;
WSMAN_PROXY_INFO = record
accessType: DWORD;
authenticationCredentials: WSMAN_AUTHENTICATION_CREDENTIALS;
end;const WSMAN_AUTHENTICATION_CREDENTIALS = extern struct {
authenticationMechanism: u32,
Anonymous: _Anonymous_e__Union,
};
const WSMAN_PROXY_INFO = extern struct {
accessType: u32,
authenticationCredentials: WSMAN_AUTHENTICATION_CREDENTIALS,
};type
WSMAN_AUTHENTICATION_CREDENTIALS {.bycopy.} = object
authenticationMechanism: uint32
Anonymous: _Anonymous_e__Union
WSMAN_PROXY_INFO {.bycopy.} = object
accessType: uint32
authenticationCredentials: WSMAN_AUTHENTICATION_CREDENTIALSstruct WSMAN_AUTHENTICATION_CREDENTIALS
{
uint authenticationMechanism;
_Anonymous_e__Union Anonymous;
}
struct WSMAN_PROXY_INFO
{
uint accessType;
WSMAN_AUTHENTICATION_CREDENTIALS authenticationCredentials;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WSMAN_PROXY_INFO サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; accessType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; authenticationCredentials : WSMAN_AUTHENTICATION_CREDENTIALS (+4, 12byte) varptr(st)+4 を基点に操作(12byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WSMAN_PROXY_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; accessType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; authenticationCredentials : WSMAN_AUTHENTICATION_CREDENTIALS (+8, 24byte) varptr(st)+8 を基点に操作(24byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WSMAN_AUTHENTICATION_CREDENTIALS
#field int authenticationMechanism
#field byte Anonymous 16
#endstruct
#defstruct global WSMAN_PROXY_INFO
#field int accessType
#field WSMAN_AUTHENTICATION_CREDENTIALS authenticationCredentials
#endstruct
stdim st, WSMAN_PROXY_INFO ; NSTRUCT 変数を確保
st->accessType = 100
mes "accessType=" + st->accessType