caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Christopher A. Watford" <christopher.watford@gmail.com>
To: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
Cc: Xavier.Leroy@inria.fr, caml-list@inria.fr
Subject: Re: [Caml-list] [WISH] Unix.fstat and symlinks for win32
Date: Wed, 2 Feb 2005 10:08:20 -0500	[thread overview]
Message-ID: <8008871f05020207085514849c@mail.gmail.com> (raw)
In-Reply-To: <20050202.135208.106936180.Christophe.Troestler@umh.ac.be>

On Wed, 02 Feb 2005 13:52:08 +0100 (CET), Christophe TROESTLER
<Christophe.Troestler@umh.ac.be> wrote:
> Maybe the manual could be updated to reflect that?  [IMHO, it would be
>  nice if the windows peculiarities were in the ocamldoc comments -- I
>  usually use ocamlbrowser...]
> 
> > (I'm not even sure the latter is implementable at all with the
> > Win32 API.)
> 
> Windows gurus here?  (My goal with fstat was to know whether stdin was
> connected to a socket or a pipe.)

HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
BOOL isPipe = ((hStdin != NULL && hStdin != INVALID_HANDLE_VALUE) ?
   GetNamedPipeInfo(hStdin, NULL, NULL, NULL, NULL) :
   FALSE);

> Regards,
> ChriS

There is some dirty code to check if the handle for stdin is using
named pipe functions or if it is using read/write file functions. Yep,
horrible.

-- 
Christopher A. Watford
christopher.watford@gmail.com
http://dorm.tunkeymicket.com


  reply	other threads:[~2005-02-02 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-01 10:07 Christophe TROESTLER
2005-02-01 11:39 ` [Caml-list] " Marcin 'Qrczak' Kowalczyk
2005-02-01 12:38   ` Christophe TROESTLER
2005-02-01 14:19 ` Igor Pechtchanski
2005-02-02  9:54 ` Xavier Leroy
2005-02-02 12:52   ` Christophe TROESTLER
2005-02-02 15:08     ` Christopher A. Watford [this message]
2005-02-02 22:08   ` Robert Roessler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8008871f05020207085514849c@mail.gmail.com \
    --to=christopher.watford@gmail.com \
    --cc=Christophe.Troestler@umh.ac.be \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).