Win32 API 日本語リファレンス
ホームStorage.InstallableFileSystems › FilterFindClose

FilterFindClose

関数
ミニフィルター列挙の検索ハンドルを閉じる。
DLLFLTLIB.dll呼出規約winapi

シグネチャ

// FLTLIB.dll
#include <windows.h>

HRESULT FilterFindClose(
    HANDLE hFilterFind
);

パラメーター

名前方向
hFilterFindHANDLEin

戻り値の型: HRESULT

各言語での呼び出し定義

// FLTLIB.dll
#include <windows.h>

HRESULT FilterFindClose(
    HANDLE hFilterFind
);
[DllImport("FLTLIB.dll", ExactSpelling = true)]
static extern int FilterFindClose(
    IntPtr hFilterFind   // HANDLE
);
<DllImport("FLTLIB.dll", ExactSpelling:=True)>
Public Shared Function FilterFindClose(
    hFilterFind As IntPtr   ' HANDLE
) As Integer
End Function
' hFilterFind : HANDLE
Declare PtrSafe Function FilterFindClose Lib "fltlib" ( _
    ByVal hFilterFind As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

FilterFindClose = ctypes.windll.fltlib.FilterFindClose
FilterFindClose.restype = ctypes.c_int
FilterFindClose.argtypes = [
    wintypes.HANDLE,  # hFilterFind : HANDLE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('FLTLIB.dll')
FilterFindClose = Fiddle::Function.new(
  lib['FilterFindClose'],
  [
    Fiddle::TYPE_VOIDP,  # hFilterFind : HANDLE
  ],
  Fiddle::TYPE_INT)
#[link(name = "fltlib")]
extern "system" {
    fn FilterFindClose(
        hFilterFind: *mut core::ffi::c_void  // HANDLE
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("FLTLIB.dll")]
public static extern int FilterFindClose(IntPtr hFilterFind);
"@
$api = Add-Type -MemberDefinition $sig -Name 'FLTLIB_FilterFindClose' -Namespace Win32 -PassThru
# $api::FilterFindClose(hFilterFind)
#uselib "FLTLIB.dll"
#func global FilterFindClose "FilterFindClose" sptr
; FilterFindClose hFilterFind   ; 戻り値は stat
; hFilterFind : HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "FLTLIB.dll"
#cfunc global FilterFindClose "FilterFindClose" sptr
; res = FilterFindClose(hFilterFind)
; hFilterFind : HANDLE -> "sptr"
; HRESULT FilterFindClose(HANDLE hFilterFind)
#uselib "FLTLIB.dll"
#cfunc global FilterFindClose "FilterFindClose" intptr
; res = FilterFindClose(hFilterFind)
; hFilterFind : HANDLE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	fltlib = windows.NewLazySystemDLL("FLTLIB.dll")
	procFilterFindClose = fltlib.NewProc("FilterFindClose")
)

// hFilterFind (HANDLE)
r1, _, err := procFilterFindClose.Call(
	uintptr(hFilterFind),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function FilterFindClose(
  hFilterFind: THandle   // HANDLE
): Integer; stdcall;
  external 'FLTLIB.dll' name 'FilterFindClose';
result := DllCall("FLTLIB\FilterFindClose"
    , "Ptr", hFilterFind   ; HANDLE
    , "Int")   ; return: HRESULT
●FilterFindClose(hFilterFind) = DLL("FLTLIB.dll", "int FilterFindClose(void*)")
# 呼び出し: FilterFindClose(hFilterFind)
# hFilterFind : HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。