I wtote:
"Rein Klazes" rklazes@xs4all.nl wrote:
win95 on a vmware machine.
H:>test hMapping = 0005 p = 826DB000 VirtualQuery(826DB000) ret=0x1c BaseAddress = 826DB000 AllocationBase = 826DB000 AllocationProtect = 0x00000001 RegionSize = 0x0400f000 State = 00002000 Protect = 00000001 Type = 00020000
This means that Win95/98 doesn't free region allocated with SEC_RESERVE flag set. Could you please test other SEC_ flags? Is the result the same?
Comment about SEC_RESERVE in memory/virtual.c tells enough, besides the fact that Win95 does not unmap regions allocated with that flag set. Attached patch makes the debugged installer proceed much further with -winver win95 switch now. Unfortunately currently there is no way to distinguish regions allocated with SEC_RESERVE flag set.
Now installer DebugBreak's after another VirtualQuery call.
Could you (or anybody else with a Win95 machine) add the following lines at the end of the previous test program and report the result?
dwRet = VirtualQuery(p + 0x10000, &info, sizeof(info)); printf("VirtualQuery(%p) ret=0x%lx\n" "BaseAddress = %p\n" "AllocationBase = %p\n" "AllocationProtect = 0x%08lx\n" "RegionSize = 0x%08lx\n" "State = %08lx\n" "Protect = %08lx\n" "Type = %08lx\n", p + 0x10000, dwRet, info.BaseAddress, info.AllocationBase, info.AllocationProtect, info.RegionSize, info.State, info.Protect, info.Type);
As usually thanks in advance (to Uwe Bonnes too! He sent his result privately).