Whoever designed the #imports functionality in VS2008 and the way it interacts with MFC owes me a weekend.
I have been migrating a big VS project to VS2008 and have had some real fun managing all the includes and imports.
When I did the codematic base xll project I was very careful to structure things so as to avoid header hell. The original developer of this project took another route.
I was blocked by a stray windows.h include. So I listed them – all 25,000 includes! there were 20 windows.h ones. And the stray one was early meaning a later MFC check failed. In the end I managed to shuffle all the different parts around to get it to compile. But what a PITA. And its always depressing when you go from one compile error to 941!
The stray one (in OLEDB) was about 9 include levels down so trying a few COM_NO_WINDOWSH type guards actually made things worse. Finally it turned out that I needed to move one of the #imports into stdafx.h and leave the other 2 in their original .h.
So the original problem was that function names were not appearing in Excel 2007, that was an easy fix, involving upgrading the XLL+ version to one that supports 2007. The hard work was in the C++ include dance to get the thing to compile. The actual project is very interesting, messing with the arcane header include rules in C++ less so.
Lucky there isn’t much snow, or I’d be really bitter at missing some decent snowboarding.
What did you get up to this weekend?