Function Reference


_WinAPI_FileInUse

Tests whether the specified file in use by another application

#include <WinAPIFiles.au3>
_WinAPI_FileInUse ( $sFilePath )

Parameters

$sFilePath The name of the file to test. If the path specifies a directory, the function fails.

Return Value

Success: 1 - File in use by another application.
Failure: 0.

Example

#include <WinAPIFiles.au3>

Local $hFile = FileOpen(@ScriptFullPath)

ConsoleWrite(@ScriptName & ' in use: ' & _WinAPI_FileInUse(@ScriptFullPath) & @CRLF)
FileClose($hFile)
ConsoleWrite(@ScriptName & ' in use: ' & _WinAPI_FileInUse(@ScriptFullPath) & @CRLF)