Win32 API 日本語リファレンス
ホームSystem.Rpc › I_RpcBindingInqWireIdForSnego

I_RpcBindingInqWireIdForSnego

関数
SPNEGO用のワイヤIDをバインディングから問い合わせる内部関数。
DLLRPCRT4.dll呼出規約winapi

シグネチャ

// RPCRT4.dll
#include <windows.h>

RPC_STATUS I_RpcBindingInqWireIdForSnego(
    void* Binding,
    BYTE* WireId
);

パラメーター

名前方向
Bindingvoid*in
WireIdBYTE*out

戻り値の型: RPC_STATUS

各言語での呼び出し定義

// RPCRT4.dll
#include <windows.h>

RPC_STATUS I_RpcBindingInqWireIdForSnego(
    void* Binding,
    BYTE* WireId
);
[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int I_RpcBindingInqWireIdForSnego(
    IntPtr Binding,   // void*
    IntPtr WireId   // BYTE* out
);
<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function I_RpcBindingInqWireIdForSnego(
    Binding As IntPtr,   ' void*
    WireId As IntPtr   ' BYTE* out
) As Integer
End Function
' Binding : void*
' WireId : BYTE* out
Declare PtrSafe Function I_RpcBindingInqWireIdForSnego Lib "rpcrt4" ( _
    ByVal Binding As LongPtr, _
    ByVal WireId As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

I_RpcBindingInqWireIdForSnego = ctypes.windll.rpcrt4.I_RpcBindingInqWireIdForSnego
I_RpcBindingInqWireIdForSnego.restype = ctypes.c_int
I_RpcBindingInqWireIdForSnego.argtypes = [
    ctypes.POINTER(None),  # Binding : void*
    ctypes.POINTER(ctypes.c_ubyte),  # WireId : BYTE* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
I_RpcBindingInqWireIdForSnego = Fiddle::Function.new(
  lib['I_RpcBindingInqWireIdForSnego'],
  [
    Fiddle::TYPE_VOIDP,  # Binding : void*
    Fiddle::TYPE_VOIDP,  # WireId : BYTE* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "rpcrt4")]
extern "system" {
    fn I_RpcBindingInqWireIdForSnego(
        Binding: *mut (),  // void*
        WireId: *mut u8  // BYTE* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int I_RpcBindingInqWireIdForSnego(IntPtr Binding, IntPtr WireId);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_I_RpcBindingInqWireIdForSnego' -Namespace Win32 -PassThru
# $api::I_RpcBindingInqWireIdForSnego(Binding, WireId)
#uselib "RPCRT4.dll"
#func global I_RpcBindingInqWireIdForSnego "I_RpcBindingInqWireIdForSnego" sptr, sptr
; I_RpcBindingInqWireIdForSnego Binding, varptr(WireId)   ; 戻り値は stat
; Binding : void* -> "sptr"
; WireId : BYTE* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "RPCRT4.dll"
#cfunc global I_RpcBindingInqWireIdForSnego "I_RpcBindingInqWireIdForSnego" sptr, var
; res = I_RpcBindingInqWireIdForSnego(Binding, WireId)
; Binding : void* -> "sptr"
; WireId : BYTE* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; RPC_STATUS I_RpcBindingInqWireIdForSnego(void* Binding, BYTE* WireId)
#uselib "RPCRT4.dll"
#cfunc global I_RpcBindingInqWireIdForSnego "I_RpcBindingInqWireIdForSnego" intptr, var
; res = I_RpcBindingInqWireIdForSnego(Binding, WireId)
; Binding : void* -> "intptr"
; WireId : BYTE* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procI_RpcBindingInqWireIdForSnego = rpcrt4.NewProc("I_RpcBindingInqWireIdForSnego")
)

// Binding (void*), WireId (BYTE* out)
r1, _, err := procI_RpcBindingInqWireIdForSnego.Call(
	uintptr(Binding),
	uintptr(WireId),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // RPC_STATUS
function I_RpcBindingInqWireIdForSnego(
  Binding: Pointer;   // void*
  WireId: Pointer   // BYTE* out
): Integer; stdcall;
  external 'RPCRT4.dll' name 'I_RpcBindingInqWireIdForSnego';
result := DllCall("RPCRT4\I_RpcBindingInqWireIdForSnego"
    , "Ptr", Binding   ; void*
    , "Ptr", WireId   ; BYTE* out
    , "Int")   ; return: RPC_STATUS
●I_RpcBindingInqWireIdForSnego(Binding, WireId) = DLL("RPCRT4.dll", "int I_RpcBindingInqWireIdForSnego(void*, void*)")
# 呼び出し: I_RpcBindingInqWireIdForSnego(Binding, WireId)
# Binding : void* -> "void*"
# WireId : BYTE* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。