fpc/rtl/win/syswinh.inc
yury 8d95da3fea * Windows: Reworked handling of command line arguments to properly support Unicode:
- Use the CommandLineToArgvW API function to parse the Unicode command line (we can use it since Win9x is not supported anymore).
  - Implemented non-public functions ParamStrA and ParamStrU which are exposed in the objpas and uuchar units to provide correct AnsiString and UnicodeString versions of ParamStr(). 
  - The cleanup code is moved from InternalExit to the finalization section of the System unit.

git-svn-id: trunk@45037 -
2020-04-23 12:38:42 +00:00

79 lines
2.3 KiB
PHP

{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2020 by the Free Pascal development team.
FPC Pascal system unit header part shared by win32/win64.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
const
LineEnding = #13#10;
LFNSupport = true;
DirectorySeparator = '\';
DriveSeparator = ':';
ExtensionSeparator = '.';
PathSeparator = ';';
AllowDirectorySeparators : set of char = ['\','/'];
AllowDriveSeparators : set of char = [':'];
{ FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
maxExitCode = 65535;
MaxPathLen = 260;
AllFilesMask = '*';
type
PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
TEXCEPTION_FRAME = record
next : PEXCEPTION_FRAME;
handler : pointer;
end;
const
{ Default filehandles }
UnusedHandle : THandle = THandle(-1);
StdInputHandle : THandle = 0;
StdOutputHandle : THandle = 0;
StdErrorHandle : THandle = 0;
System_exception_frame : PEXCEPTION_FRAME =nil;
FileNameCaseSensitive : boolean = false;
FileNameCasePreserving: boolean = true;
CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
sLineBreak = LineEnding;
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
var
{ C compatible arguments }
{ CmdLine and argv are always in the current ANSI encoding set in Windows }
argc : longint;
argv : ppchar;
{ Win32 Info }
startupinfo : tstartupinfo deprecated; // Delphi does not have one in interface
StartupConsoleMode : dword;
cmdshow : longint;
DLLreason : dword;
DLLparam : PtrInt;
const
hprevinst: qword=0;
type
TDLL_Entry_Hook = procedure (dllparam : PtrInt);
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
also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used
value
}
fmShareDenyNoneFlags : DWord = 3;