From: ty AT kau1 DOT kodak DOT com (Trevor Yann) Subject: Re: Gnu-Win32 and Tcl/Tk 17 Dec 1996 16:34:48 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <1.5.4.32.19961218204907.003024b8.cygnus.gnu-win32@mailhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Sender: ty AT mailhost X-Mailer: Windows Eudora Light Version 1.5.4 (32) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Kirk W. Benson wrote: >A couple of comments on interfacing Gnu-win32 and TCL: > stuff deleted >b. File handles. The DLL uses NT handles to represent open files within the >channel structures. Therefore, a channel cannot be registered with the DLL >using an fd returned from a Gbu-win32 function. Using an fd as an event >source will require an API call which returns the NT Handle given a fd; a >converse function to import a NT Handle into the fd space would also be needed. Both Microsoft and Borland compilers provide the functions: int _open_osfhandle(long handle, int flags) to obtain a file descriptor for a win32 handle long _get_osfhandle(int filehandle) to obtain a win32 handle for a file descriptor These functions are declared in io.h (which gnu-win32 does not currently have). I'm not sure whether or not it would be straight forward to add these functions, as some of the file descriptors have 2 associated file handles (e.g. tty descriptors). Maybe it would be enough if these functions could be implemented to work correctly with those file descriptors which require only a single win32 handle. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".