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