API - segredos do winexec

Top  Previous  Next

  case winexec('c:\calc.exe', sw_shownormal) of

    ERROR_FILE_NOT_FOUND : ShowMessage('File not found');

    ERROR_PATH_NOT_FOUND : ShowMessage('path not found');

    ERROR_BAD_FORMAT     : ShowMessage('bad format');

  else  ShowMessage('x');