ホーム › System.Rpc › RpcServerInqCallAttributesW
RpcServerInqCallAttributesW
関数サーバー側で現在のRPC呼び出しの属性を照会する(Unicode版)。
シグネチャ
// RPCRT4.dll (Unicode / -W)
#include <windows.h>
RPC_STATUS RpcServerInqCallAttributesW(
void* ClientBinding, // optional
void* RpcCallAttributes
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ClientBinding | void* | inoptional |
| RpcCallAttributes | void* | inout |
戻り値の型: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll (Unicode / -W)
#include <windows.h>
RPC_STATUS RpcServerInqCallAttributesW(
void* ClientBinding, // optional
void* RpcCallAttributes
);[DllImport("RPCRT4.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int RpcServerInqCallAttributesW(
IntPtr ClientBinding, // void* optional
IntPtr RpcCallAttributes // void* in/out
);<DllImport("RPCRT4.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function RpcServerInqCallAttributesW(
ClientBinding As IntPtr, ' void* optional
RpcCallAttributes As IntPtr ' void* in/out
) As Integer
End Function' ClientBinding : void* optional
' RpcCallAttributes : void* in/out
Declare PtrSafe Function RpcServerInqCallAttributesW Lib "rpcrt4" ( _
ByVal ClientBinding As LongPtr, _
ByVal RpcCallAttributes As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RpcServerInqCallAttributesW = ctypes.windll.rpcrt4.RpcServerInqCallAttributesW
RpcServerInqCallAttributesW.restype = ctypes.c_int
RpcServerInqCallAttributesW.argtypes = [
ctypes.POINTER(None), # ClientBinding : void* optional
ctypes.POINTER(None), # RpcCallAttributes : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
RpcServerInqCallAttributesW = Fiddle::Function.new(
lib['RpcServerInqCallAttributesW'],
[
Fiddle::TYPE_VOIDP, # ClientBinding : void* optional
Fiddle::TYPE_VOIDP, # RpcCallAttributes : void* in/out
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "rpcrt4")]
extern "system" {
fn RpcServerInqCallAttributesW(
ClientBinding: *mut (), // void* optional
RpcCallAttributes: *mut () // void* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll", CharSet = CharSet.Unicode)]
public static extern int RpcServerInqCallAttributesW(IntPtr ClientBinding, IntPtr RpcCallAttributes);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcServerInqCallAttributesW' -Namespace Win32 -PassThru
# $api::RpcServerInqCallAttributesW(ClientBinding, RpcCallAttributes)#uselib "RPCRT4.dll"
#func global RpcServerInqCallAttributesW "RpcServerInqCallAttributesW" wptr, wptr
; RpcServerInqCallAttributesW ClientBinding, RpcCallAttributes ; 戻り値は stat
; ClientBinding : void* optional -> "wptr"
; RpcCallAttributes : void* in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RPCRT4.dll"
#cfunc global RpcServerInqCallAttributesW "RpcServerInqCallAttributesW" sptr, sptr
; res = RpcServerInqCallAttributesW(ClientBinding, RpcCallAttributes)
; ClientBinding : void* optional -> "sptr"
; RpcCallAttributes : void* in/out -> "sptr"; RPC_STATUS RpcServerInqCallAttributesW(void* ClientBinding, void* RpcCallAttributes)
#uselib "RPCRT4.dll"
#cfunc global RpcServerInqCallAttributesW "RpcServerInqCallAttributesW" intptr, intptr
; res = RpcServerInqCallAttributesW(ClientBinding, RpcCallAttributes)
; ClientBinding : void* optional -> "intptr"
; RpcCallAttributes : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procRpcServerInqCallAttributesW = rpcrt4.NewProc("RpcServerInqCallAttributesW")
)
// ClientBinding (void* optional), RpcCallAttributes (void* in/out)
r1, _, err := procRpcServerInqCallAttributesW.Call(
uintptr(ClientBinding),
uintptr(RpcCallAttributes),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction RpcServerInqCallAttributesW(
ClientBinding: Pointer; // void* optional
RpcCallAttributes: Pointer // void* in/out
): Integer; stdcall;
external 'RPCRT4.dll' name 'RpcServerInqCallAttributesW';result := DllCall("RPCRT4\RpcServerInqCallAttributesW"
, "Ptr", ClientBinding ; void* optional
, "Ptr", RpcCallAttributes ; void* in/out
, "Int") ; return: RPC_STATUS●RpcServerInqCallAttributesW(ClientBinding, RpcCallAttributes) = DLL("RPCRT4.dll", "int RpcServerInqCallAttributesW(void*, void*)")
# 呼び出し: RpcServerInqCallAttributesW(ClientBinding, RpcCallAttributes)
# ClientBinding : void* optional -> "void*"
# RpcCallAttributes : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。