troubleshooting Question

Calling VB COM+ component from C++ COM+ Component

Avatar of paulcurtis
paulcurtis asked on
C++Microsoft Development
6 Comments1 Solution1415 ViewsLast Modified:

Ive currently got 2 COM+ components that need to communicate with each other.

As far as i can see to make a VB COM+ component i just need to add the following to my class module.

Private oContext As ObjectContext

Implements ObjectControl

Private Sub ObjectControl_Activate()
   Set oContext = GetObjectContext()
End Sub

Private Sub ObjectControl_Deactivate()
    Set oContext = Nothing
End Sub

Private Function ObjectControl_CanBePooled() As Boolean

ObjectControl_CanBePooled = False
End Function

This seems to work fine and i can add the component using the component services module. Ive tested the componet from asp and it works fine.

Ive also created a c++ COM+ componet using the ATL wizard and adding an MTS Object. This also works fine from ASP.

The problem arises when i try and create an instance of the VB object from c++ using the CoCreateInstance function, it always returns 80004002 (E_NOINTERFACE)

Has anybody got an idea what may be going wrong or can point me to some articals/tutorials that cover the topic

Thanks in advance

Roshan Davis

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros