Tuesday, May 19, 2009

Shim Infrastructure for Windows 7

Along with Windows 7, Microsoft has released Microsoft Windows Application Compatibility Infrastructure also called as SHIMS to take care of application compatibility issues.

The Shim Infrastructure implements a form of API hooking. What it means is that it redirects API calls from Windows to Shim itself. Typically call to Windows looks like:
Application --> Import Table --> Windows.

With the Shim Infrastructure, the approach will be:
Application --> Import Table --> Shim --> Windows

Now, some of the interesting facts:
1. The code that runs a shim sits outside the Windows.
2. For Windows, the shim code is just like any application code. Thus you cannot bypass security mechanisms in Windows.
3. All the shims are stored in a shim database.
4. And yes, you cannot create a new shim. You have to get in touch with Microsoft and then Microsoft may release the shims with the HFs or SPs catering to general applications.

Shim is actually really powerful mode to resolve application compatibility issues and get going with Windows 7 deployment.

Cheers,
Amol

No comments: