Mail Archives: djgpp/1997/03/10/18:58:55
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 -