delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/23/08:48:24

X-Spam-Check-By: sourceware.org
Message-ID: <45DEF0E4.2030609@comcast.net>
Date: Fri, 23 Feb 2007 06:49:24 -0700
From: Eric Blake <ericblake AT comcast DOT net>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: Kirk Russell <Krussell AT bju DOT edu>, cygwin AT cygwin DOT com
Subject: Re: CreateFile() and fopen issues on vista
References: <022020072205 DOT 23634 DOT 45DB70BE0006311500005C5222007456720A050E040D0C079D0A AT comcast DOT net> <45DB2D20020000520000088A AT BJUMAIL DOT bju DOT edu>
In-Reply-To: <45DB2D20020000520000088A@BJUMAIL.bju.edu>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://cygwin.com/acronyms/#PPIOSPE - I was on vacation, and did not see
your personal reply for several days, whereas the list would have faster
response.

According to Kirk Russell on 2/20/2007 3:17 PM:

> In general, it is a bad idea to mix Windows APIs with cygwin, since
> you are going behind cygwin's back, and can no longer guarantee
> cygwin's POSIX-y behavior.  Using CreateFile from a cygwin program
> is asking for problems.  Use fopen() or open() instead.
>

> Eric,
> 
> I am using CreatFile() to create a  handle that is passed to  DeviceIoControl() in order to get product id and version from the USB drive. Are you saying that I could use fopen to do the same? 
> 
> Thanks for the reply
> Kirk

DeviceIoControl is yet another non-cygwin function that goes behind
cygwin's back.  I'm not familiar enough with what you are trying to do to
know if a cygwin ioctl() would get at the same information.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3vDj84KuGfSFAYARAvBLAJ498a9k9mUN+QrQx0ormMBTpKEJcwCglCk5
E/onUjp0Yx+BwUpIwaWGUGk=
=MZr8
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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