I see that standard C has no way of telling if a file is already opened in another process. So the answer should contain several examples for each platform. I need that chec
The answers so far should tell you that finding out the information you've asked for is tricky, non-portable, and often inherently unreliable. So, from my perspective, the real answer is don't do that. Try to find a way to think about your real problem so that this question doesn't arise.