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