2
This file is part of the Free Pascal run time library.
3
Copyright (c) 1999-2006 by Florian Klaempfl and Pavel Ozerski
4
member of the Free Pascal development team.
6
Win32 pascal only startup code
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
23
SysInstance : Longint;external name '_FPC_SysInstance';
25
procedure EXE_Entry; external name '_FPC_EXE_Entry';
26
function DLL_entry : longbool; external name '_FPC_DLL_Entry';
29
STD_INPUT_HANDLE = dword(-10);
31
function GetStdHandle(nStdHandle:DWORD) : THandle; stdcall; external 'kernel32' name 'GetStdHandle';
32
function GetConsoleMode(hConsoleHandle: THandle; var lpMode: DWORD): Boolean; stdcall; external 'kernel32' name 'GetConsoleMode';
34
procedure _FPC_mainCRTStartup;stdcall;public name '_mainCRTStartup';
37
{ do it like it is necessary for the startup code linking against cygwin }
38
GetConsoleMode(GetStdHandle((Std_Input_Handle)),StartupConsoleMode);
43
procedure _FPC_WinMainCRTStartup;stdcall;public name '_WinMainCRTStartup';
50
procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
53
sysinstance:=_hinstance;
54
dllreason:=_dllreason;
60
procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
63
sysinstance:=_hinstance;
64
dllreason:=_dllreason;
69
procedure asm_exit;stdcall;public name 'asm_exit';