May 16, 2006 07:58
Let's see, how to put this succintly.
Hm. What am I trying to say? Oh, yeah:
In a software package that someone else hands you...
1. Buried deep, deep within a mountain of #includes is #define blah CoInitialize;
2. Note that blah is a re-implementation of COM's CoInitialize, as seen in .NYET's atlcom.h and friends. Oddly enough, blah is also a COM object itself.
3. Later, do this..
::blah(NULL) //Wakes up COM
{
IBlah bl(CLSID_blah); //or use IBlah bl(__uuidof(blah))
...
}
Note something funny? That's right, you've #define'd it to be CoInitialize! __uuidof doesn't play nice! Neither does the CLSID!
So, finally, after three hours of figuring this out, you call the nice folks who did this to you, and you get a "Oh, yeah, we should've warned you about that... the guy who did this is unix native."
Urk!
Now I LOVE *nix. I think coding in *nix is so much simpler, and bash is my favorite environment ever.
However, getting a *nix native to develop your COM architecture? ARUGH!
There's FORTRAN snippets embedded in the code!
(Mind you, it worked on Unix.)
Short version: COM + confusing use of C++ scoping = fun.
com,
cubeville