ホーム › System.Threading › CancelThreadpoolIo
CancelThreadpoolIo
関数開始通知済みのスレッドプールI/Oを取り消す。
シグネチャ
// KERNEL32.dll
#include <windows.h>
void CancelThreadpoolIo(
PTP_IO pio
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pio | PTP_IO | in |
戻り値の型: void
各言語での呼び出し定義
// KERNEL32.dll
#include <windows.h>
void CancelThreadpoolIo(
PTP_IO pio
);[DllImport("KERNEL32.dll", ExactSpelling = true)]
static extern void CancelThreadpoolIo(
IntPtr pio // PTP_IO
);<DllImport("KERNEL32.dll", ExactSpelling:=True)>
Public Shared Sub CancelThreadpoolIo(
pio As IntPtr ' PTP_IO
)
End Sub' pio : PTP_IO
Declare PtrSafe Sub CancelThreadpoolIo Lib "kernel32" ( _
ByVal pio As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CancelThreadpoolIo = ctypes.windll.kernel32.CancelThreadpoolIo
CancelThreadpoolIo.restype = None
CancelThreadpoolIo.argtypes = [
ctypes.c_ssize_t, # pio : PTP_IO
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('KERNEL32.dll')
CancelThreadpoolIo = Fiddle::Function.new(
lib['CancelThreadpoolIo'],
[
Fiddle::TYPE_INTPTR_T, # pio : PTP_IO
],
Fiddle::TYPE_VOID)#[link(name = "kernel32")]
extern "system" {
fn CancelThreadpoolIo(
pio: isize // PTP_IO
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("KERNEL32.dll")]
public static extern void CancelThreadpoolIo(IntPtr pio);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_CancelThreadpoolIo' -Namespace Win32 -PassThru
# $api::CancelThreadpoolIo(pio)#uselib "KERNEL32.dll"
#func global CancelThreadpoolIo "CancelThreadpoolIo" sptr
; CancelThreadpoolIo pio
; pio : PTP_IO -> "sptr"#uselib "KERNEL32.dll"
#func global CancelThreadpoolIo "CancelThreadpoolIo" sptr
; CancelThreadpoolIo pio
; pio : PTP_IO -> "sptr"; void CancelThreadpoolIo(PTP_IO pio)
#uselib "KERNEL32.dll"
#func global CancelThreadpoolIo "CancelThreadpoolIo" intptr
; CancelThreadpoolIo pio
; pio : PTP_IO -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
procCancelThreadpoolIo = kernel32.NewProc("CancelThreadpoolIo")
)
// pio (PTP_IO)
r1, _, err := procCancelThreadpoolIo.Call(
uintptr(pio),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure CancelThreadpoolIo(
pio: NativeInt // PTP_IO
); stdcall;
external 'KERNEL32.dll' name 'CancelThreadpoolIo';result := DllCall("KERNEL32\CancelThreadpoolIo"
, "Ptr", pio ; PTP_IO
, "Int") ; return: void●CancelThreadpoolIo(pio) = DLL("KERNEL32.dll", "int CancelThreadpoolIo(int)")
# 呼び出し: CancelThreadpoolIo(pio)
# pio : PTP_IO -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。