Commenter S asks, "What happened to the return code from WinMain in a Windows 3.1 app?" After all, there was no function in 16-bit Windows.
Basically, the exit code vanished into the ether.
Unless you captured it.
The Toolhelp library provided a low-level hook into various parts of the kernel, allowing you to monitor, among other things, ...