The MASM Forum

Microsoft 64 bit MASM => Tools & Toys => Topic started by: hutch-- on October 16, 2017, 09:30:03 PM

Title: MessageBox "compiler".
Post by: hutch-- on October 16, 2017, 09:30:03 PM
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.
Title: Re: MessageBox "compiler".
Post by: Siekmanski on October 17, 2017, 06:24:32 AM
I like this approach, cool technique.  8)
Title: Re: MessageBox "compiler".
Post by: hutch-- on October 19, 2017, 01:03:39 PM
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.