ホーム › Devices.DeviceAndDriverInstallation › SetupCloseFileQueue
SetupCloseFileQueue
関数セットアップファイルキューを閉じて解放する。
シグネチャ
// SETUPAPI.dll
#include <windows.h>
BOOL SetupCloseFileQueue(
void* QueueHandle
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| QueueHandle | void* | in |
戻り値の型: BOOL
各言語での呼び出し定義
// SETUPAPI.dll
#include <windows.h>
BOOL SetupCloseFileQueue(
void* QueueHandle
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("SETUPAPI.dll", ExactSpelling = true)]
static extern bool SetupCloseFileQueue(
IntPtr QueueHandle // void*
);<DllImport("SETUPAPI.dll", ExactSpelling:=True)>
Public Shared Function SetupCloseFileQueue(
QueueHandle As IntPtr ' void*
) As Boolean
End Function' QueueHandle : void*
Declare PtrSafe Function SetupCloseFileQueue Lib "setupapi" ( _
ByVal QueueHandle As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SetupCloseFileQueue = ctypes.windll.setupapi.SetupCloseFileQueue
SetupCloseFileQueue.restype = wintypes.BOOL
SetupCloseFileQueue.argtypes = [
ctypes.POINTER(None), # QueueHandle : void*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SETUPAPI.dll')
SetupCloseFileQueue = Fiddle::Function.new(
lib['SetupCloseFileQueue'],
[
Fiddle::TYPE_VOIDP, # QueueHandle : void*
],
Fiddle::TYPE_INT)#[link(name = "setupapi")]
extern "system" {
fn SetupCloseFileQueue(
QueueHandle: *mut () // void*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("SETUPAPI.dll")]
public static extern bool SetupCloseFileQueue(IntPtr QueueHandle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SETUPAPI_SetupCloseFileQueue' -Namespace Win32 -PassThru
# $api::SetupCloseFileQueue(QueueHandle)#uselib "SETUPAPI.dll"
#func global SetupCloseFileQueue "SetupCloseFileQueue" sptr
; SetupCloseFileQueue QueueHandle ; 戻り値は stat
; QueueHandle : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "SETUPAPI.dll"
#cfunc global SetupCloseFileQueue "SetupCloseFileQueue" sptr
; res = SetupCloseFileQueue(QueueHandle)
; QueueHandle : void* -> "sptr"; BOOL SetupCloseFileQueue(void* QueueHandle)
#uselib "SETUPAPI.dll"
#cfunc global SetupCloseFileQueue "SetupCloseFileQueue" intptr
; res = SetupCloseFileQueue(QueueHandle)
; QueueHandle : void* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
setupapi = windows.NewLazySystemDLL("SETUPAPI.dll")
procSetupCloseFileQueue = setupapi.NewProc("SetupCloseFileQueue")
)
// QueueHandle (void*)
r1, _, err := procSetupCloseFileQueue.Call(
uintptr(QueueHandle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction SetupCloseFileQueue(
QueueHandle: Pointer // void*
): BOOL; stdcall;
external 'SETUPAPI.dll' name 'SetupCloseFileQueue';result := DllCall("SETUPAPI\SetupCloseFileQueue"
, "Ptr", QueueHandle ; void*
, "Int") ; return: BOOL●SetupCloseFileQueue(QueueHandle) = DLL("SETUPAPI.dll", "bool SetupCloseFileQueue(void*)")
# 呼び出し: SetupCloseFileQueue(QueueHandle)
# QueueHandle : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。