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