Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

COM+ Get Dll`s event

Friends,

I created a DLL (conexao.dll) and install/register in my server. There is a class (ConBD) with 2 event in this DLL and I used raisevent to return values to application alone (client).

I Created a new application in the COM+ and install new component in my server.

My application name in the COM+ is cecafe and my component is Conexao.ConBD.

So, In the client's application I used this to create an instance of dll.

Dim Obj as Object
Set Obj = CreateObject ("Conexao.ConBD","SERVER COMPANY")

I can't use the WithEvents in variavel declaration, so, I can't access the events of this dll.

So, friend...what's wrong? How can I access theses events?

Best Wishes,

Eduardo Heron Santos
[802 byte] By [Eduardo Heron] at [2007-11-11 7:46:13]
# 1 Re: COM+ Get Dll`s event
You may not use connection points (WithEvents) with COM+ components. If you want to use WithEvents, do not register the component in COM+; set a reference to the component in your application and declare a strongly-typed instance of the object in your code, e.g., Dim objConexao As Conexao.ConDB.

COM+ has its own events architecture, known as loosely-coupled events. For more information, see http://informit.staging.informit.mttech.com/articles/printerfriendly.asp?p=19629
Phil Weber at 2007-11-11 17:26:26 >