There are two applications. The first application is remote to the machine in question (and I have NO ACESSS to it) and creates a large file via the network (LAN). I have no control over this process, nor do I know when it occurs. THIS IS WHAT I HAVE TO WORK WITH. I cannot add, change or alter this in any way.
The second application is written by me and processes this file when it is found. This app is scheduled to run every 5 mins.
A Situation could occur where the file is in the process of being written when my app attempts to process it resulting in an incomplete processing and/or other errors, so I need to detect if the file has been completely written BEFORE I start processing it.
I can use OpenFile() and request read/write locked access. An error would indicate that the file is being created.
I could possibly do something clever with file system watcher http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
But I suspect there is an elegant way I have not thought of for windows (NT and later)