ram
ram

Reputation:

Creating ActiveX dll in vb6

We are currently working on creating an ActiveX dll for migrating our existing xlt template file. For this we tried creating an ActiveX dll in VB6. We were successful in creating the Add-Ins but we are facing a serious issue.

The AddinInstance_OnConnection is being called indefinitely leading to creation of multiple excel objects. As this is the primary method that gets called when the host application creates the Add-Ins we are not able to stop this execution.

Can anyone please provide us some suggestion for the above problem.

Thanks in advance

ram

Upvotes: 2

Views: 1442

Answers (1)

Patrizio Rullo
Patrizio Rullo

Reputation: 471

I had a similar problem one time and I resolved it creating an ActiveX EXE that it's the caller of the main application in the Active DLL.

You keep a reference in the EXE to the main application in the DLL and you handle it like:

If IsNull(ReferenceToDll) Then
    CreateDllApplication
Endif

RunDllApplication

Upvotes: 1

Related Questions