Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jan : Win32 MessageBox don't show during Unit initialization

www.cryer.info
Managed Newsgroup Archive

Win32 MessageBox don't show during Unit initialization

Subject:Win32 MessageBox don't show during Unit initialization
Posted by:"Guy Harel" ()
Date:25 Jan 2008 11:53:15

Got some legacy Delphi 5 code.

In the initialization of one of the unit there is code to validate the
version of a DLL. If the DLL is not the right version, an error message
is displayed using:
  MessageBox( GetStdHandle(STD_OUTPUT_HANDLE), pchar('error..') ,
MB_ICONERROR+ MB_OK        );

One of my customer reported he had the error message under Citrix.
I replicated its configuration on my XP machine. I dont have the error
message, if I double-click on the executable. I start my application
using the Delphi debugger, the error message is displayed?

Why does MessageBox() display nothing if I start the EXE, and display
something in the Delphi IDE. Could this explain the Citrix reaction ?

Thanks
--

Replies:

www.cryer.info
Managed Newsgroup Archive