ホーム › System.Rpc › MesDecodeIncrementalHandleCreate
MesDecodeIncrementalHandleCreate
関数増分デコード用のシリアル化ハンドルを作成する。
シグネチャ
// RPCRT4.dll
#include <windows.h>
RPC_STATUS MesDecodeIncrementalHandleCreate(
void* UserState,
MIDL_ES_READ ReadFn,
void** pHandle
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| UserState | void* | inout |
| ReadFn | MIDL_ES_READ | in |
| pHandle | void** | inout |
戻り値の型: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
RPC_STATUS MesDecodeIncrementalHandleCreate(
void* UserState,
MIDL_ES_READ ReadFn,
void** pHandle
);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int MesDecodeIncrementalHandleCreate(
IntPtr UserState, // void* in/out
IntPtr ReadFn, // MIDL_ES_READ
IntPtr pHandle // void** in/out
);<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function MesDecodeIncrementalHandleCreate(
UserState As IntPtr, ' void* in/out
ReadFn As IntPtr, ' MIDL_ES_READ
pHandle As IntPtr ' void** in/out
) As Integer
End Function' UserState : void* in/out
' ReadFn : MIDL_ES_READ
' pHandle : void** in/out
Declare PtrSafe Function MesDecodeIncrementalHandleCreate Lib "rpcrt4" ( _
ByVal UserState As LongPtr, _
ByVal ReadFn As LongPtr, _
ByVal pHandle As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MesDecodeIncrementalHandleCreate = ctypes.windll.rpcrt4.MesDecodeIncrementalHandleCreate
MesDecodeIncrementalHandleCreate.restype = ctypes.c_int
MesDecodeIncrementalHandleCreate.argtypes = [
ctypes.POINTER(None), # UserState : void* in/out
ctypes.c_void_p, # ReadFn : MIDL_ES_READ
ctypes.c_void_p, # pHandle : void** in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
MesDecodeIncrementalHandleCreate = Fiddle::Function.new(
lib['MesDecodeIncrementalHandleCreate'],
[
Fiddle::TYPE_VOIDP, # UserState : void* in/out
Fiddle::TYPE_VOIDP, # ReadFn : MIDL_ES_READ
Fiddle::TYPE_VOIDP, # pHandle : void** in/out
],
Fiddle::TYPE_INT)#[link(name = "rpcrt4")]
extern "system" {
fn MesDecodeIncrementalHandleCreate(
UserState: *mut (), // void* in/out
ReadFn: *const core::ffi::c_void, // MIDL_ES_READ
pHandle: *mut *mut () // void** in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int MesDecodeIncrementalHandleCreate(IntPtr UserState, IntPtr ReadFn, IntPtr pHandle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_MesDecodeIncrementalHandleCreate' -Namespace Win32 -PassThru
# $api::MesDecodeIncrementalHandleCreate(UserState, ReadFn, pHandle)#uselib "RPCRT4.dll"
#func global MesDecodeIncrementalHandleCreate "MesDecodeIncrementalHandleCreate" sptr, sptr, sptr
; MesDecodeIncrementalHandleCreate UserState, ReadFn, pHandle ; 戻り値は stat
; UserState : void* in/out -> "sptr"
; ReadFn : MIDL_ES_READ -> "sptr"
; pHandle : void** in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RPCRT4.dll"
#cfunc global MesDecodeIncrementalHandleCreate "MesDecodeIncrementalHandleCreate" sptr, sptr, sptr
; res = MesDecodeIncrementalHandleCreate(UserState, ReadFn, pHandle)
; UserState : void* in/out -> "sptr"
; ReadFn : MIDL_ES_READ -> "sptr"
; pHandle : void** in/out -> "sptr"; RPC_STATUS MesDecodeIncrementalHandleCreate(void* UserState, MIDL_ES_READ ReadFn, void** pHandle)
#uselib "RPCRT4.dll"
#cfunc global MesDecodeIncrementalHandleCreate "MesDecodeIncrementalHandleCreate" intptr, intptr, intptr
; res = MesDecodeIncrementalHandleCreate(UserState, ReadFn, pHandle)
; UserState : void* in/out -> "intptr"
; ReadFn : MIDL_ES_READ -> "intptr"
; pHandle : void** in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procMesDecodeIncrementalHandleCreate = rpcrt4.NewProc("MesDecodeIncrementalHandleCreate")
)
// UserState (void* in/out), ReadFn (MIDL_ES_READ), pHandle (void** in/out)
r1, _, err := procMesDecodeIncrementalHandleCreate.Call(
uintptr(UserState),
uintptr(ReadFn),
uintptr(pHandle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction MesDecodeIncrementalHandleCreate(
UserState: Pointer; // void* in/out
ReadFn: Pointer; // MIDL_ES_READ
pHandle: Pointer // void** in/out
): Integer; stdcall;
external 'RPCRT4.dll' name 'MesDecodeIncrementalHandleCreate';result := DllCall("RPCRT4\MesDecodeIncrementalHandleCreate"
, "Ptr", UserState ; void* in/out
, "Ptr", ReadFn ; MIDL_ES_READ
, "Ptr", pHandle ; void** in/out
, "Int") ; return: RPC_STATUS●MesDecodeIncrementalHandleCreate(UserState, ReadFn, pHandle) = DLL("RPCRT4.dll", "int MesDecodeIncrementalHandleCreate(void*, void*, void*)")
# 呼び出し: MesDecodeIncrementalHandleCreate(UserState, ReadFn, pHandle)
# UserState : void* in/out -> "void*"
# ReadFn : MIDL_ES_READ -> "void*"
# pHandle : void** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。