views:

210

answers:

1

I have a VB6 COM dll that I've wrapped in COM+ (component services). For the life of me I can't figure out how to get the reference to the service imported/working in C#. Google isn't helping me at all. Nothing shows up in the add a reference dialog box that is even close to the name of my service. Does anyone have any code/tips for how to do this? Thanks.

+1  A: 

If you've registered the dll it should show up in the COM tab, you could also try and browse right to the dll or tlb, and add the reference that way.

Edit

Nope it won't, it will get redirected to the service. It's the same as if you created the object using CreateObject("MyCom.MyClass") in vb, the SCM (Ihope thats what it is called been a long time since I dealt with COM+) will activiate the component within the COM+ service if its a service application or within your process if its a library.

JoshBerke
won't that access the COM object directly, and not through the COM+ services?
Steve
thank you, that was exactly what I needed. The Component services were very poorly explained everywhere I looked
Steve
My pleasure, they can be tricky at times. Lots of gotchas
JoshBerke