Joe,
You can apply 2 different strategies. Either you open the file and you close it just after you took all the relevant data from it ... or you need to call Win32 API functions to open the file in Share mode (CreateFile() does it). I am almost sure that the FOPEN() function have some secrets as far as opening the file in share mode is concerned but MS didn't document them. Why ? Beats me !
Now, I am wondering why you Notepad sometims work while the file is open. This is a mystery to me.
Pat