Hello,
I have a program that use GetOpenFileName API to play a song. It works well until the user try to open a second song, the program bug. I run my program in debugger mode and figure out that it bug when he gets to GetOpenFileName.

Here's my code:
PHP Code:
OPENFILENAME ofn;
char szFileName[MAX_PATH] = "";

ZeroMemory(&ofnsizeof(ofn));

ofn.lStructSize sizeof(ofn);
ofn.hwndOwner hWnd;
ofn.lpstrFilter "Text Files (*.wav)\0*.wav\0All Files (*.*)\0*.*\0";
ofn.lpstrFile szFileName;
ofn.nMaxFile MAX_PATH;
ofn.Flags EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;


GetOpenFileName(&ofn); 
Does someone knows why it bugs?