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

I_RpcProxyCallbackInterface

構造体
サイズx64: 72 バイト / x86: 36 バイト

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

フィールド

フィールドサイズx64x86説明
IsValidMachineFnI_RpcProxyIsValidMachineFn8/4+0+0対象マシンが有効か検証するコールバック関数。
GetClientAddressFnI_RpcProxyGetClientAddressFn8/4+8+4クライアントアドレスを取得するコールバック関数。
GetConnectionTimeoutFnI_RpcProxyGetConnectionTimeoutFn8/4+16+8接続タイムアウト値を取得するコールバック関数。
PerformCalloutFnI_RpcPerformCalloutFn8/4+24+12コールアウト処理を実行するコールバック関数。
FreeCalloutStateFnI_RpcFreeCalloutStateFn8/4+32+16コールアウト状態を解放するコールバック関数。
GetClientSessionAndResourceUUIDFnI_RpcProxyGetClientSessionAndResourceUUID8/4+40+20クライアントのセッションとリソースUUIDを取得するコールバック関数。
ProxyFilterIfFnI_RpcProxyFilterIfFn8/4+48+24インターフェイスをフィルターするコールバック関数。
RpcProxyUpdatePerfCounterFnI_RpcProxyUpdatePerfCounterFn8/4+56+28パフォーマンスカウンターを更新するコールバック関数。
RpcProxyUpdatePerfCounterBackendServerFnI_RpcProxyUpdatePerfCounterBackendServerFn8/4+64+32バックエンドサーバーのパフォーマンスカウンターを更新するコールバック関数。

各言語での定義

#include <windows.h>

