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