sysinitpas.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  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.
  5. Win32 pascal only startup code
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit sysinitpas;
  13. interface
  14. implementation
  15. var
  16. SysInstance : Longint;external name '_FPC_SysInstance';
  17. procedure EXE_Entry; external name '_FPC_EXE_Entry';
  18. function DLL_entry : longbool; external name '_FPC_DLL_Entry';
  19. procedure _FPC_mainCRTStartup;stdcall;public name '_mainCRTStartup';
  20. begin
  21. IsConsole:=true;
  22. Exe_entry;
  23. end;
  24. procedure _FPC_WinMainCRTStartup;stdcall;public name '_WinMainCRTStartup';
  25. begin
  26. IsConsole:=false;
  27. Exe_entry;
  28. end;
  29. procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
  30. begin
  31. IsConsole:=true;
  32. sysinstance:=_hinstance;
  33. dllreason:=_dllreason;
  34. dllparam:=_dllparam;
  35. DLL_Entry;
  36. end;
  37. procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
  38. begin
  39. IsConsole:=false;
  40. sysinstance:=_hinstance;
  41. dllreason:=_dllreason;
  42. dllparam:=_dllparam;
  43. DLL_Entry;
  44. end;
  45. end.