// I_RpcProxyCallbackInterface  (x64 72 / x86 36 バイト)
typedef struct I_RpcProxyCallbackInterface {
    I_RpcProxyIsValidMachineFn IsValidMachineFn;
    I_RpcProxyGetClientAddressFn GetClientAddressFn;
    I_RpcProxyGetConnectionTimeoutFn GetConnectionTimeoutFn;
    I_RpcPerformCalloutFn PerformCalloutFn;
    I_RpcFreeCalloutStateFn FreeCalloutStateFn;
    I_RpcProxyGetClientSessionAndResourceUUID GetClientSessionAndResourceUUIDFn;
    I_RpcProxyFilterIfFn ProxyFilterIfFn;
    I_RpcProxyUpdatePerfCounterFn RpcProxyUpdatePerfCounterFn;
    I_RpcProxyUpdatePerfCounterBackendServerFn RpcProxyUpdatePerfCounterBackendServerFn;
} I_RpcProxyCallbackInterface;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct I_RpcProxyCallbackInterface
{
    public IntPtr IsValidMachineFn;
    public IntPtr GetClientAddressFn;
    public IntPtr GetConnectionTimeoutFn;
    public IntPtr PerformCalloutFn;
    public IntPtr FreeCalloutStateFn;
    public IntPtr GetClientSessionAndResourceUUIDFn;
    public IntPtr ProxyFilterIfFn;
    public IntPtr RpcProxyUpdatePerfCounterFn;
    public IntPtr RpcProxyUpdatePerfCounterBackendServerFn;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure I_RpcProxyCallbackInterface
    Public IsValidMachineFn As IntPtr
    Public GetClientAddressFn As IntPtr
    Public GetConnectionTimeoutFn As IntPtr
    Public PerformCalloutFn As IntPtr
    Public FreeCalloutStateFn As IntPtr
    Public GetClientSessionAndResourceUUIDFn As IntPtr
    Public ProxyFilterIfFn As IntPtr
    Public RpcProxyUpdatePerfCounterFn As IntPtr
    Public RpcProxyUpdatePerfCounterBackendServerFn As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class I_RpcProxyCallbackInterface(ctypes.Structure):
    _fields_ = [
        ("IsValidMachineFn", ctypes.c_void_p),
        ("GetClientAddressFn", ctypes.c_void_p),
        ("GetConnectionTimeoutFn", ctypes.c_void_p),
        ("PerformCalloutFn", ctypes.c_void_p),
        ("FreeCalloutStateFn", ctypes.c_void_p),
        ("GetClientSessionAndResourceUUIDFn", ctypes.c_void_p),
        ("ProxyFilterIfFn", ctypes.c_void_p),
        ("RpcProxyUpdatePerfCounterFn", ctypes.c_void_p),
        ("RpcProxyUpdatePerfCounterBackendServerFn", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct I_RpcProxyCallbackInterface {
    pub IsValidMachineFn: *mut core::ffi::c_void,
    pub GetClientAddressFn: *mut core::ffi::c_void,
    pub GetConnectionTimeoutFn: *mut core::ffi::c_void,
    pub PerformCalloutFn: *mut core::ffi::c_void,
    pub FreeCalloutStateFn: *mut core::ffi::c_void,
    pub GetClientSessionAndResourceUUIDFn: *mut core::ffi::c_void,
    pub ProxyFilterIfFn: *mut core::ffi::c_void,
    pub RpcProxyUpdatePerfCounterFn: *mut core::ffi::c_void,
    pub RpcProxyUpdatePerfCounterBackendServerFn: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type I_RpcProxyCallbackInterface struct {
	IsValidMachineFn uintptr
	GetClientAddressFn uintptr
	GetConnectionTimeoutFn uintptr
	PerformCalloutFn uintptr
	FreeCalloutStateFn uintptr
	GetClientSessionAndResourceUUIDFn uintptr
	ProxyFilterIfFn uintptr
	RpcProxyUpdatePerfCounterFn uintptr
	RpcProxyUpdatePerfCounterBackendServerFn uintptr
}
type
  I_RpcProxyCallbackInterface = record
    IsValidMachineFn: Pointer;
    GetClientAddressFn: Pointer;
    GetConnectionTimeoutFn: Pointer;
    PerformCalloutFn: Pointer;
    FreeCalloutStateFn: Pointer;
    GetClientSessionAndResourceUUIDFn: Pointer;
    ProxyFilterIfFn: Pointer;
    RpcProxyUpdatePerfCounterFn: Pointer;
    RpcProxyUpdatePerfCounterBackendServerFn: Pointer;
  end;
const I_RpcProxyCallbackInterface = extern struct {
    IsValidMachineFn: ?*anyopaque,
    GetClientAddressFn: ?*anyopaque,
    GetConnectionTimeoutFn: ?*anyopaque,
    PerformCalloutFn: ?*anyopaque,
    FreeCalloutStateFn: ?*anyopaque,
    GetClientSessionAndResourceUUIDFn: ?*anyopaque,
    ProxyFilterIfFn: ?*anyopaque,
    RpcProxyUpdatePerfCounterFn: ?*anyopaque,
    RpcProxyUpdatePerfCounterBackendServerFn: ?*anyopaque,
};
type
  I_RpcProxyCallbackInterface {.bycopy.} = object
    IsValidMachineFn: pointer
    GetClientAddressFn: pointer
    GetConnectionTimeoutFn: pointer
    PerformCalloutFn: pointer
    FreeCalloutStateFn: pointer
    GetClientSessionAndResourceUUIDFn: pointer
    ProxyFilterIfFn: pointer
    RpcProxyUpdatePerfCounterFn: pointer
    RpcProxyUpdatePerfCounterBackendServerFn: pointer
struct I_RpcProxyCallbackInterface
{
    void* IsValidMachineFn;
    void* GetClientAddressFn;
    void* GetConnectionTimeoutFn;
    void* PerformCalloutFn;
    void* FreeCalloutStateFn;
    void* GetClientSessionAndResourceUUIDFn;
    void* ProxyFilterIfFn;
    void* RpcProxyUpdatePerfCounterFn;
    void* RpcProxyUpdatePerfCounterBackendServerFn;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; I_RpcProxyCallbackInterface サイズ: 36 バイト(x86)
dim st, 9    ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; IsValidMachineFn : I_RpcProxyIsValidMachineFn (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; GetClientAddressFn : I_RpcProxyGetClientAddressFn (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; GetConnectionTimeoutFn : I_RpcProxyGetConnectionTimeoutFn (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; PerformCalloutFn : I_RpcPerformCalloutFn (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; FreeCalloutStateFn : I_RpcFreeCalloutStateFn (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; GetClientSessionAndResourceUUIDFn : I_RpcProxyGetClientSessionAndResourceUUID (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ProxyFilterIfFn : I_RpcProxyFilterIfFn (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; RpcProxyUpdatePerfCounterFn : I_RpcProxyUpdatePerfCounterFn (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; RpcProxyUpdatePerfCounterBackendServerFn : I_RpcProxyUpdatePerfCounterBackendServerFn (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; I_RpcProxyCallbackInterface サイズ: 72 バイト(x64)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; IsValidMachineFn : I_RpcProxyIsValidMachineFn (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; GetClientAddressFn : I_RpcProxyGetClientAddressFn (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; GetConnectionTimeoutFn : I_RpcProxyGetConnectionTimeoutFn (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; PerformCalloutFn : I_RpcPerformCalloutFn (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; FreeCalloutStateFn : I_RpcFreeCalloutStateFn (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; GetClientSessionAndResourceUUIDFn : I_RpcProxyGetClientSessionAndResourceUUID (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ProxyFilterIfFn : I_RpcProxyFilterIfFn (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; RpcProxyUpdatePerfCounterFn : I_RpcProxyUpdatePerfCounterFn (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; RpcProxyUpdatePerfCounterBackendServerFn : I_RpcProxyUpdatePerfCounterBackendServerFn (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global I_RpcProxyCallbackInterface
    #field intptr IsValidMachineFn
    #field intptr GetClientAddressFn
    #field intptr GetConnectionTimeoutFn
    #field intptr PerformCalloutFn
    #field intptr FreeCalloutStateFn
    #field intptr GetClientSessionAndResourceUUIDFn
    #field intptr ProxyFilterIfFn
    #field intptr RpcProxyUpdatePerfCounterFn
    #field intptr RpcProxyUpdatePerfCounterBackendServerFn
#endstruct

stdim st, I_RpcProxyCallbackInterface        ; NSTRUCT 変数を確保