English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Pipes and Standard Output / Input on Windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-05-30 (15:13)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: Pipes and Standard Output / Input on Windows
On 29-05-2008, David Allsopp <dra-news@metastack.com> wrote:
>> Yep, on windows GetStdHandle doesn't always return the same kind of
>> handle depending on the context:
>> - if the output/input is console, it is console handle (i.e. need to be
>>   manipulated through console function)
>> - if the output/input is a pipe, it is a pipe handle (i.e. need to be
>>   manipulated through pipe function)
> Both these kinds of HANDLE work transparently with ReadFile/WriteFile API
> functions so should be fine with the underlying OCaml calls (OCaml's file
> I/O is based on the C I/O routines which won't be using
> ReadConsole/WriteConsole) - what scenario are you referring to where the
> difference between a console handle and a pipe would be a problem?


Sylvain Le Gall