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