X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <4693AB33 DOT 73DE DOT 0052 DOT 0 AT bju DOT edu> Subject: RE: fopens fails to open binary files on Vista Date: Tue, 10 Jul 2007 20:57:16 +0100 Message-ID: <00a701c7c32c$84092e40$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4693AB33.73DE.0052.0@bju.edu> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 10 July 2007 20:52, Kirk Russell wrote: > I am running Windows Vista and I have written a program on cygwin that > opens a binary file using the fopen call with a mode of "rb". At run time I > receive the following error message: > > Invalid Parameter passed to C runtime function. > > If I were to remove the "b" in "rb", the library call is successful. Is > there a different way to open binary files when running an executable on > cygwin, on Vista. You aren't running an executable on cygwin at all. You are running a plain old windows program. > Here is how I am building my executable. I would appreciate any help or > information you could give me. The standard response at this point is .... > gcc -DHAVE_CONFIG_H -I. -I/home/krussell//usr/win32/include -I. -I > /usr/include /usr/local/ssl/lib/libcrypto.a -g -O2 -Wall -W -MT > secureDisk.o -MD -MP -MF "secureDisk.Tpo" -o secureDisk -mno-cygwin .... "what part of NO cygwin don't you get?" :-) What you are writing is a plain old windows program. The error message comes from the windows C runtime library MSVCRT. Whatever the source of the problem is, it's nothing to do with cygwin and you'd probably be best off getting advice from a windows/msvc/mingw programming list. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/