By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,804 Members | 1,634 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,804 IT Pros & Developers. It's quick & easy.

opened file

P: n/a
How to check if file has already opened by another process ?
thx
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Piotr" <to******@wp.pl> wrote in message
news:bq**********@news2.ipartners.pl...
How to check if file has already opened by another process ?


You use some platform-specific method. Cannot be done
with standard C++, which has no notion of 'process'.

The only thing which can be determined about opening a file
in standard C++ is, was the file opened successfully or not.
The *reason* for a failed open (which could be any of a
variety of reasons, e.g. file does not exist, locked by
another process, insufficient user 'permission', etc.) cannot
be determined with standard C++.

Consult your platform and/or implementation documentation.
-Mike
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.