Hmm...I don't see how the code worked in the first place?

//: changed OFNJaunt references to OFN
//: changed Filename from char * to array of char
//: changed CurDir from char * (LPTSTR) to array of char
//: changed nMaxFile to = sizeof(FileName);
//: Removed lpstrCustomFilter (set to 0L)
//: Set nMaxCustFilter to 0L
//: Set nMaxFileTitle to 0L
OPENFILENAME OFN;
char FileName[255] = { 0 }; //: where
char CurDir[255] = { 0 };
GetCurrentDirectory(100, CurDir);
OFN.lStructSize = sizeof(OPENFILENAME);
OFN.hwndOwner = hwnd;
OFN.hInstance =hInst;
OFN.lpstrFilter = "Object Files (*.cob,*.3ds,*.x)\0*.cob; *.3ds; *.x\0All Files (*.*)\0*.*\0\0";
OFN.lpstrCustomFilter = 0L;
OFN.nMaxCustFilter = 0L;/* not used if lpstrCustomFilter=NULL*/
OFN.nFilterIndex = 0;
OFN.lpstrFile = FileName;
OFN.nMaxFile = sizeof(FileName);
OFN.lpstrFileTitle = NULL;
OFN.nMaxFileTitle = 0; /* ignored if lpstrFileTitle is NULL */
OFN.lpstrInitialDir = CurDir;
OFN.lpstrTitle = "Open The File";
OFN.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
OFN.nFileOffset = NULL;
OFN.nFileExtension = NULL;
OFN.lpstrDefExt = ".cob";
OFN.lCustData = NULL;
OFN.lpfnHook = NULL;
OFN.lpTemplateName = NULL;
if ( GetOpenFileName(&OFN) )
MessageBox(0L, OFN.lpstrFile, "Selected File", MB_OK);
else
MessageBox(0L, "None selected!", "Selected File", MB_OK);
HTH,
-mordell