Win32 API 日本語リファレンス
ホームSystem.RemoteManagement › WSMAN_SENDER_DETAILS

WSMAN_SENDER_DETAILS

構造体
サイズx64: 40 バイト / x86: 20 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
senderNameLPWSTR8/4+0+0送信者(クライアント)の名前。LPWSTR型。
authenticationMechanismLPWSTR8/4+8+4送信者が使用した認証メカニズム名。LPWSTR型。
certificateDetailsWSMAN_CERTIFICATE_DETAILS*8/4+16+8送信者の証明書詳細へのポインター。WSMAN_CERTIFICATE_DETAILS。NULL可。
clientTokenHANDLE8/4+24+12クライアントを表すアクセストークンのハンドル。
httpURLLPWSTR8/4+32+16リクエストのHTTP URL。LPWSTR型。

各言語での定義

#include <windows.h>

// WSMAN_SENDER_DETAILS  (x64 40 / x86 20 バイト)
typedef struct WSMAN_SENDER_DETAILS {
    LPWSTR senderName;
    LPWSTR authenticationMechanism;
    WSMAN_CERTIFICATE_DETAILS* certificateDetails;
    HANDLE clientToken;
    LPWSTR httpURL;
} WSMAN_SENDER_DETAILS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSMAN_SENDER_DETAILS
{
    public IntPtr senderName;
    public IntPtr authenticationMechanism;
    public IntPtr certificateDetails;
    public IntPtr clientToken;
    public IntPtr httpURL;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSMAN_SENDER_DETAILS
    Public senderName As IntPtr
    Public authenticationMechanism As IntPtr
    Public certificateDetails As IntPtr
    Public clientToken As IntPtr
    Public httpURL As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class WSMAN_SENDER_DETAILS(ctypes.Structure):
    _fields_ = [
        ("senderName", ctypes.c_void_p),
        ("authenticationMechanism", ctypes.c_void_p),
        ("certificateDetails", ctypes.c_void_p),
        ("clientToken", ctypes.c_void_p),
        ("httpURL", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct WSMAN_SENDER_DETAILS {
    pub senderName: *mut core::ffi::c_void,
    pub authenticationMechanism: *mut core::ffi::c_void,
    pub certificateDetails: *mut core::ffi::c_void,
    pub clientToken: *mut core::ffi::c_void,
    pub httpURL: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type WSMAN_SENDER_DETAILS struct {
	senderName uintptr
	authenticationMechanism uintptr
	certificateDetails uintptr
	clientToken uintptr
	httpURL uintptr
}
type
  WSMAN_SENDER_DETAILS = record
    senderName: Pointer;
    authenticationMechanism: Pointer;
    certificateDetails: Pointer;
    clientToken: Pointer;
    httpURL: Pointer;
  end;
const WSMAN_SENDER_DETAILS = extern struct {
    senderName: ?*anyopaque,
    authenticationMechanism: ?*anyopaque,
    certificateDetails: ?*anyopaque,
    clientToken: ?*anyopaque,
    httpURL: ?*anyopaque,
};
type
  WSMAN_SENDER_DETAILS {.bycopy.} = object
    senderName: pointer
    authenticationMechanism: pointer
    certificateDetails: pointer
    clientToken: pointer
    httpURL: pointer
struct WSMAN_SENDER_DETAILS
{
    void* senderName;
    void* authenticationMechanism;
    void* certificateDetails;
    void* clientToken;
    void* httpURL;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WSMAN_SENDER_DETAILS サイズ: 20 バイト(x86)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; senderName : LPWSTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; authenticationMechanism : LPWSTR (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; certificateDetails : WSMAN_CERTIFICATE_DETAILS* (+8, 4byte)  varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; clientToken : HANDLE (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; httpURL : LPWSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WSMAN_SENDER_DETAILS サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; senderName : LPWSTR (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; authenticationMechanism : LPWSTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; certificateDetails : WSMAN_CERTIFICATE_DETAILS* (+16, 8byte)  varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; clientToken : HANDLE (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; httpURL : LPWSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WSMAN_SENDER_DETAILS
    #field intptr senderName
    #field intptr authenticationMechanism
    #field intptr certificateDetails
    #field intptr clientToken
    #field intptr httpURL
#endstruct

stdim st, WSMAN_SENDER_DETAILS        ; NSTRUCT 変数を確保