On Sun, Feb 07, 2010 at 09:07:38AM +1100, John Marriott wrote:
I never noticed this, as I don't use the gui browse dialogs, but I could reproduce it. I traced it to some compatibility code with NT 4 ( use of OPENFILENAME_SIZE_VERSION_400 instead of the actual size of the OPENFILENAMEW struct). With the attached patch the compatibility code is commented out, and the browse dialog works again for me.[...]mingw64). However, the "File->Save As..." command no longer works. It displays " :browse confirm saveas" at the bottom of the screen but does not display the file/folder "save as" requester window.My OS is Win7 x64. MinGW is 4.4.4 20100129 (prerelease) autobuild from the MinGW 64 site.Any ideas would be greatly appreciated.
According to gdb fileStruct.lStructSize ends up as 8 bytes if OPENFILENAME_SIZE_VERSION_400 is used, which seems quite small to me. I'll try to see what other compilers (should have a vc-express and the original mingw32 lying around here somewhere), maybe it's just some bogus define in the mingw64 headers.
Regards,
Andy
--
Go not to the elves for counsel, for they will say both yes and no.
-- J.R.R. Tolkien
diff -r 8a0a8f10b43e src/gui_w48.c
--- a/src/gui_w48.c Wed Feb 03 18:14:49 2010 +0100
+++ b/src/gui_w48.c Sun Feb 07 12:31:13 2010 +0100
@@ -3349,7 +3349,7 @@
filterp = convert_filterW(filter);
memset(&fileStruct, 0, sizeof(OPENFILENAMEW));
-#ifdef OPENFILENAME_SIZE_VERSION_400
+#if 0 /* #ifdef OPENFILENAME_SIZE_VERSION_400 */
/* be compatible with Windows NT 4.0 */
/* TODO: what to use for OPENFILENAMEW??? */
fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400);
@@ -3511,7 +3511,7 @@
filterp = convert_filter(filter);
memset(&fileStruct, 0, sizeof(OPENFILENAME));
-#ifdef OPENFILENAME_SIZE_VERSION_400
+#if 0 /* #ifdef OPENFILENAME_SIZE_VERSION_400 */
/* be compatible with Windows NT 4.0 */
fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400);
#else
pgpYyOhNG5vbk.pgp
Description: PGP signature
