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