Mail Archives: cygwin/1996/12/17/16:34:48
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".
- Raw text -