Below is the code I have for trying to use GetOpenFilename to pop-up a dialog for opening a file in my non-MFC application.
However, when the program gets to this line of code, and I try to step over it in the debugger, it brings the application down, without any error message, except 0xC0000005 Access Violation!! Help!
S_filename.lStructSize = sizeof( S_filename );
S_filename.hwndOwner = (HWND)Parent_Handle;
S_filename.hInstance = NULL;
S_filename.lpstrFilter = "Castle Files\0*.set\0";
S_filename.lpstrCustomFilter = NULL;
// S_filename.nMaxCustFilter = NULL;
S_filename.nFilterIndex = 1;
S_filename.lpstrInitialDir = current_filter;
S_filename.lpstrTitle = NULL;
S_filename.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_NONETWORKBUTTON;
status = GetOpenFileName( &S_filename );