ホーム › System.Rpc › NdrMesTypeDecode
NdrMesTypeDecode
関数シリアル化された型データをデコードする。
シグネチャ
// RPCRT4.dll
#include <windows.h>
void NdrMesTypeDecode(
void* Handle,
const MIDL_STUB_DESC* pStubDesc,
BYTE* pFormatString,
void* pObject
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Handle | void* | inout |
| pStubDesc | MIDL_STUB_DESC* | in |
| pFormatString | BYTE* | inout |
| pObject | void* | inout |
戻り値の型: void
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
void NdrMesTypeDecode(
void* Handle,
const MIDL_STUB_DESC* pStubDesc,
BYTE* pFormatString,
void* pObject
);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern void NdrMesTypeDecode(
IntPtr Handle, // void* in/out
IntPtr pStubDesc, // MIDL_STUB_DESC*
IntPtr pFormatString, // BYTE* in/out
IntPtr pObject // void* in/out
);<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Sub NdrMesTypeDecode(
Handle As IntPtr, ' void* in/out
pStubDesc As IntPtr, ' MIDL_STUB_DESC*
pFormatString As IntPtr, ' BYTE* in/out
pObject As IntPtr ' void* in/out
)
End Sub' Handle : void* in/out
' pStubDesc : MIDL_STUB_DESC*
' pFormatString : BYTE* in/out
' pObject : void* in/out
Declare PtrSafe Sub NdrMesTypeDecode Lib "rpcrt4" ( _
ByVal Handle As LongPtr, _
ByVal pStubDesc As LongPtr, _
ByVal pFormatString As LongPtr, _
ByVal pObject As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
NdrMesTypeDecode = ctypes.windll.rpcrt4.NdrMesTypeDecode
NdrMesTypeDecode.restype = None
NdrMesTypeDecode.argtypes = [
ctypes.POINTER(None), # Handle : void* in/out
ctypes.c_void_p, # pStubDesc : MIDL_STUB_DESC*
ctypes.POINTER(ctypes.c_ubyte), # pFormatString : BYTE* in/out
ctypes.POINTER(None), # pObject : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
NdrMesTypeDecode = Fiddle::Function.new(
lib['NdrMesTypeDecode'],
[
Fiddle::TYPE_VOIDP, # Handle : void* in/out
Fiddle::TYPE_VOIDP, # pStubDesc : MIDL_STUB_DESC*
Fiddle::TYPE_VOIDP, # pFormatString : BYTE* in/out
Fiddle::TYPE_VOIDP, # pObject : void* in/out
],
Fiddle::TYPE_VOID)#[link(name = "rpcrt4")]
extern "system" {
fn NdrMesTypeDecode(
Handle: *mut (), // void* in/out
pStubDesc: *const MIDL_STUB_DESC, // MIDL_STUB_DESC*
pFormatString: *mut u8, // BYTE* in/out
pObject: *mut () // void* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern void NdrMesTypeDecode(IntPtr Handle, IntPtr pStubDesc, IntPtr pFormatString, IntPtr pObject);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_NdrMesTypeDecode' -Namespace Win32 -PassThru
# $api::NdrMesTypeDecode(Handle, pStubDesc, pFormatString, pObject)#uselib "RPCRT4.dll"
#func global NdrMesTypeDecode "NdrMesTypeDecode" sptr, sptr, sptr, sptr
; NdrMesTypeDecode Handle, varptr(pStubDesc), varptr(pFormatString), pObject
; Handle : void* in/out -> "sptr"
; pStubDesc : MIDL_STUB_DESC* -> "sptr"
; pFormatString : BYTE* in/out -> "sptr"
; pObject : void* in/out -> "sptr"出力引数:
#uselib "RPCRT4.dll" #func global NdrMesTypeDecode "NdrMesTypeDecode" sptr, var, var, sptr ; NdrMesTypeDecode Handle, pStubDesc, pFormatString, pObject ; Handle : void* in/out -> "sptr" ; pStubDesc : MIDL_STUB_DESC* -> "var" ; pFormatString : BYTE* in/out -> "var" ; pObject : void* in/out -> "sptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RPCRT4.dll" #func global NdrMesTypeDecode "NdrMesTypeDecode" sptr, sptr, sptr, sptr ; NdrMesTypeDecode Handle, varptr(pStubDesc), varptr(pFormatString), pObject ; Handle : void* in/out -> "sptr" ; pStubDesc : MIDL_STUB_DESC* -> "sptr" ; pFormatString : BYTE* in/out -> "sptr" ; pObject : void* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void NdrMesTypeDecode(void* Handle, MIDL_STUB_DESC* pStubDesc, BYTE* pFormatString, void* pObject) #uselib "RPCRT4.dll" #func global NdrMesTypeDecode "NdrMesTypeDecode" intptr, var, var, intptr ; NdrMesTypeDecode Handle, pStubDesc, pFormatString, pObject ; Handle : void* in/out -> "intptr" ; pStubDesc : MIDL_STUB_DESC* -> "var" ; pFormatString : BYTE* in/out -> "var" ; pObject : void* in/out -> "intptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void NdrMesTypeDecode(void* Handle, MIDL_STUB_DESC* pStubDesc, BYTE* pFormatString, void* pObject) #uselib "RPCRT4.dll" #func global NdrMesTypeDecode "NdrMesTypeDecode" intptr, intptr, intptr, intptr ; NdrMesTypeDecode Handle, varptr(pStubDesc), varptr(pFormatString), pObject ; Handle : void* in/out -> "intptr" ; pStubDesc : MIDL_STUB_DESC* -> "intptr" ; pFormatString : BYTE* in/out -> "intptr" ; pObject : void* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procNdrMesTypeDecode = rpcrt4.NewProc("NdrMesTypeDecode")
)
// Handle (void* in/out), pStubDesc (MIDL_STUB_DESC*), pFormatString (BYTE* in/out), pObject (void* in/out)
r1, _, err := procNdrMesTypeDecode.Call(
uintptr(Handle),
uintptr(pStubDesc),
uintptr(pFormatString),
uintptr(pObject),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure NdrMesTypeDecode(
Handle: Pointer; // void* in/out
pStubDesc: Pointer; // MIDL_STUB_DESC*
pFormatString: Pointer; // BYTE* in/out
pObject: Pointer // void* in/out
); stdcall;
external 'RPCRT4.dll' name 'NdrMesTypeDecode';result := DllCall("RPCRT4\NdrMesTypeDecode"
, "Ptr", Handle ; void* in/out
, "Ptr", pStubDesc ; MIDL_STUB_DESC*
, "Ptr", pFormatString ; BYTE* in/out
, "Ptr", pObject ; void* in/out
, "Int") ; return: void●NdrMesTypeDecode(Handle, pStubDesc, pFormatString, pObject) = DLL("RPCRT4.dll", "int NdrMesTypeDecode(void*, void*, void*, void*)")
# 呼び出し: NdrMesTypeDecode(Handle, pStubDesc, pFormatString, pObject)
# Handle : void* in/out -> "void*"
# pStubDesc : MIDL_STUB_DESC* -> "void*"
# pFormatString : BYTE* in/out -> "void*"
# pObject : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。