lpstrFile is also used to return your user's selected file(s). The reason your app is crashing is because the buffer you are supplying is too small. Also, you have to set the nMaxFile member to the same size as your buffer. According to MSDN, the buffer should be at least 256 characters.
TCHAR buffer[256] = {0};
_tcscpy(buffer, _T("MyFile.txt"));
my_file_dlg.m_ofn.lpstrFile = buffer;
my_file_dlg.m_ofn.nMaxFile = 256;
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!