Because _WIN32_WINNT=0x500 changed the sizeof(OPENFILENAME) value.
Created attachment 212888 [details] [diff] [review] trivial patch
checked-in to trunk. Thanks.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Are there any other side-effects like this?
(In reply to comment #3) > Are there any other side-effects like this? sizeof(RASSCONN) will be changed if WINVER >= 0x401. Therefore nsRASAutodial::IsRASConnected may not work correctly. However, I can't test it because I have no dialup modems. And please file another bug about this problem.
Comment on attachment 212888 [details] [diff] [review] trivial patch >+#if _WIN32_WINNT >= 0x0500 >+ ofnA.lStructSize = OPENFILENAME_SIZE_VERSION_400; >+#else > ofnA.lStructSize = sizeof(OPENFILENAME); >+#endif Out of interest, how does this differ from ofnA.lStructSize = OPENFILENAME_SIZE_VERSION_400; without #if?
(In reply to comment #5) > Out of interest, how does this differ from > ofnA.lStructSize = OPENFILENAME_SIZE_VERSION_400; > without #if? Commdlg.h from MSVC6 or MINGW doesn't define OPENFILENAME_SIZE_VERSION_400. So it may cause the build bustage.
According to MSDN http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxstructures/openfilename.asp |lStructSize| should be set as follows. Windows NT 4.0: In an application that is compiled with WINVER and _WIN32_WINNT >= 0x0500, use OPENFILENAME_SIZE_VERSION_400 for this member. Windows 2000/XP: Use sizeof (OPENFILENAME) for this parameter. Therefore, the present fix seems to be somewhat incomplete, as no test for a newer system is made (namely, OPENFILENAME_SIZE_VERSION_400 should only be used for older systems).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
OPENFILENAME_SIZE_VERSION_400 can work on Win2k/XP for compatibility. Otherwise, old apps can not open Common Dialogs on Win2k/XP. OPENFILENAME_SIZE_VERSION_400 does simply emulate the sizeof (OPENFILENAME) with _WIN32_WINNT=0x400. Mozilla build worked perfectly before cairo enabled. Please reopen only after you found a specific problem.
Status: REOPENED → RESOLVED
Last Resolved: 13 years ago → 12 years ago
Resolution: --- → FIXED
Also, I already confirmed non-cairo build works on Win2k/XP. FYI, I'm planing to use sizeof (OPENFILENAME) on cairo build (see bug 330276). We don't have to bothered to adding runtime version check for non-cairo build because it is not supported.
You need to log in before you can comment on or make changes to this bug.