delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/10/18:58:55

Date: Mon, 10 Mar 1997 16:49:15 -0700 (MST)
From: David May <dmay AT tvi DOT cc DOT nm DOT us>
To: Ian Mausolus <mausolus AT ican DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: fopen problem
In-Reply-To: <01bc2d91$6801fd80$5756f8ce@pquinney>
Message-ID: <Pine.SOL.3.95.970310164439.25931B-100000@curie.tvi.cc.nm.us>
MIME-Version: 1.0

On 10 Mar 1997, Ian Mausolus wrote:

> I used fopen in the following manner:
> 
> FILE * fp;
> fp=fopen("whetever.xxx","wb");
> 
> and it locked up my machine!  Did anybody ever run into this before?  Does
> anybody know how or why this could be happening???
> 
> Thanx,
> 
> I. Mausolus
> 
> 

Did you try to access (i.e., write to) the file without verifying that the
open call worked?  For example, if you try to open a file for write access
that is read-only or locked by a program (Word, for example) using
share.exe or share.386.  In that case, fopen would return NULL (failure)
and if you try to then use the file pointer, you could crash your system.

Hope this helps.

David May
ID Card Adminstrator
Albuquerque TVI


- Raw text -


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