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

RpcServerCompleteSecurityCallback

関数
保留中のRPCセキュリティコールバックを指定した状態で完了させる。
DLLRPCRT4.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

RPC_STATUS RpcServerCompleteSecurityCallback(
    void* BindingHandle,
    RPC_STATUS Status
);

パラメーター

名前方向
BindingHandlevoid*in
StatusRPC_STATUSin

戻り値の型: RPC_STATUS

各言語での呼び出し定義

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

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

RpcServerCompleteSecurityCallback = ctypes.windll.rpcrt4.RpcServerCompleteSecurityCallback
RpcServerCompleteSecurityCallback.restype = ctypes.c_int
RpcServerCompleteSecurityCallback.argtypes = [
    ctypes.POINTER(None),  # BindingHandle : void*
    ctypes.c_int,  # Status : RPC_STATUS
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcServerCompleteSecurityCallback = Fiddle::Function.new(
  lib['RpcServerCompleteSecurityCallback'],
  [
    Fiddle::TYPE_VOIDP,  # BindingHandle : void*
    Fiddle::TYPE_INT,  # Status : RPC_STATUS
  ],
  Fiddle::TYPE_INT)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcServerCompleteSecurityCallback(
        BindingHandle: *mut (),  // void*
        Status: i32  // RPC_STATUS
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcServerCompleteSecurityCallback(IntPtr BindingHandle, int Status);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcServerCompleteSecurityCallback' -Namespace Win32 -PassThru
# $api::RpcServerCompleteSecurityCallback(BindingHandle, Status)
#uselib "RPCRT4.dll"
#func global RpcServerCompleteSecurityCallback "RpcServerCompleteSecurityCallback" sptr, sptr
; RpcServerCompleteSecurityCallback BindingHandle, Status   ; 戻り値は stat
; BindingHandle : void* -> "sptr"
; Status : RPC_STATUS -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "RPCRT4.dll"
#cfunc global RpcServerCompleteSecurityCallback "RpcServerCompleteSecurityCallback" sptr, int
; res = RpcServerCompleteSecurityCallback(BindingHandle, Status)
; BindingHandle : void* -> "sptr"
; Status : RPC_STATUS -> "int"
; RPC_STATUS RpcServerCompleteSecurityCallback(void* BindingHandle, RPC_STATUS Status)
#uselib "RPCRT4.dll"
#cfunc global RpcServerCompleteSecurityCallback "RpcServerCompleteSecurityCallback" intptr, int
; res = RpcServerCompleteSecurityCallback(BindingHandle, Status)
; BindingHandle : void* -> "intptr"
; Status : RPC_STATUS -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcServerCompleteSecurityCallback = rpcrt4.NewProc("RpcServerCompleteSecurityCallback")
)

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