WTL initialization, Com and C++ namespaces

paradigm-shift

[May 11th, 2006]

Recently I was thinking what should be my first code contribution to the WTL project? And here it is: an seemingly simple COM initialization mechanism.

Why “seemingly simple” ? Because it is done with the healthy dose of using the C++ anonymous namespace, in order to make it (completely) transparent, but still (very) effective solution.

I do particularly like these ‘invisible’ C++ constructs actually doing a useful job.  Enough of theory, here is the practice (aka “the code”) :