No, I have no CD in my CD-ROM.
I think the problem could be hwndOwner or lpfnHook (the members of the structure OPENFILENAMEW)
I wrote an empty hook-procedure. It looks like that:
UINT CALLBACK OpenSave::OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
return false;
}
--
Then I changed the parameter as follow:
Flags= OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_ENABLEHOOK;
lpfnHook = OpenSave::OFNHookProc;
--
The result: I receive a file dialog in an other form: this one where you have to choose first the drive and then choose the file in this drive. The file dialog does'nt hang up! Yeahh!! but I still has an other problem :-( I cannot change the drive!!! That means, if the drive of the InitDirectory is C:\I cannot choose a file in the drive D:\ or in any other drive!
Maybe you can help me if you can answer some of these questions:
1. how can I get the the HWND within the dll?
2. If I should change the hook procedure, how does it must look like?
3. Do you have any idea how I can solve this problem with the drive?
4. Does the code work in your case?! If not, why?!
Note that I want to open the file dialog in the DllMain in the switch statement: "case DLL_PROCESS_ATTACH". This could be the reason but no idea why!!
Thanks a lot for your advices!!!