Set size before calling GetVersionEx()
James Juran
jamesjuran at alumni.psu.edu
Wed May 16 22:53:31 CDT 2001
[Resend -- my message from last night seems to have been swallowed
by the backup MX for winehq.com (nmail.corel.com)]
While trying out the new printing code on Windows NT, I noticed that
GetVersionInfoW was sometimes complaining about having the wrong size.
This should fix those problems.
James Juran <jamesjuran at alumni.psu.edu>
Make sure we set dwOSVersionInfoSize before
calling GetVersionInfo().
Index: controls/edit.c
===================================================================
RCS file: /home/wine/wine/controls/edit.c,v
retrieving revision 1.81
diff -u -r1.81 edit.c
--- controls/edit.c 2001/05/09 17:12:30 1.81
+++ controls/edit.c 2001/05/16 03:30:00
@@ -361,6 +361,7 @@
OSVERSIONINFOW info;
DWORD dwProcVersion = GetProcessVersion(0);
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
GetVersionExW( &info );
dwEmulatedVersion = MAKELONG( info.dwMinorVersion, info.dwMajorVersion );
/* fixme: this may not be 100% correct; see discussion on the
Index: dlls/imm32/imm.c
===================================================================
RCS file: /home/wine/wine/dlls/imm32/imm.c,v
retrieving revision 1.10
diff -u -r1.10 imm.c
--- dlls/imm32/imm.c 2001/05/09 17:31:32 1.10
+++ dlls/imm32/imm.c 2001/05/16 03:30:30
@@ -172,6 +172,7 @@
hIMC, dwIndex, lpBuf, dwBufLen
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA( &version );
switch(version.dwPlatformId)
{
@@ -195,6 +196,7 @@
hIMC, dwIndex, lpBuf, dwBufLen
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA( &version );
switch(version.dwPlatformId)
{
@@ -357,6 +359,7 @@
OSVERSIONINFOA version;
FIXME("(0x%08x): stub\n", hWnd);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA( &version );
switch(version.dwPlatformId)
{
More information about the wine-patches
mailing list