We do exactly what you need to do, but we use ActiveX DLL's. This way you can say:
Code:
objWhatever = CreateObject("DLLName.ClassName")
I don't know enough about straight forward C++ to say this for certain, but I think you can achieve this by using a type library:
Code:
//-------------------------------------------------------------------
//  IMainForm
//-------------------------------------------------------------------
    [
      odl,
      uuid(06CFF40F-A63B-11D3-8476-00E029423382),
      version(1.0),
      dual,
      nonextensible,
      oleautomation
    ]
    interface IMainForm : IDispatch {
        [id(0x01), propget]
        HRESULT Window([out, retval] IWindow** retval);
    };
In the simple example above, I think that the use of the word "oleautomation" makes this class creatable with VB's "CreateObject" function.

Hope this helps.
Shrog