Actually, the interesting thing is that based on the details of the OpenFile function, the code supplied shouldn't work at all. There is a second parameter to OpenFile that tells how the file should be opened, and according to the help the default for that parameter is 0, which is Read Only.
Sorry that I don't recall who it was that posted it, but did you try the other suggestion that was given about doing a Seek to the end of the file and then writing? As far as I know lots of people use that control, so it should be pretty stable. - Original Message - From: