Function Reference


Retrieves a name of the specified object

#include <WinAPIHObj.au3>
_WinAPI_GetObjectNameByHandle ( $hObject )


$hObject A handle to the object to obtain its name.

Return Value

Success: The name of the object.
Failure: Empty string and sets the @error flag to non-zero, @extended flag may contain the NTSTATUS error code.

See Also

Search ZwQueryObject in MSDN Library.


#include <WinAPIFiles.au3>
#include <WinAPIHObj.au3>

Local $sFile = @ScriptFullPath
Local $hFile = _WinAPI_CreateFile(@ScriptFullPath, 2, 0, 6)

ConsoleWrite('File:   ' & $sFile & @CRLF)
ConsoleWrite('Handle: ' & $hFile & @CRLF)
ConsoleWrite('Type:   ' & _WinAPI_GetObjectNameByHandle($hFile) & @CRLF)