Mixed code - "not registered"?

P

Phre2d

We are attempting to move a large development project into the .NET
age over time. We have a large number of ATL-based COM objects in
this project. Following the "Journal Poster" example provided by MS,
I have converted some of my COM projects into mixed code so that there
is both a .NET and COM interface to the underlying logic. So far, so
good.

In one of these former COM projects, four additional COM objects are
within from the underlying logic as a matter of executing the main
interface method. Our testing shows that this all works perfectly
well through older programs that are using this project as a COM
object, but when accessed as a .NET class library, only three of the
four objects are loaded properly - attempting to create the dispatch
for the fourth COM object causes a COM exception reporting that the
object is not registered.

I have traced the problem right down to the call to CoCreateInstance
and I have checked the registry, but I'm at a loss as to how to
proceed from here. Any ideas? Other than not being registered, what
can cause a "not registered" message?
 
R

Ronald Laeremans [MSFT]

Another common reason for a not registered error is that the this interface
would need a customer marshaller and that marshalling code is not
registered.

One of the reasonable ways to diagnose would be to use ntregmon or another
tool that shows registry calls to see what COM is looking for.

Ronald Laeremans
Visual C++ team

Phre2d said:
We are attempting to move a large development project into the .NET
age over time. We have a large number of ATL-based COM objects in
this project. Following the "Journal Poster" example provided by MS,
I have converted some of my COM projects into mixed code so that there
is both a .NET and COM interface to the underlying logic. So far, so
good.

In one of these former COM projects, four additional COM objects are
within from the underlying logic as a matter of executing the main
interface method. Our testing shows that this all works perfectly
well through older programs that are using this project as a COM
object, but when accessed as a .NET class library, only three of the
four objects are loaded properly - attempting to create the dispatch
for the fourth COM object causes a COM exception reporting that the
object is not registered.

I have traced the problem right down to the call to CoCreateInstance
and I have checked the registry, but I'm at a loss as to how to
proceed from here. Any ideas? Other than not being registered, what
can cause a "not registered" message?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top