Explorar o código

* Under win32, standard input and output are not guaranteed to have descriptors 0,1 and 2

michael %!s(int64=26) %!d(string=hai) anos
pai
achega
b38526bfea
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      fcl/inc/iostream.pp

+ 8 - 0
fcl/inc/iostream.pp

@@ -44,7 +44,15 @@ Const
 Constructor TIOStream.Create(IOSType : TiosType);
 
 begin
+{$ifdef win32}
+  Case IOSType of 
+    iosOutput : FType:=Stdoutputhandle;
+    iosInput : FType:=Stdinputhandle;
+    iosError : FType:=StdErrorHandle;
+  end;
+{$else}
   FType:=Ord(IOSType);
+{$endif}  
   Inherited Create(Ftype);
 end;