Help Center

CWhsExec.GetExitCodemethod

Returns the exit code set by a script or program run using the Exec method.

Windowsmethoddocumented

Syntax

FUNCTION GetExitCode () AS LONG

Description

Returns the exit code set by a script or program run using the Exec method (called by the constructor).

Remarks

Executables set an exit code when they finish running. This conveys the status information when a process ends. Often, it is used to send an error code (or some other piece of information) back to the caller. If the process has not finished, the GetExitCode property returns 0. The values returned from ^^GetExitCode** depend on the application that was called.

Reference

  • Defined in AfxNova/AfxWsh.inc:412
  • Documented in Windows/Windows Script/Windows Shell.md
  • Topic: Windows Shell