AthenaOfDelphi:

Thanks for the test. It looks like AttachConsole is only available on:
Client OS: Windows Vista or Windows XP
Server OS: Windows Server "Longhorn" or Windows Server 2003

according to MSDN: http://msdn2.microsoft.com/en-us/library/ms681952.aspx

I have a simple console class called TGVConsoleWindow that I am using to control the console window. It will try to allocate a console at startup. If that fails this means that you are already running in a console window so it will try to attach to the current one. I assume this is what the normal actions would be for a normal console app. When you run a delphi console app from the command prompt it uses the same window rather than creating a new one. Anybody know more about using the win32 console routines?