I have a simple audio effect COM component built in VC++ (6.0).
It seems to successfully register, showing no error after build, and saying "DllRegisterServer in c:\importcomponents\binrawdmo.dll succeeded" when using RegSvr32.
But I can't seem to do several other things with it:
#import in C++: #import "<rawdmo.dll>"
(gives "fatal error C1083: Cannot open type library file: 'c:\importcomponents\bin\rawdmo.dll': Error loading type library/DLL.)
CreateObject in VB:
Dim foo As Object
Set foo = CreateObject("DMO.RawDMO")
(Gives "Object Required" A watch on CreateObject("DMO.RawDMO") indicates "Variant/<Unsupported object type>")
OleView: View TypeLib
(Gives "LoadTypeLib(C:\importcomponents\bin\RawDMO.dll) failed. Error loading type library/DLL TYPE_E_CANTLOADLIBRARY ($80029C4A)" )
The component is a DirectX Media Object built in VC++ using the "Audio Effect DMO Wizard" from the DirectX SDK. If I make a new project with the wizard and compile it, I get the same problem, indicating that it's not due to my small amount of customization.
The defaults DLLRegisterServer has two things.
1.A call to
DMORegister(), which sets up the DirectX registration required. That seems to work fine, since I can load and use the DMO in Windows Media Encoder.
2. return _Module.RegisterServer();
If instead, I call _Module.RegisterServer(TRUE); (setting bRegTypeLib TRUE to register the typelib),
I now get the same behavior except I also get the TYPE_E_CANTLOADLIBRARY error when using Regsvr32.