ホーム › System.DeploymentServices › WDS_TRANSPORTCLIENT_CALLBACKS
WDS_TRANSPORTCLIENT_CALLBACKS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SessionStart | PFN_WdsTransportClientSessionStart | 8/4 | +0 | +0 | セッション開始時に呼ばれるコールバック関数。 |
| SessionStartEx | PFN_WdsTransportClientSessionStartEx | 8/4 | +8 | +4 | 拡張版のセッション開始コールバック関数。 |
| ReceiveContents | PFN_WdsTransportClientReceiveContents | 8/4 | +16 | +8 | コンテンツ受信時に呼ばれるコールバック関数。 |
| ReceiveMetadata | PFN_WdsTransportClientReceiveMetadata | 8/4 | +24 | +12 | メタデータ受信時に呼ばれるコールバック関数。 |
| SessionComplete | PFN_WdsTransportClientSessionComplete | 8/4 | +32 | +16 | セッション完了時に呼ばれるコールバック関数。 |
| SessionNegotiate | PFN_WdsTransportClientSessionNegotiate | 8/4 | +40 | +20 | セッションネゴシエーション時に呼ばれるコールバック関数。 |
各言語での定義
#include <windows.h>
// WDS_TRANSPORTCLIENT_CALLBACKS (x64 48 / x86 24 バイト)
typedef struct WDS_TRANSPORTCLIENT_CALLBACKS {
PFN_WdsTransportClientSessionStart SessionStart;
PFN_WdsTransportClientSessionStartEx SessionStartEx;
PFN_WdsTransportClientReceiveContents ReceiveContents;
PFN_WdsTransportClientReceiveMetadata ReceiveMetadata;
PFN_WdsTransportClientSessionComplete SessionComplete;
PFN_WdsTransportClientSessionNegotiate SessionNegotiate;
} WDS_TRANSPORTCLIENT_CALLBACKS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WDS_TRANSPORTCLIENT_CALLBACKS
{
public IntPtr SessionStart;
public IntPtr SessionStartEx;
public IntPtr ReceiveContents;
public IntPtr ReceiveMetadata;
public IntPtr SessionComplete;
public IntPtr SessionNegotiate;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WDS_TRANSPORTCLIENT_CALLBACKS
Public SessionStart As IntPtr
Public SessionStartEx As IntPtr
Public ReceiveContents As IntPtr
Public ReceiveMetadata As IntPtr
Public SessionComplete As IntPtr
Public SessionNegotiate As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class WDS_TRANSPORTCLIENT_CALLBACKS(ctypes.Structure):
_fields_ = [
("SessionStart", ctypes.c_void_p),
("SessionStartEx", ctypes.c_void_p),
("ReceiveContents", ctypes.c_void_p),
("ReceiveMetadata", ctypes.c_void_p),
("SessionComplete", ctypes.c_void_p),
("SessionNegotiate", ctypes.c_void_p),
]#[repr(C)]
pub struct WDS_TRANSPORTCLIENT_CALLBACKS {
pub SessionStart: *mut core::ffi::c_void,
pub SessionStartEx: *mut core::ffi::c_void,
pub ReceiveContents: *mut core::ffi::c_void,
pub ReceiveMetadata: *mut core::ffi::c_void,
pub SessionComplete: *mut core::ffi::c_void,
pub SessionNegotiate: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type WDS_TRANSPORTCLIENT_CALLBACKS struct {
SessionStart uintptr
SessionStartEx uintptr
ReceiveContents uintptr
ReceiveMetadata uintptr
SessionComplete uintptr
SessionNegotiate uintptr
}type
WDS_TRANSPORTCLIENT_CALLBACKS = record
SessionStart: Pointer;
SessionStartEx: Pointer;
ReceiveContents: Pointer;
ReceiveMetadata: Pointer;
SessionComplete: Pointer;
SessionNegotiate: Pointer;
end;const WDS_TRANSPORTCLIENT_CALLBACKS = extern struct {
SessionStart: ?*anyopaque,
SessionStartEx: ?*anyopaque,
ReceiveContents: ?*anyopaque,
ReceiveMetadata: ?*anyopaque,
SessionComplete: ?*anyopaque,
SessionNegotiate: ?*anyopaque,
};type
WDS_TRANSPORTCLIENT_CALLBACKS {.bycopy.} = object
SessionStart: pointer
SessionStartEx: pointer
ReceiveContents: pointer
ReceiveMetadata: pointer
SessionComplete: pointer
SessionNegotiate: pointerstruct WDS_TRANSPORTCLIENT_CALLBACKS
{
void* SessionStart;
void* SessionStartEx;
void* ReceiveContents;
void* ReceiveMetadata;
void* SessionComplete;
void* SessionNegotiate;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WDS_TRANSPORTCLIENT_CALLBACKS サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; SessionStart : PFN_WdsTransportClientSessionStart (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; SessionStartEx : PFN_WdsTransportClientSessionStartEx (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ReceiveContents : PFN_WdsTransportClientReceiveContents (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ReceiveMetadata : PFN_WdsTransportClientReceiveMetadata (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SessionComplete : PFN_WdsTransportClientSessionComplete (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SessionNegotiate : PFN_WdsTransportClientSessionNegotiate (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WDS_TRANSPORTCLIENT_CALLBACKS サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; SessionStart : PFN_WdsTransportClientSessionStart (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; SessionStartEx : PFN_WdsTransportClientSessionStartEx (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ReceiveContents : PFN_WdsTransportClientReceiveContents (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ReceiveMetadata : PFN_WdsTransportClientReceiveMetadata (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; SessionComplete : PFN_WdsTransportClientSessionComplete (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; SessionNegotiate : PFN_WdsTransportClientSessionNegotiate (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WDS_TRANSPORTCLIENT_CALLBACKS
#field intptr SessionStart
#field intptr SessionStartEx
#field intptr ReceiveContents
#field intptr ReceiveMetadata
#field intptr SessionComplete
#field intptr SessionNegotiate
#endstruct
stdim st, WDS_TRANSPORTCLIENT_CALLBACKS ; NSTRUCT 変数を確保