General discussion
July 2, 2002 at 02:31 AM
dvenardos

Ret err code from 32bit code – DOS batch

by dvenardos . Updated 24 years ago

How do your return an error code to a Dos batch file from 32bit C code that makes a call to the windows API? When calling a 32bit console app from a batch file, the batch file executes the program and continues instead of waiting for the return code. If you use cscript.exe to run script code, however, the batch file will wait for the return code, so there must be a way to compile the C code that allows DOS to receive the return value.

This discussion is locked

All Comments