OpenFile() has been superseded by CreateFile()
This will return the HANDLE to a file given the path, including the name of the file. It will display a message box if it fails (with the error code).
Look up the flags I have used as I want the file to be created if it does not exist and may want to write to it.
HANDLE OpenDocument(HWND hDlg, char *sFilePath)
hFile=CreateFile(sFilePath, GENERIC_WRITE|GENERIC_READ ,0 ,NULL ,OPEN_ALWAYS ,FILE_ATTRIBUTE_NORMAL ,NULL);
if((hFile == NULL)||(hFile == INVALID_HANDLE_VALUE))
sprintf(sBuffer,"%s file failed to open with Error #:%d",sFilePath,iError);
Use Readfile() and SetFilePointer() to read data from the file.