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

StartThreadpoolIo

関数
ファイルハンドルへの非同期I/O開始をプールに通知する。
DLLKERNEL32.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

void StartThreadpoolIo(
    PTP_IO pio
);

パラメーター

名前方向
pioPTP_IOin

戻り値の型: void

各言語での呼び出し定義

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

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

StartThreadpoolIo = ctypes.windll.kernel32.StartThreadpoolIo
StartThreadpoolIo.restype = None
StartThreadpoolIo.argtypes = [
    ctypes.c_ssize_t,  # pio : PTP_IO
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('KERNEL32.dll')
StartThreadpoolIo = Fiddle::Function.new(
  lib['StartThreadpoolIo'],
  [
    Fiddle::TYPE_INTPTR_T,  # pio : PTP_IO
  ],
  Fiddle::TYPE_VOID)
#[link(name = "kernel32")]
extern "system" {
    fn StartThreadpoolIo(
        pio: isize  // PTP_IO
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("KERNEL32.dll")]
public static extern void StartThreadpoolIo(IntPtr pio);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_StartThreadpoolIo' -Namespace Win32 -PassThru
# $api::StartThreadpoolIo(pio)
#uselib "KERNEL32.dll"
#func global StartThreadpoolIo "StartThreadpoolIo" sptr
; StartThreadpoolIo pio
; pio : PTP_IO -> "sptr"
#uselib "KERNEL32.dll"
#func global StartThreadpoolIo "StartThreadpoolIo" sptr
; StartThreadpoolIo pio
; pio : PTP_IO -> "sptr"
; void StartThreadpoolIo(PTP_IO pio)
#uselib "KERNEL32.dll"
#func global StartThreadpoolIo "StartThreadpoolIo" intptr
; StartThreadpoolIo pio
; pio : PTP_IO -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
	procStartThreadpoolIo = kernel32.NewProc("StartThreadpoolIo")
)

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