ホーム › Storage.FileSystem › PopIoRingCompletion
PopIoRingCompletion
関数I/Oリングの完了キューから完了エントリ(CQE)を1件取り出す。
シグネチャ
// api-ms-win-core-ioring-l1-1-0.dll
#include <windows.h>
HRESULT PopIoRingCompletion(
HIORING ioRing,
IORING_CQE* cqe
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ioRing | HIORING | in |
| cqe | IORING_CQE* | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// api-ms-win-core-ioring-l1-1-0.dll
#include <windows.h>
HRESULT PopIoRingCompletion(
HIORING ioRing,
IORING_CQE* cqe
);[DllImport("api-ms-win-core-ioring-l1-1-0.dll", ExactSpelling = true)]
static extern int PopIoRingCompletion(
IntPtr ioRing, // HIORING
IntPtr cqe // IORING_CQE* out
);<DllImport("api-ms-win-core-ioring-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function PopIoRingCompletion(
ioRing As IntPtr, ' HIORING
cqe As IntPtr ' IORING_CQE* out
) As Integer
End Function' ioRing : HIORING
' cqe : IORING_CQE* out
Declare PtrSafe Function PopIoRingCompletion Lib "api-ms-win-core-ioring-l1-1-0" ( _
ByVal ioRing As LongPtr, _
ByVal cqe As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PopIoRingCompletion = ctypes.windll.LoadLibrary("api-ms-win-core-ioring-l1-1-0.dll").PopIoRingCompletion
PopIoRingCompletion.restype = ctypes.c_int
PopIoRingCompletion.argtypes = [
wintypes.HANDLE, # ioRing : HIORING
ctypes.c_void_p, # cqe : IORING_CQE* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-core-ioring-l1-1-0.dll')
PopIoRingCompletion = Fiddle::Function.new(
lib['PopIoRingCompletion'],
[
Fiddle::TYPE_VOIDP, # ioRing : HIORING
Fiddle::TYPE_VOIDP, # cqe : IORING_CQE* out
],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-core-ioring-l1-1-0")]
extern "system" {
fn PopIoRingCompletion(
ioRing: *mut core::ffi::c_void, // HIORING
cqe: *mut IORING_CQE // IORING_CQE* out
) -> 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 PopIoRingCompletion(IntPtr ioRing, IntPtr cqe);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-ioring-l1-1-0_PopIoRingCompletion' -Namespace Win32 -PassThru
# $api::PopIoRingCompletion(ioRing, cqe)#uselib "api-ms-win-core-ioring-l1-1-0.dll"
#func global PopIoRingCompletion "PopIoRingCompletion" sptr, sptr
; PopIoRingCompletion ioRing, varptr(cqe) ; 戻り値は stat
; ioRing : HIORING -> "sptr"
; cqe : IORING_CQE* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "api-ms-win-core-ioring-l1-1-0.dll" #cfunc global PopIoRingCompletion "PopIoRingCompletion" sptr, var ; res = PopIoRingCompletion(ioRing, cqe) ; ioRing : HIORING -> "sptr" ; cqe : IORING_CQE* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "api-ms-win-core-ioring-l1-1-0.dll" #cfunc global PopIoRingCompletion "PopIoRingCompletion" sptr, sptr ; res = PopIoRingCompletion(ioRing, varptr(cqe)) ; ioRing : HIORING -> "sptr" ; cqe : IORING_CQE* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT PopIoRingCompletion(HIORING ioRing, IORING_CQE* cqe) #uselib "api-ms-win-core-ioring-l1-1-0.dll" #cfunc global PopIoRingCompletion "PopIoRingCompletion" intptr, var ; res = PopIoRingCompletion(ioRing, cqe) ; ioRing : HIORING -> "intptr" ; cqe : IORING_CQE* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT PopIoRingCompletion(HIORING ioRing, IORING_CQE* cqe) #uselib "api-ms-win-core-ioring-l1-1-0.dll" #cfunc global PopIoRingCompletion "PopIoRingCompletion" intptr, intptr ; res = PopIoRingCompletion(ioRing, varptr(cqe)) ; ioRing : HIORING -> "intptr" ; cqe : IORING_CQE* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
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")
procPopIoRingCompletion = api_ms_win_core_ioring_l1_1_0.NewProc("PopIoRingCompletion")
)
// ioRing (HIORING), cqe (IORING_CQE* out)
r1, _, err := procPopIoRingCompletion.Call(
uintptr(ioRing),
uintptr(cqe),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PopIoRingCompletion(
ioRing: THandle; // HIORING
cqe: Pointer // IORING_CQE* out
): Integer; stdcall;
external 'api-ms-win-core-ioring-l1-1-0.dll' name 'PopIoRingCompletion';result := DllCall("api-ms-win-core-ioring-l1-1-0\PopIoRingCompletion"
, "Ptr", ioRing ; HIORING
, "Ptr", cqe ; IORING_CQE* out
, "Int") ; return: HRESULT●PopIoRingCompletion(ioRing, cqe) = DLL("api-ms-win-core-ioring-l1-1-0.dll", "int PopIoRingCompletion(void*, void*)")
# 呼び出し: PopIoRingCompletion(ioRing, cqe)
# ioRing : HIORING -> "void*"
# cqe : IORING_CQE* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。