Funzione FindClose (fileapi.h)

Chiude un handle di ricerca file aperto dalle funzioni FindFirstFile, FindFirstFileEx, FindFirstFileNameW, FindFirstFileNameTransactedW, FindFirstFileTransacted, FindFirstStreamTransactedW o FindFirstStreamW.

Sintassi

BOOL FindClose(
  [in, out] HANDLE hFindFile
);

Parametri

[in, out] hFindFile

Handle di ricerca file.

Valore restituito

Se la funzione ha esito positivo, il valore restituito è diverso da zero.

Se la funzione ha esito negativo, il valore restituito è zero. Per informazioni dettagliate sull'errore, chiamare GetLastError.

Commenti

Dopo aver chiamato la funzione FindClose , l'handle specificato dal parametro hFindFile non può essere usato nelle chiamate successive alle funzioni FindNextFile, FindNextFileNameW, FindNextStreamW o FindClose .

In Windows 8 e Windows Server 2012 questa funzione è supportata dalle tecnologie seguenti.

Tecnologia Supportato
Protocollo SMB (Server Message Block) 3.0
Failover trasparente SMB 3.0 (TFO)
SMB 3.0 con condivisioni file di scalabilità orizzontale (SO)
File system del volume condiviso cluster (CsvFS)
Resilient File System (ReFS)
 

Esempi

Per un esempio, vedere Elenco dei file in una directory.

Requisiti

Requisito Valore
Client minimo supportato Windows XP [app desktop | App UWP]
Server minimo supportato Windows Server 2003 [app desktop | App UWP]
Piattaforma di destinazione Windows
Intestazione fileapi.h (include Windows.h)
Libreria Kernel32.lib
DLL Kernel32.dll

Vedere anche

Funzioni di gestione file

Findfirstfile

FindFirstFileEx

FindFirstFileNameTransactedW

FindFirstFileNameW

FindFirstFileTransacted

FindFirstStreamTransactedW

FindFirstStreamW

Findnextfile

FindNextFileNameW

FindNextStreamW