ホーム › System.RemoteDesktop › CHANNEL_ENTRY_POINTS
CHANNEL_ENTRY_POINTS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズ。バイト数で表す。 |
| protocolVersion | DWORD | 4 | +4 | +4 | 仮想チャネルプロトコルのバージョン番号。 |
| pVirtualChannelInit | PVIRTUALCHANNELINIT | 8/4 | +8 | +8 | チャネル初期化関数へのポインタ。 |
| pVirtualChannelOpen | PVIRTUALCHANNELOPEN | 8/4 | +16 | +12 | チャネルオープン関数へのポインタ。 |
| pVirtualChannelClose | PVIRTUALCHANNELCLOSE | 8/4 | +24 | +16 | チャネルクローズ関数へのポインタ。 |
| pVirtualChannelWrite | PVIRTUALCHANNELWRITE | 8/4 | +32 | +20 | チャネル書き込み関数へのポインタ。 |
各言語での定義
#include <windows.h>
// CHANNEL_ENTRY_POINTS (x64 40 / x86 24 バイト)
typedef struct CHANNEL_ENTRY_POINTS {
DWORD cbSize;
DWORD protocolVersion;
PVIRTUALCHANNELINIT pVirtualChannelInit;
PVIRTUALCHANNELOPEN pVirtualChannelOpen;
PVIRTUALCHANNELCLOSE pVirtualChannelClose;
PVIRTUALCHANNELWRITE pVirtualChannelWrite;
} CHANNEL_ENTRY_POINTS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CHANNEL_ENTRY_POINTS
{
public uint cbSize;
public uint protocolVersion;
public IntPtr pVirtualChannelInit;
public IntPtr pVirtualChannelOpen;
public IntPtr pVirtualChannelClose;
public IntPtr pVirtualChannelWrite;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CHANNEL_ENTRY_POINTS
Public cbSize As UInteger
Public protocolVersion As UInteger
Public pVirtualChannelInit As IntPtr
Public pVirtualChannelOpen As IntPtr
Public pVirtualChannelClose As IntPtr
Public pVirtualChannelWrite As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class CHANNEL_ENTRY_POINTS(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("protocolVersion", wintypes.DWORD),
("pVirtualChannelInit", ctypes.c_void_p),
("pVirtualChannelOpen", ctypes.c_void_p),
("pVirtualChannelClose", ctypes.c_void_p),
("pVirtualChannelWrite", ctypes.c_void_p),
]#[repr(C)]
pub struct CHANNEL_ENTRY_POINTS {
pub cbSize: u32,
pub protocolVersion: u32,
pub pVirtualChannelInit: *mut core::ffi::c_void,
pub pVirtualChannelOpen: *mut core::ffi::c_void,
pub pVirtualChannelClose: *mut core::ffi::c_void,
pub pVirtualChannelWrite: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type CHANNEL_ENTRY_POINTS struct {
cbSize uint32
protocolVersion uint32
pVirtualChannelInit uintptr
pVirtualChannelOpen uintptr
pVirtualChannelClose uintptr
pVirtualChannelWrite uintptr
}type
CHANNEL_ENTRY_POINTS = record
cbSize: DWORD;
protocolVersion: DWORD;
pVirtualChannelInit: Pointer;
pVirtualChannelOpen: Pointer;
pVirtualChannelClose: Pointer;
pVirtualChannelWrite: Pointer;
end;const CHANNEL_ENTRY_POINTS = extern struct {
cbSize: u32,
protocolVersion: u32,
pVirtualChannelInit: ?*anyopaque,
pVirtualChannelOpen: ?*anyopaque,
pVirtualChannelClose: ?*anyopaque,
pVirtualChannelWrite: ?*anyopaque,
};type
CHANNEL_ENTRY_POINTS {.bycopy.} = object
cbSize: uint32
protocolVersion: uint32
pVirtualChannelInit: pointer
pVirtualChannelOpen: pointer
pVirtualChannelClose: pointer
pVirtualChannelWrite: pointerstruct CHANNEL_ENTRY_POINTS
{
uint cbSize;
uint protocolVersion;
void* pVirtualChannelInit;
void* pVirtualChannelOpen;
void* pVirtualChannelClose;
void* pVirtualChannelWrite;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CHANNEL_ENTRY_POINTS サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; protocolVersion : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pVirtualChannelInit : PVIRTUALCHANNELINIT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pVirtualChannelOpen : PVIRTUALCHANNELOPEN (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pVirtualChannelClose : PVIRTUALCHANNELCLOSE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pVirtualChannelWrite : PVIRTUALCHANNELWRITE (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CHANNEL_ENTRY_POINTS サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; protocolVersion : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pVirtualChannelInit : PVIRTUALCHANNELINIT (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pVirtualChannelOpen : PVIRTUALCHANNELOPEN (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pVirtualChannelClose : PVIRTUALCHANNELCLOSE (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pVirtualChannelWrite : PVIRTUALCHANNELWRITE (+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 CHANNEL_ENTRY_POINTS
#field int cbSize
#field int protocolVersion
#field intptr pVirtualChannelInit
#field intptr pVirtualChannelOpen
#field intptr pVirtualChannelClose
#field intptr pVirtualChannelWrite
#endstruct
stdim st, CHANNEL_ENTRY_POINTS ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize