ホーム › System.Rpc › MIDL_STUBLESS_PROXY_INFO
MIDL_STUBLESS_PROXY_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pStubDesc | MIDL_STUB_DESC* | 8/4 | +0 | +0 | クライアント側で使用するMIDL_STUB_DESCへのポインタ。 |
| ProcFormatString | BYTE* | 8/4 | +8 | +4 | プロシージャを記述するNDRフォーマット文字列へのポインタ。 |
| FormatStringOffset | WORD* | 8/4 | +16 | +8 | 各メソッドのフォーマット文字列内オフセットを格納するWORD配列へのポインタ。 |
| pTransferSyntax | RPC_SYNTAX_IDENTIFIER* | 8/4 | +24 | +12 | 使用する転送構文の識別子へのポインタ。 |
| nCount | UINT_PTR | 8/4 | +32 | +16 | サポートする構文情報の個数。 |
| pSyntaxInfo | MIDL_SYNTAX_INFO* | 8/4 | +40 | +20 | 各転送構文に対応するMIDL_SYNTAX_INFO配列へのポインタ。NDR64対応で使用。 |
各言語での定義
#include <windows.h>
// MIDL_STUBLESS_PROXY_INFO (x64 48 / x86 24 バイト)
typedef struct MIDL_STUBLESS_PROXY_INFO {
MIDL_STUB_DESC* pStubDesc;
BYTE* ProcFormatString;
WORD* FormatStringOffset;
RPC_SYNTAX_IDENTIFIER* pTransferSyntax;
UINT_PTR nCount;
MIDL_SYNTAX_INFO* pSyntaxInfo;
} MIDL_STUBLESS_PROXY_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MIDL_STUBLESS_PROXY_INFO
{
public IntPtr pStubDesc;
public IntPtr ProcFormatString;
public IntPtr FormatStringOffset;
public IntPtr pTransferSyntax;
public UIntPtr nCount;
public IntPtr pSyntaxInfo;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MIDL_STUBLESS_PROXY_INFO
Public pStubDesc As IntPtr
Public ProcFormatString As IntPtr
Public FormatStringOffset As IntPtr
Public pTransferSyntax As IntPtr
Public nCount As UIntPtr
Public pSyntaxInfo As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MIDL_STUBLESS_PROXY_INFO(ctypes.Structure):
_fields_ = [
("pStubDesc", ctypes.c_void_p),
("ProcFormatString", ctypes.c_void_p),
("FormatStringOffset", ctypes.c_void_p),
("pTransferSyntax", ctypes.c_void_p),
("nCount", ctypes.c_size_t),
("pSyntaxInfo", ctypes.c_void_p),
]#[repr(C)]
pub struct MIDL_STUBLESS_PROXY_INFO {
pub pStubDesc: *mut core::ffi::c_void,
pub ProcFormatString: *mut core::ffi::c_void,
pub FormatStringOffset: *mut core::ffi::c_void,
pub pTransferSyntax: *mut core::ffi::c_void,
pub nCount: usize,
pub pSyntaxInfo: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type MIDL_STUBLESS_PROXY_INFO struct {
pStubDesc uintptr
ProcFormatString uintptr
FormatStringOffset uintptr
pTransferSyntax uintptr
nCount uintptr
pSyntaxInfo uintptr
}type
MIDL_STUBLESS_PROXY_INFO = record
pStubDesc: Pointer;
ProcFormatString: Pointer;
FormatStringOffset: Pointer;
pTransferSyntax: Pointer;
nCount: NativeUInt;
pSyntaxInfo: Pointer;
end;const MIDL_STUBLESS_PROXY_INFO = extern struct {
pStubDesc: ?*anyopaque,
ProcFormatString: ?*anyopaque,
FormatStringOffset: ?*anyopaque,
pTransferSyntax: ?*anyopaque,
nCount: usize,
pSyntaxInfo: ?*anyopaque,
};type
MIDL_STUBLESS_PROXY_INFO {.bycopy.} = object
pStubDesc: pointer
ProcFormatString: pointer
FormatStringOffset: pointer
pTransferSyntax: pointer
nCount: uint
pSyntaxInfo: pointerstruct MIDL_STUBLESS_PROXY_INFO
{
void* pStubDesc;
void* ProcFormatString;
void* FormatStringOffset;
void* pTransferSyntax;
size_t nCount;
void* pSyntaxInfo;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MIDL_STUBLESS_PROXY_INFO サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; pStubDesc : MIDL_STUB_DESC* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ProcFormatString : BYTE* (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; FormatStringOffset : WORD* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pTransferSyntax : RPC_SYNTAX_IDENTIFIER* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; nCount : UINT_PTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pSyntaxInfo : MIDL_SYNTAX_INFO* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIDL_STUBLESS_PROXY_INFO サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; pStubDesc : MIDL_STUB_DESC* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; ProcFormatString : BYTE* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; FormatStringOffset : WORD* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pTransferSyntax : RPC_SYNTAX_IDENTIFIER* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; nCount : UINT_PTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pSyntaxInfo : MIDL_SYNTAX_INFO* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MIDL_STUBLESS_PROXY_INFO
#field intptr pStubDesc
#field intptr ProcFormatString
#field intptr FormatStringOffset
#field intptr pTransferSyntax
#field intptr nCount
#field intptr pSyntaxInfo
#endstruct
stdim st, MIDL_STUBLESS_PROXY_INFO ; NSTRUCT 変数を確保
st->nCount = 100
mes "nCount=" + st->nCount