delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/06/07/17:58:46

Message-Id: <199906072158.RAA30821@delorie.com>
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
X-WM-Posted-At: MailAndNews.com; Mon, 7 Jun 99 17:56:49 -0400
Date: Mon, 7 Jun 1999 17:56:49 -0400
Sender: Charlie Benton <bentonc AT MailAndNews DOT com>
From: Charlie Benton <bentonc AT MailAndNews DOT com>
To: cygwin AT sourceware DOT cygnus DOT com
X-EXP32-SerialNo: 00000001
Subject: where is cygwin_attach_handle_to_fd?
Mime-Version: 1.0
X-Mailer: InterChange (Hydra) SMTP v3.51

I am trying to read from com port 19.  I could not seem to does this with the 
standard cygwin open () call.  So I am going to use CreateFile file but of 
couse this gives me a HANDLE.  Now cygwin_attach_handle_to_fd () is supposed 
to be able to covert the HANDLE to a fd so that my unix functions can read 
them but I can not seem to find the cygwin_attanch_handle_to_fd anywhere.  If 
anyone has any experience with this please help me out.

Thanks,
     Charlie Benton (bentonc AT mail DOT utexas DOT edu)

CreateFile (
        "\\\\.\\COM19",     // address of name of the communications device
        GENERIC_READ,       // access (read-write) mode
        0,                  // share mode
        NULL,               // address of security descriptor
        OPEN_EXISTING,      // how to create
        0,                  // file attributes
        NULL                // handle of file with attributes to copy
);

if (0 < (fd = open(fname, O_RDONLY)))

------------------------------------------------------------
 Get your FREE web-based e-mail and newsgroup access at:
   http://MailAndNews.com and http://MailAndNews.co.uk

 Create a new mailbox, or access your existing IMAP4 or
 POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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