Hello,
I've tested the following code on Windows mobile 5 phone emulator and
on real devices (HTC hermes and wizard); one process opens the picture
picker dialog (see the code) in loop and another process is closing
the window.
int _tmain(int argc, _TCHAR* argv[])
{
while (1){
OPENFILENAMEEX ofnex = {0};
ofnex.lStructSize = sizeof(ofnex);
ofnex.ExFlags = OFN_EXFLAG_THUMBNAILVIEW;
ofnex.lpstrFile = new TCHAR[MAX_PATH];
ofnex.nMaxFile = MAX_PATH;
GetOpenFileNameEx(&ofnex);
delete[] ofnex.lpstrFile;
}
return 0;
}
If I dump the global program memory (for 5 minutes for example), it
increases during time, as if there is a memory leak in this code. If I
don't call GetOpenFileNameEx but a fake modal window, there is no
memory increase....
Could someone correct my code or confirm what this?
Thanks for the help,
Jean-Christophe