Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Juan Lang
> GetVersionEx() is used in GlobalMemoryStatus() also, after these are in I'll > pull it out and make it static, and then just do it once and use it for > both. Okay, thanks. Unrelated nit on patch 3/3: +lpmemex->ullTotalVirtual = min((ULONG_PTR)si.lpMaximumApplicationAddress-(ULONG_PTR)si.l

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Adam Martinson
On 06/06/2011 11:02 AM, Juan Lang wrote: Ha! Quite right, thanks! If that's what you want, then an easier check is to use GetVersion() rather than GetVersionEx. (GetVersion()& 0x8000) is true under Win9x, false under any NT version. See many checks like this in e.g. kernel32. --Juan GetV

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Juan Lang
> Ha!  Quite right, thanks! If that's what you want, then an easier check is to use GetVersion() rather than GetVersionEx. (GetVersion() & 0x8000) is true under Win9x, false under any NT version. See many checks like this in e.g. kernel32. --Juan

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Adam Martinson
On 06/06/2011 10:50 AM, Juan Lang wrote: In NT4 mode: (osver.dwMajorVersion>= 5) is FALSE. (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) is TRUE. (osver.dwMajorVersion>= 5 || osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) is TRUE. Right? Ah, right. Wrong with this comment, sorry about t

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Juan Lang
> In NT4 mode: > (osver.dwMajorVersion>= 5) is FALSE. > (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) is TRUE. > (osver.dwMajorVersion>= 5 || osver.dwPlatformId != > VER_PLATFORM_WIN32_WINDOWS) is TRUE. > Right? Ah, right. Wrong with this comment, sorry about that. But my original comment r

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Adam Martinson
On 06/06/2011 10:45 AM, Juan Lang wrote: I'm removing part of the comment because it no longer applies. We're not just using the XP behavior for everything anymore, now we're using the 9x behavior when it's appropriate. When is it appropriate, and when not? I don't know, and your patch doesn't

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Juan Lang
> I'm removing part of the comment because it no longer applies.  We're not > just using the XP behavior for everything anymore, now we're using the 9x > behavior when it's appropriate. When is it appropriate, and when not? I don't know, and your patch doesn't explain that. See below for more on

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Adam Martinson
On 06/06/2011 10:23 AM, Juan Lang wrote: Hi Adam, perhaps I'm just being obtuse, but I don't see how Dmitry's comment has been addressed for this patch. I'm confused by the commit comment ("Emulate Win9x if appropriate") and the change itself: /* Win98 returns only the swapsize in ullTota

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (try 2)

2011-06-06 Thread Juan Lang
Hi Adam, perhaps I'm just being obtuse, but I don't see how Dmitry's comment has been addressed for this patch. I'm confused by the commit comment ("Emulate Win9x if appropriate") and the change itself: /* Win98 returns only the swapsize in ullTotalPageFile/ullAvailPageFile, WinXP re

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-03 Thread Adam Martinson
On 06/03/2011 03:37 AM, Dmitry Timoshkov wrote: Adam Martinson wrote: The stuff in that block is for win2k+ mode only. Win9x doesn't add [Total|Avail]Phys to [Total|Avail]PageFile. If wine is in win9x mode it should behave like win9x, or it confuses old apps. This is needed for the 2nd patc

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-03 Thread Dmitry Timoshkov
Adam Martinson wrote: > The stuff in that block is for win2k+ mode only. Win9x doesn't add > [Total|Avail]Phys to [Total|Avail]PageFile. If wine is in win9x mode it > should behave like win9x, or it confuses old apps. This is needed for > the 2nd patch, IIRC removing the photoshop 4 hack in

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-02 Thread Adam Martinson
On 06/02/2011 09:21 PM, Charles Davis wrote: On 6/2/11 2:46 PM, Adam Martinson wrote: On 06/02/2011 03:10 PM, Dmitry Timoshkov wrote: Adam Martinson wrote: +osver.dwOSVersionInfoSize = sizeof(osver); +GetVersionExW(&osver); + ... +if (osver.dwMajorVersion>= 5) Once again, tha

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-02 Thread Charles Davis
On 6/2/11 2:46 PM, Adam Martinson wrote: > On 06/02/2011 03:10 PM, Dmitry Timoshkov wrote: >> Adam Martinson wrote: >> >>> +osver.dwOSVersionInfoSize = sizeof(osver); >>> +GetVersionExW(&osver); >>> + >> ... >>> +if (osver.dwMajorVersion>= 5) >> Once again, that's wrong way of detectin

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-02 Thread Adam Martinson
On 06/02/2011 03:10 PM, Dmitry Timoshkov wrote: Adam Martinson wrote: +osver.dwOSVersionInfoSize = sizeof(osver); +GetVersionExW(&osver); + ... +if (osver.dwMajorVersion>= 5) Once again, that's wrong way of detecting win9x, or please try to explain better how the patch does what

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx(). (resend)

2011-06-02 Thread Dmitry Timoshkov
Adam Martinson wrote: > +osver.dwOSVersionInfoSize = sizeof(osver); > +GetVersionExW(&osver); > + ... > +if (osver.dwMajorVersion >= 5) Once again, that's wrong way of detecting win9x, or please try to explain better how the patch does what the subject describes, and for which app it

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx().

2011-05-31 Thread Adam Martinson
On 05/31/2011 12:09 PM, Dmitry Timoshkov wrote: Adam Martinson wrote: +if (osver.dwMajorVersion>= 5) That's a wrong check for win9x. It's not, it's a check for win2k and later, the stuff in that block isn't done for win9x.

Re: [1/3] kernel32/heap: Emulate Win9x if appropriate in GlobalMemoryStatusEx().

2011-05-31 Thread Dmitry Timoshkov
Adam Martinson wrote: > +if (osver.dwMajorVersion >= 5) That's a wrong check for win9x. -- Dmitry.