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