Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access a .Net COM object hosted in a COM+ Server in .Net?

Status
Not open for further replies.

huckfinn19

Programmer
May 16, 2003
90
0
0
CA
Hi,

I have a COM component written in .Net and hosted in a COM+ server application so that only 1 instance of the component will exist on a box at a given time. Multiple different applications will be accessing the COM component: Matlab, VB Script, .Net application, etc...

When the COM component is instantiated from VB Script or Matlab, I can see the COM+ server starting properly and can verify that only 1 instance of my object is created.

My problem arises when the COM component consumer is a .Net application. Basically, it seems .Net always resolves the location of the DLL and since it is a .Net DLL, always instantiate the object directly, skipping the COM+ mechanism. It seems obvious why .Net behaves that way to get rid of COM overhead, but this is causing problems in my design since I want only 1 instance of my COM Component to exist on a box at one time.

So the question is how can I instantiate a .Net based COM component hosted in a COM+ server application from a .Net application by using the COM+ mechanism?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top