Ananda Ganesh

Hello,

I am trying out the hands on lab provided by MS in Vista environment

[http://www.microsoft.com/downloads/details.aspx familyid=5f0c8d20-a8d5-4da3-a977-e039a40d67d5&displaylang=en]

The problem is that the application returns major O.S version 6 even if the compatibility mode is set to XP SP2 in vista,now from my understanding the major o.s version of XP SP would be 5,but it returns 6 which is the o.s version of Vista.

Here's the real odd thing..if I the compatibility mode to Windows 2000,etc..the os version returned is correct.What could be the problem then with XP SP2 then

Also are there any other MS links/programs which would be usefull for learning about app compatibility in vista

Thanks,

Ganesh.




Re: Application Compatibility for Windows Vista Vista Hands on Lab - O.S version returned is 6 even when compatibility mode is set to 'XP SP2' in vista?

AndyCadley

App compat is something of a black art. It may be that the team determined that it wasn't necessary to fake the OS major version when aiming for compatability with XP SP2 as nothing was dependent upon it, wheras that was a more signifcant problem with older versions of the OS. Generally is unadvisable to try and rely upon backwards compatability behaviour as it can and does change throughout the lifecycle of the OS.

That said, one good place to start is the Application Compatibility Toolkit, which contains various resources for dealing with compatibility issues. I'd also highly recommend Raymond Chen's book, The Old New Thing, which goes into a lot of the history of Windows and why certain appcompat features exist at all.





Re: Application Compatibility for Windows Vista Vista Hands on Lab - O.S version returned is 6 even when compatibility mode is set to 'XP SP2' in vista?

Chris Jackson - MSFT

Actually, the reason the compatibility mode isn't working for the HOL doesn't have anythign to do with black magic, although I can absolutely relate to that sentiment because it feels like that a lot of times!

We absolutely still need to XP SP2 shim - there are a LOT of applications that still do hard version checks for equality, and we fix them. Version lies are still the most common fix in the system shim database if you sum them together.

The reason the HOL isn't working is that it's managed code, and we exclude managed code from the XP version lies. See: http://blogs.msdn.com/cjacks/archive/2007/09/10/version-lie-shims-and-managed-code-on-windows-vista.aspx.

This was added late in the cycle - post RC and post development of this lab. The other (non-XP) version lies work fine, and the XP version lies work fine on native code. My post explains why.

Good luck, and happy fixing!