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

RoClearError

関数
現在のスレッドのWinRTエラー状態をクリアする。
DLLapi-ms-win-core-winrt-error-l1-1-1.dll呼出規約winapi対応OSWindows 8.1 以降

シグネチャ

// api-ms-win-core-winrt-error-l1-1-1.dll
#include <windows.h>

void RoClearError(void);

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

各言語での呼び出し定義

// api-ms-win-core-winrt-error-l1-1-1.dll
#include <windows.h>

void RoClearError(void);
[DllImport("api-ms-win-core-winrt-error-l1-1-1.dll", ExactSpelling = true)]
static extern void RoClearError();
<DllImport("api-ms-win-core-winrt-error-l1-1-1.dll", ExactSpelling:=True)>
Public Shared Sub RoClearError()
End Sub
Declare PtrSafe Sub RoClearError Lib "api-ms-win-core-winrt-error-l1-1-1" ()
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RoClearError = ctypes.windll.LoadLibrary("api-ms-win-core-winrt-error-l1-1-1.dll").RoClearError
RoClearError.restype = None
RoClearError.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	api_ms_win_core_winrt_error_l1_1_1 = windows.NewLazySystemDLL("api-ms-win-core-winrt-error-l1-1-1.dll")
	procRoClearError = api_ms_win_core_winrt_error_l1_1_1.NewProc("RoClearError")
)

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