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