fopen() called here with parameter 2, meaning READ and WRITE. You can not write to the file if you do not have exlusive access to it. fopen() returns (-1) if it cannot open the file for any reason.
As in VFP Help:
"...If FOPEN( ) successfully opens the file, the file handle number of the file is returned. FOPEN( ) returns –1 if the file cannot be opened...."
In any case you can not use fopen() more than ones for the very same file (it will fail on the second attempt).
>If the file handle returned is not -1, then the file is opened. But how does the return value of the file handle <= 0 mean that someone else has it open? Is a file handle assigned each time the file is oepned, and then startign with 0 or 1?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only