1

I am trying to access a COM dll(eObjectBroker) from my C# application. Here are things I have done.

  1. run tlbimport with eObjectBroker.dll to get the assembly. I get two assemblies, as COMSVCLIB is referenced from eObjectBroker. So I have eObjectType.dll and COMSCVLIB.dll

  2. I add reference to these two assemblies in my .Net c# project. I also add reference to adodb.dll as a function call I make returns a Recordset type object.

  3. I create the instance for a class in eObjectType and call one of its function. On this call I get the error Object variable or with Block variable not set

What have I missed? Is this the right method to access the COM dll?

1 Answer 1

3

Using VS2005 and later all you have to do is add a reference to a registered (with regsvr32.exe) COM dll, create a new instance and call it's methods. I believe you would have to instatiate the main class of the COM object though and access the other parts through that interface.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.