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

RpcBindingReset

関数
バインディングのエンドポイント情報をリセットする。
DLLRPCRT4.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

RPC_STATUS RpcBindingReset(
    void* Binding
);

パラメーター

名前方向
Bindingvoid*in

戻り値の型: RPC_STATUS

各言語での呼び出し定義

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

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

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

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

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcBindingReset = rpcrt4.NewProc("RpcBindingReset")
)

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