Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Opening a File with mmioOpen

To open a file for basic I/O operations, set the lpmmioinfo parameter of the mmioOpen function to NULL. The following example opens a file named "C:\SAMPLES\SAMPLE1.TXT" for reading, and checks the return value for error.

HMMIO hFile; 

if ((hFile = mmioOpen("C:\\SAMPLES\\SAMPLE1.TXT", NULL, 
    MMIO_READ)) != NULL) 
    // File opened successfully. 
    // File cannot be opened. 

Use the dwFlags parameter of mmioOpen to specify flags for opening a file.



Community Additions

© 2015 Microsoft