From 90d1dac1d3714e4497ff57a873f2af22883be2b3 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 9 Nov 2009 17:01:16 +0000 Subject: [PATCH] + Add StartupConsoleMode as for win32 git-svn-id: trunk@14125 - --- rtl/win64/system.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rtl/win64/system.pp b/rtl/win64/system.pp index 3efc46ea3b..8fffa0551f 100644 --- a/rtl/win64/system.pp +++ b/rtl/win64/system.pp @@ -93,6 +93,7 @@ var argv : ppchar; { Win32 Info } startupinfo : tstartupinfo; + StartupConsoleMode : dword; hprevinst, MainInstance : qword; cmdshow : longint; @@ -104,13 +105,13 @@ const Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil; Dll_Thread_Attach_Hook : TDLL_Entry_Hook = nil; Dll_Thread_Detach_Hook : TDLL_Entry_Hook = nil; - + Const - { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see + { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used value } - fmShareDenyNoneFlags : DWord = 3; + fmShareDenyNoneFlags : DWord = 3; implementation @@ -423,12 +424,14 @@ procedure Exe_entry;[public,alias:'_FPC_EXE_Entry']; system_exit; end; +function GetConsoleMode(hConsoleHandle: THandle; var lpMode: DWORD): Boolean; stdcall; external 'kernel32' name 'GetConsoleMode'; function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntryInformation){$endif FPC_HAS_INDIRECT_MAIN_INFORMATION} : longbool;forward; procedure _FPC_mainCRTStartup;stdcall;public name '_mainCRTStartup'; begin IsConsole:=true; + GetConsoleMode(GetStdHandle((Std_Input_Handle)),StartupConsoleMode); Exe_entry; end;