The simpliest code such
Code:
void CTestAppDlg::OnButton1() 
{
	CFileDialog dlg(TRUE);
	dlg.DoModal();
}
gives me en error on debbug. Message box (First-time exception in TestApp.exe(NTDLL.DLL):0xC0000008:Invalid Handle.). My call stack

NTDLL! 77ba708f()
NTDLL! 77ba70b4()
KERNEL32! 772fcaa4()
OVERLAYICON! 1000e597()
OVERLAYICON! 1000751c()
OVERLAYICON! 1000665a()
SHELL32! 766a2d20()
SHELL32! 767bfc5c()
SHELL32! 766a2c26()
SHELL32! 766a2b30()
SEARCHFOLDER! 65347e67()
SHELL32! 767b1819()
SHELL32! 766a208d()
SHELL32! 766c83a6()
SHELL32! 7670639b()
SHELL32! 76708c1f()
SHELL32! 76708d53()
SHLWAPI! 765eb2b1()
NTDLL! 77b8d877()
NTDLL! 77b90842()
KERNEL32! 77303c45()
NTDLL! 77bc37f5()
NTDLL! 77bc37c8()

Please help me to solve this bug as I tried for few days already with no luck.