ホーム › System.Rpc › RpcServerInqBindingsEx
RpcServerInqBindingsEx
関数セキュリティ記述子付きでサーバーバインディングを取得する。
シグネチャ
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcServerInqBindingsEx(
void* SecurityDescriptor, // optional
RPC_BINDING_VECTOR** BindingVector
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| SecurityDescriptor | void* | inoptional |
| BindingVector | RPC_BINDING_VECTOR** | out |
戻り値の型: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcServerInqBindingsEx(
void* SecurityDescriptor, // optional
RPC_BINDING_VECTOR** BindingVector
);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int RpcServerInqBindingsEx(
IntPtr SecurityDescriptor, // void* optional
IntPtr BindingVector // RPC_BINDING_VECTOR** out
);<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function RpcServerInqBindingsEx(
SecurityDescriptor As IntPtr, ' void* optional
BindingVector As IntPtr ' RPC_BINDING_VECTOR** out
) As Integer
End Function' SecurityDescriptor : void* optional
' BindingVector : RPC_BINDING_VECTOR** out
Declare PtrSafe Function RpcServerInqBindingsEx Lib "rpcrt4" ( _
ByVal SecurityDescriptor As LongPtr, _
ByVal BindingVector As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RpcServerInqBindingsEx = ctypes.windll.rpcrt4.RpcServerInqBindingsEx
RpcServerInqBindingsEx.restype = ctypes.c_int
RpcServerInqBindingsEx.argtypes = [
ctypes.POINTER(None), # SecurityDescriptor : void* optional
ctypes.c_void_p, # BindingVector : RPC_BINDING_VECTOR** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
RpcServerInqBindingsEx = Fiddle::Function.new(
lib['RpcServerInqBindingsEx'],
[
Fiddle::TYPE_VOIDP, # SecurityDescriptor : void* optional
Fiddle::TYPE_VOIDP, # BindingVector : RPC_BINDING_VECTOR** out
],
Fiddle::TYPE_INT)#[link(name = "rpcrt4")]
extern "system" {
fn RpcServerInqBindingsEx(
SecurityDescriptor: *mut (), // void* optional
BindingVector: *mut *mut RPC_BINDING_VECTOR // RPC_BINDING_VECTOR** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcServerInqBindingsEx(IntPtr SecurityDescriptor, IntPtr BindingVector);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcServerInqBindingsEx' -Namespace Win32 -PassThru
# $api::RpcServerInqBindingsEx(SecurityDescriptor, BindingVector)#uselib "RPCRT4.dll"
#func global RpcServerInqBindingsEx "RpcServerInqBindingsEx" sptr, sptr
; RpcServerInqBindingsEx SecurityDescriptor, varptr(BindingVector) ; 戻り値は stat
; SecurityDescriptor : void* optional -> "sptr"
; BindingVector : RPC_BINDING_VECTOR** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RPCRT4.dll" #cfunc global RpcServerInqBindingsEx "RpcServerInqBindingsEx" sptr, var ; res = RpcServerInqBindingsEx(SecurityDescriptor, BindingVector) ; SecurityDescriptor : void* optional -> "sptr" ; BindingVector : RPC_BINDING_VECTOR** out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RPCRT4.dll" #cfunc global RpcServerInqBindingsEx "RpcServerInqBindingsEx" sptr, sptr ; res = RpcServerInqBindingsEx(SecurityDescriptor, varptr(BindingVector)) ; SecurityDescriptor : void* optional -> "sptr" ; BindingVector : RPC_BINDING_VECTOR** out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; RPC_STATUS RpcServerInqBindingsEx(void* SecurityDescriptor, RPC_BINDING_VECTOR** BindingVector) #uselib "RPCRT4.dll" #cfunc global RpcServerInqBindingsEx "RpcServerInqBindingsEx" intptr, var ; res = RpcServerInqBindingsEx(SecurityDescriptor, BindingVector) ; SecurityDescriptor : void* optional -> "intptr" ; BindingVector : RPC_BINDING_VECTOR** out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; RPC_STATUS RpcServerInqBindingsEx(void* SecurityDescriptor, RPC_BINDING_VECTOR** BindingVector) #uselib "RPCRT4.dll" #cfunc global RpcServerInqBindingsEx "RpcServerInqBindingsEx" intptr, intptr ; res = RpcServerInqBindingsEx(SecurityDescriptor, varptr(BindingVector)) ; SecurityDescriptor : void* optional -> "intptr" ; BindingVector : RPC_BINDING_VECTOR** out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procRpcServerInqBindingsEx = rpcrt4.NewProc("RpcServerInqBindingsEx")
)
// SecurityDescriptor (void* optional), BindingVector (RPC_BINDING_VECTOR** out)
r1, _, err := procRpcServerInqBindingsEx.Call(
uintptr(SecurityDescriptor),
uintptr(BindingVector),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction RpcServerInqBindingsEx(
SecurityDescriptor: Pointer; // void* optional
BindingVector: Pointer // RPC_BINDING_VECTOR** out
): Integer; stdcall;
external 'RPCRT4.dll' name 'RpcServerInqBindingsEx';result := DllCall("RPCRT4\RpcServerInqBindingsEx"
, "Ptr", SecurityDescriptor ; void* optional
, "Ptr", BindingVector ; RPC_BINDING_VECTOR** out
, "Int") ; return: RPC_STATUS●RpcServerInqBindingsEx(SecurityDescriptor, BindingVector) = DLL("RPCRT4.dll", "int RpcServerInqBindingsEx(void*, void*)")
# 呼び出し: RpcServerInqBindingsEx(SecurityDescriptor, BindingVector)
# SecurityDescriptor : void* optional -> "void*"
# BindingVector : RPC_BINDING_VECTOR** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。