On Windows, the hook function blocks until the user dismisses the message box. Print the message before opening the message box so that it is available on the console, if one exists.