I’ve spent the whole weekend debugging a C++ COM object that:
– correctly returns “ABC123-34BGH” in WSH
– but returns “TTTTT-TTTTT” in an ASP page.

I asked around and some people thought it was a line in the source which de-allocated the return value almost immediately after creating it. I played with that piece but got nothing from it.

I crash-coursed some VC++ / COM but had a hunch that it was not the source but an install issue.

I learned:
* Some basic C++ stuff – pointers, memory de-allocation.
* What IDL is (COM thing)
* How to compile C++ to DLL’s in VC++
* How to use Component Services to register a COM+ component

The culprit was that it needed to be installed through Component Services as opposed to just using the command-line regsvr32. Still don’t know why.