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

SChannelHookCallInfo

構造体
サイズx64: 56 バイト / x86: 48 バイト

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

フィールド

フィールドサイズx64x86説明
iidGUID16+0+0呼び出し対象インターフェイスのIID。
cbSizeDWORD4+16+16この構造体のバイトサイズ。
uCausalityGUID16+20+20論理スレッド(因果関係)を識別するGUID。
dwServerPidDWORD4+36+36サーバープロセスのID。
iMethodDWORD4+40+40呼び出されるメソッドのインデックス。
pObjectvoid*8/4+48+44対象オブジェクトへのポインタ。

各言語での定義

#include <windows.h>

// SChannelHookCallInfo  (x64 56 / x86 48 バイト)
typedef struct SChannelHookCallInfo {
    GUID iid;
    DWORD cbSize;
    GUID uCausality;
    DWORD dwServerPid;
    DWORD iMethod;
    void* pObject;
} SChannelHookCallInfo;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SChannelHookCallInfo
{
    public Guid iid;
    public uint cbSize;
    public Guid uCausality;
    public uint dwServerPid;
    public uint iMethod;
    public IntPtr pObject;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SChannelHookCallInfo
    Public iid As Guid
    Public cbSize As UInteger
    Public uCausality As Guid
    Public dwServerPid As UInteger
    Public iMethod As UInteger
    Public pObject As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class SChannelHookCallInfo(ctypes.Structure):
    _fields_ = [
        ("iid", GUID),
        ("cbSize", wintypes.DWORD),
        ("uCausality", GUID),
        ("dwServerPid", wintypes.DWORD),
        ("iMethod", wintypes.DWORD),
        ("pObject", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct SChannelHookCallInfo {
    pub iid: GUID,
    pub cbSize: u32,
    pub uCausality: GUID,
    pub dwServerPid: u32,
    pub iMethod: u32,
    pub pObject: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type SChannelHookCallInfo struct {
	iid windows.GUID
	cbSize uint32
	uCausality windows.GUID
	dwServerPid uint32
	iMethod uint32
	pObject uintptr
}
type
  SChannelHookCallInfo = record
    iid: TGUID;
    cbSize: DWORD;
    uCausality: TGUID;
    dwServerPid: DWORD;
    iMethod: DWORD;
    pObject: Pointer;
  end;
const SChannelHookCallInfo = extern struct {
    iid: GUID,
    cbSize: u32,
    uCausality: GUID,
    dwServerPid: u32,
    iMethod: u32,
    pObject: ?*anyopaque,
};
type
  SChannelHookCallInfo {.bycopy.} = object
    iid: GUID
    cbSize: uint32
    uCausality: GUID
    dwServerPid: uint32
    iMethod: uint32
    pObject: pointer
struct SChannelHookCallInfo
{
    GUID iid;
    uint cbSize;
    GUID uCausality;
    uint dwServerPid;
    uint iMethod;
    void* pObject;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SChannelHookCallInfo サイズ: 48 バイト(x86)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; iid : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; cbSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; uCausality : GUID (+20, 16byte)  varptr(st)+20 を基点に操作(16byte:入れ子/配列)
; dwServerPid : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; iMethod : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pObject : void* (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SChannelHookCallInfo サイズ: 56 バイト(x64)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; iid : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; cbSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; uCausality : GUID (+20, 16byte)  varptr(st)+20 を基点に操作(16byte:入れ子/配列)
; dwServerPid : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; iMethod : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pObject : void* (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
    #field int Data1
    #field short Data2
    #field short Data3
    #field byte Data4 8
#endstruct

#defstruct global SChannelHookCallInfo
    #field GUID iid
    #field int cbSize
    #field GUID uCausality
    #field int dwServerPid
    #field int iMethod
    #field intptr pObject
#endstruct

stdim st, SChannelHookCallInfo        ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize