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

RpcErrorClearInformation

関数
スレッドの拡張エラー情報をすべて消去する。
DLLRPCRT4.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

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

void RpcErrorClearInformation(void);

パラメーターなし。戻り値: void

各言語での呼び出し定義

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

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

RpcErrorClearInformation = ctypes.windll.rpcrt4.RpcErrorClearInformation
RpcErrorClearInformation.restype = None
RpcErrorClearInformation.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcErrorClearInformation = Fiddle::Function.new(
  lib['RpcErrorClearInformation'],
  [],
  Fiddle::TYPE_VOID)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcErrorClearInformation();
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern void RpcErrorClearInformation();
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcErrorClearInformation' -Namespace Win32 -PassThru
# $api::RpcErrorClearInformation()
#uselib "RPCRT4.dll"
#func global RpcErrorClearInformation "RpcErrorClearInformation"
; RpcErrorClearInformation
#uselib "RPCRT4.dll"
#func global RpcErrorClearInformation "RpcErrorClearInformation"
; RpcErrorClearInformation
; void RpcErrorClearInformation()
#uselib "RPCRT4.dll"
#func global RpcErrorClearInformation "RpcErrorClearInformation"
; RpcErrorClearInformation
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcErrorClearInformation = rpcrt4.NewProc("RpcErrorClearInformation")
)

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