views:

258

answers:

2

For Visual Studio .sln files, Window Explorer is doing something "clever" to figure out whether to display the v8 or v9 icons.

Now when it comes to double-clicking/launching the icon, I know that it goes through a "Visual Studio Launcher" app which looks at the version info in the sln file and selectively runs VS2005 or VS2008

But any idea how it does the icon part. Presumably that simply by browsing to a folder, something is opening the file in the background and making a decision on which Icon to use, but its so seamless/quick.

Any idea how it's done. We have config generator here, that gets updated deployed by ClickOnce but it would be nice for people to see at a glance which version of the generator app, created the config files.

Cheers,

+1  A: 

Take a look at this part of a tutorial to shell extensions on custom icons.

avakar
+4  A: 

I think this is what you're looking for?

http://msdn.microsoft.com/en-us/library/cc144122(VS.85).aspx

great_llama
Yes, that's the way VS does it. The code is in C:\Program Files\Common Files\Microsoft Shared\MSEnv\VSFileHandler.dll
0xA3