Author Topic: MessageBox "compiler".  (Read 172 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4873
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
MessageBox "compiler".
« 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Siekmanski

  • Member
  • *****
  • Posts: 1110
Re: MessageBox "compiler".
« Reply #1 on: October 17, 2017, 06:24:32 AM »
I like this approach, cool technique.  8)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4873
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: MessageBox "compiler".
« Reply #2 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: