Retrieves the file system's 8-byte file reference number for a file.
#Include <WinAPIEx.au3>
_WinAPI_GetFileID ( $hFile )
$hFile | A handle to the file or directory whose reference number is to be retrieved. |
Success | The 8-byte file reference number for the file. |
Failure | 0 and sets the @error flag to non-zero, @extended flag may contain the NTSTATUS code. |
在MSDN中搜索
#Include <APIConstants.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $hFile
$hFile = _WinAPI_CreateFile(@ScriptFullPath, 2, 0, 6)
ConsoleWrite('Handle: ' & $hFile & @CR)
ConsoleWrite('ID: ' & _WinAPI_GetFileID($hFile) & @CR)
_WinAPI_CloseHandle($hFile)