Opened 2 years ago

Last modified 8 months ago

#3889 assigned Bug

ProcessClose does set @extended when no process found — at Initial Version

Reported by: Jpm Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

ProcessClose() just return @extended = 0 when no process found
ret= 0 @error=0

#include <WinAPIError.au3>

Global $iError, $iExtended, $iRet = ProcessClose("lol_this_lol.exe")
;~      Return Value
;~      Success: 1.
;~      Failure: 0 and sets the @error flag to non-zero.
;~      @error: 1 = OpenProcess failed
;~      2 = AdjustTokenPrivileges Failed
;~      3 = TerminateProcess Failed
;~      4 = Cannot verify if process exists
;~      @extended: sets to Windows API GetLastError()
$iError = @error
$iExtended = @extended
Local $iGetLastError = _WinAPI_GetLastError()
Local $sGetErrorMessage = _WinAPI_GetErrorMessage($iGetLastError)
ConsoleWrite(";  @AutoItVersion = " & @AutoItVersion & @TAB)
ConsoleWrite('  iRet = ' & $iRet & @TAB & "  @error = " & $iError & @TAB & "  @extended = " & $iExtended & @TAB)
ConsoleWrite("  GetLastError = " & $iGetLastError & @TAB & '  GetErrorMessage = "' & $sGetErrorMessage & '"' & @CRLF )

Change History (0)

Note: See TracTickets for help on using tickets.