10.6 Reopening a File

If you open a file on a floppy disk, you should close it before your application relinquishes control to another application. The most convenient time to close the file is immediately after reading or writing. The file can always be reopened by using OpenFile with the OF_REOPEN option:

hFile = OpenFile((LPSTR) NULL, &OfStruct, OF_REOPEN | OF_READ);

In this example, OpenFile uses the filename specified in the OfStruct structure to open the file.