hackerhouse-opensource/Marble

Mibster.exe / Validator.exe - VS 2022

Closed this issue · 2 comments

Hello,

Thanks for sharing, the project compiled correctly under VS 2022 - All the executables are showing the arg/help. But Mibster.exe after compilation is not running properlu. Which version VC++ & VS have you used?, I have installed all the VC runtimes tho.

image

From Validator.exe

image

Thanks!

Hi friend! These are actually errors that belong to the CIA's code, when running the applications outside of a pre-build and post-build event on Visual Studio you will experience these problems. If you look in Mibster wWinMain function you will see this commented code block that we added:

// Attach to the parent console for output.
/*if (AttachConsole(ATTACH_PARENT_PROCESS))
{
	// Redirect stdout to the attached console
	FILE* stream;
	_wfreopen_s(&stream, L"CONOUT$", L"w", stdout);
}*/

If you uncomment the /**/ it will write to the console on cmd.exe for debugging and troubleshooting, but you need to ensure that it doesnt do this to get the output in the console under visual studio. The iRet error I have simply fixed by declaring earlier in the scope so that when executed without arguments you do not experience the crash. You can pull down the new code to get rid of the iRet uninit dialog when running without arguments.

We tried to keep this code as close to the original CIA version as possible to prevent unintentionally changing the signatures, the iRet bug is annoying though so we have patched it by simply declaring the variable earlier in the function scope. Happy Hacking friend.

Marking this issue as closed, will updated regarding the comment block above the main README.md for others.