Browse Source

* Made TStartupInfo type common for win32 and win64 and updated as suggested by Mantis #23074.
* Deprecated StartupInfo variable because it is not there for Delphi compatibility (Delphi apparently does not have such variable in interface of its System unit), and we don't have other reasons to export non-portable stuff.

git-svn-id: trunk@26810 -

sergei 11 years ago
parent
commit
489b23cecd
3 changed files with 24 additions and 46 deletions
  1. 22 0
      rtl/win/sysosh.inc
  2. 1 23
      rtl/win32/system.pp
  3. 1 23
      rtl/win64/system.pp

+ 22 - 0
rtl/win/sysosh.inc

@@ -64,6 +64,28 @@ procedure OleStrToStrVar(source : PWideChar;var dest : AnsiString);inline;
 function StringToOleStr(const source : ansistring) : PWideChar;inline;
 function StringToOleStr(const source : UnicodeString) : PWideChar;inline;
 
+type
+  TStartupInfo = record
+    cb : DWord;
+    lpReserved : Pointer;
+    lpDesktop : Pointer;
+    lpTitle : Pointer;
+    dwX : DWord;
+    dwY : DWord;
+    dwXSize : DWord;
+    dwYSize : DWord;
+    dwXCountChars : DWord;
+    dwYCountChars : DWord;
+    dwFillAttribute : DWord;
+    dwFlags : DWord;
+    wShowWindow : Word;
+    cbReserved2 : Word;
+    lpReserved2 : Pointer;
+    hStdInput : THandle;
+    hStdOutput : THandle;
+    hStdError : THandle;
+  end;
+
 { package stuff }
 type
   PLibModule = ^TLibModule;

+ 1 - 23
rtl/win32/system.pp

@@ -77,34 +77,12 @@ const
 
   System_exception_frame : PEXCEPTION_FRAME =nil;
 
-type
-  TStartupInfo=packed record
-    cb : longint;
-    lpReserved : Pointer;
-    lpDesktop : Pointer;
-    lpTitle : Pointer;
-    dwX : longint;
-    dwY : longint;
-    dwXSize : longint;
-    dwYSize : longint;
-    dwXCountChars : longint;
-    dwYCountChars : longint;
-    dwFillAttribute : longint;
-    dwFlags : longint;
-    wShowWindow : Word;
-    cbReserved2 : Word;
-    lpReserved2 : Pointer;
-    hStdInput : longint;
-    hStdOutput : longint;
-    hStdError : longint;
-  end;
-
 var
 { C compatible arguments }
   argc : longint; public name 'operatingsystem_parameter_argc';
   argv : ppchar; public name 'operatingsystem_parameter_argv';
 { Win32 Info }
-  startupinfo : tstartupinfo;
+  startupinfo : tstartupinfo deprecated;  // Delphi does not have one in interface
   MainInstance,
   cmdshow     : longint;
   DLLreason : dword; public name 'operatingsystem_dllreason';

+ 1 - 23
rtl/win64/system.pp

@@ -70,34 +70,12 @@ const
   sLineBreak = LineEnding;
   DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
 
-type
-  TStartupInfo = record
-    cb : longint;
-    lpReserved : Pointer;
-    lpDesktop : Pointer;
-    lpTitle : Pointer;
-    dwX : longint;
-    dwY : longint;
-    dwXSize : longint;
-    dwYSize : longint;
-    dwXCountChars : longint;
-    dwYCountChars : longint;
-    dwFillAttribute : longint;
-    dwFlags : longint;
-    wShowWindow : Word;
-    cbReserved2 : Word;
-    lpReserved2 : Pointer;
-    hStdInput : THandle;
-    hStdOutput : THandle;
-    hStdError : THandle;
-  end;
-
 var
 { C compatible arguments }
   argc : longint;
   argv : ppchar;
 { Win32 Info }
-  startupinfo : tstartupinfo;
+  startupinfo : tstartupinfo deprecated;  // Delphi does not have one in interface
   StartupConsoleMode : dword;
   MainInstance : qword;
   cmdshow     : longint;