News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

MessageBox "compiler".

Started by hutch--, October 16, 2017, 09:30:03 PM

Previous topic - Next topic

hutch--

This is in fact a very simple application, it stores a binary image which it loads into memory, writes the user defined caption and text body message into the binary image then saves it to disk with an exe file of the user's name choice. The binary image source is in the "binary_file" directory, the full 64 bit MASM source is in the "source" directory and there are some test results in the "examples" directory.

As the resulting 64 bit exe file has no manifest or version control block, I tested an example with JOTTI and nothing squawked so the output has a reasonable chance with all but the crappiest AV scanners. Size limit for text is 62 characters for the title and 745 for the body text.

Siekmanski

I like this approach, cool technique.  8)
Creative coders use backward thinking techniques as a strategy.

hutch--

While I was still playing with this, I added a message box style option and returned the MessageBox return value as the value in ExitProcess() and with a little testing, the button types in all of the MessageBox options appear to be consistent. The example directory has a batch file to test returns as %errorlevel% values.

I added 512 bytes to it so the resultant EXE file is now 2048 bytes but it means the title can be up to 75 characters and the displayed text message can be a bit over 1200 bytes in length. The original binary file is included in its own directory and the 6 different styles are in the examples directory.