I have a problem calling the Windows function GetOpenFileName() from my program.
What hapens when I call it depends on the stack size I requested.
When I set the size of Linker->System->stack reserve size to
200 M it opens the dialog box and I can sellect a file after about 3 s. (Debug compiled)
300 M the call stals for a while, do not show a dialog box, but returns in about 7 s.
400 M call do not return, I waited at least 60s.
I attach my Win32, Quickwin Project showing this behavior.
I use this call in my OpenMP project and there I need to set a large stack to start/run my program.
Can somone enlighten me if this is a feature, a Windows bug of a compiler bug?
Or am I doing something wrong?
Is there a workaround for the large stack size needed to start my program?
Core i7 , 4 GB memory
windows 7 64 bit.
Compiling with Intel Visual Fortran Compiler XE 184.108.40.206 [IA-32]...
If i just after GetOpenFileName insert
I get iret=0 for 200M and iret=2 for 300M.
Futher I noticed that for 400M it do return after 140s with iret=2
googling I find at msdn.microsoft.com
The common dialog box function failed during initialization. This error often occurs when sufficient memory is not available.
What units are used when setting stack size?
Could I be out of some special sort of windows memory?