A day in my life. Thoughts on leadership, management, startups, technology, software, concurrent development, etc... Basically the stuff I think about from 10am to 6pm.

8/11/2006

COM...the gift that keeps on giving

Here are some more things I learned today and all of these parts are related to the same program halt....

TODO: <File description>

I don’t know exactly what triggers the MFC error message box with the text, "TODO: <File description>". But I now know that I have a good reason to fill in all the VS_VERSION_INFO resources in my projects. Under some circumstances Microsoft pops up the message box below, obviously I couldn’t find any documentation that tells me exactly when Microsoft will do this, but I know it can happen.

To identify which part of the project triggered the error, update the FileDescription field in all the VS_VERSION_INFO structures in all your projects. That way when it goes you’ll know what assembly/dll was involved.

In Visual Studio open your project's the Resource View and under Version you’ll see VS_VERSION_INFO, change "FileDescription" to something unique.

EEFileLoadException

I haven’t exactly tracked down why this exception is being thrown. Microsoft doesn’t document it. But Microsoft does document the exception FileLoadException. Considering that I’m calling a managed assembly through an exposed COM interface from an unmanaged C++ executable, the error does fit. The description for FileLoadException is "The exception that is thrown when a managed assembly is found but cannot be loaded."

For some reason the description triggered some dormant brain cells, probably hanging around from when I was younger, which caused me to look in my Event Log. So I opened Event Viewer and I found that I had a .NET Runtime error that corresponded to the time I got the EEFileLoadException. Hmmm.

Okay, this is more information but...what does it mean? Searching on the number 80131506 from MSDN of course doesn’t get a hit (if you hear a really loud sucking sound, that would be Microsoft search...sucking!)

I also got a message box with the above error. Not much information available for this one, but I did find some recommendations about not running the application inside the debugger. So, I launched my program outside the debugger, got the "TODO message" box and selected the "Debug" button, which launches the debugger and sweetness... I get a "COMException was unhandled" error with an HRESULT of DISP_E_MEMBERNOTFOUND and a nice stack.

Completing the sentence in the previous post, this prototype spans several sources for content, not just stuff stored on MSDN.microsoft.com. It should also span most of the microsoft blogs and some of our external partners.