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