delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/06/19/03:21:25

From: colin AT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: Converting WIN32 HANDLE's to integer file descriptors
19 Jun 1998 03:21:25 -0700 :
Message-ID: <002d01bd9b22$624c41c0$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp>
Mime-Version: 1.0
To: "Craig Setera" <setera AT us DOT ibm DOT com>
Cc: "GNU-Win32" <gnu-win32 AT cygnus DOT com>

Craig Setera <setera AT us DOT ibm DOT com> wrote:

>Is there a way to take the HANDLE structure returned by named
>pipe creation and convert that handle to an integer file descriptor
>for use by read() and write()?


Under Mingw32 (using MS's C run time library) you can use _open_osfhandle to
do this (I think). Since, under it all, newlib is probably using Win32
handles to access files it should be possible to write the equivalent
function for newlib, though it might require a fair bit of work (and the
ability to recompile newlib from source).

Colin.

-- Colin Peters - colin at fu.is.saga-u.ac.jp
-- Saga Univ. Dept. of Information Science
-- http://www.geocities.com/Tokyo/Towers/6162/index.html
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019