ホーム › Storage.FileSystem › CloseIoRing
CloseIoRing
関数I/Oリングのハンドルを閉じて関連リソースを解放する。
シグネチャ
// api-ms-win-core-ioring-l1-1-0.dll
#include <windows.h>
HRESULT CloseIoRing(
HIORING ioRing
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ioRing | HIORING | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// api-ms-win-core-ioring-l1-1-0.dll
#include <windows.h>
HRESULT CloseIoRing(
HIORING ioRing
);[DllImport("api-ms-win-core-ioring-l1-1-0.dll", ExactSpelling = true)]
static extern int CloseIoRing(
IntPtr ioRing // HIORING
);<DllImport("api-ms-win-core-ioring-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function CloseIoRing(
ioRing As IntPtr ' HIORING
) As Integer
End Function' ioRing : HIORING
Declare PtrSafe Function CloseIoRing Lib "api-ms-win-core-ioring-l1-1-0" ( _
ByVal ioRing As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CloseIoRing = ctypes.windll.LoadLibrary("api-ms-win-core-ioring-l1-1-0.dll").CloseIoRing
CloseIoRing.restype = ctypes.c_int
CloseIoRing.argtypes = [
wintypes.HANDLE, # ioRing : HIORING
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-core-ioring-l1-1-0.dll')
CloseIoRing = Fiddle::Function.new(
lib['CloseIoRing'],
[
Fiddle::TYPE_VOIDP, # ioRing : HIORING
],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-core-ioring-l1-1-0")]
extern "system" {
fn CloseIoRing(
ioRing: *mut core::ffi::c_void // HIORING
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-core-ioring-l1-1-0.dll")]
public static extern int CloseIoRing(IntPtr ioRing);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-ioring-l1-1-0_CloseIoRing' -Namespace Win32 -PassThru
# $api::CloseIoRing(ioRing)#uselib "api-ms-win-core-ioring-l1-1-0.dll"
#func global CloseIoRing "CloseIoRing" sptr
; CloseIoRing ioRing ; 戻り値は stat
; ioRing : HIORING -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-core-ioring-l1-1-0.dll"
#cfunc global CloseIoRing "CloseIoRing" sptr
; res = CloseIoRing(ioRing)
; ioRing : HIORING -> "sptr"; HRESULT CloseIoRing(HIORING ioRing)
#uselib "api-ms-win-core-ioring-l1-1-0.dll"
#cfunc global CloseIoRing "CloseIoRing" intptr
; res = CloseIoRing(ioRing)
; ioRing : HIORING -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_core_ioring_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-core-ioring-l1-1-0.dll")
procCloseIoRing = api_ms_win_core_ioring_l1_1_0.NewProc("CloseIoRing")
)
// ioRing (HIORING)
r1, _, err := procCloseIoRing.Call(
uintptr(ioRing),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction CloseIoRing(
ioRing: THandle // HIORING
): Integer; stdcall;
external 'api-ms-win-core-ioring-l1-1-0.dll' name 'CloseIoRing';result := DllCall("api-ms-win-core-ioring-l1-1-0\CloseIoRing"
, "Ptr", ioRing ; HIORING
, "Int") ; return: HRESULT●CloseIoRing(ioRing) = DLL("api-ms-win-core-ioring-l1-1-0.dll", "int CloseIoRing(void*)")
# 呼び出し: CloseIoRing(ioRing)
# ioRing : HIORING -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。