Deploying the add-in

Add-in Express™ Support Service
That's what is more important than anything else

Deploying the add-in
Call to DllRegisterServer failed 
Michael Hovdan




Posts: 37
Joined: 2010-06-26
I can't find any solution to this problem. I can register the add-in from the Delphi XE8 IDE, but I can't deploy it to others. The Inno Script installer unpacks the contents correctly, but the COM will not load.

I get this error message when I try to use RegSvr32 to install my excel add-in:

User added an image

"The module "C:\Program Files (x86)\ExcSimBasic\ExcSimBasicPrj.dll" was loaded but the call to DllRegisterServer failed with error code 0x80004005."

Any ideas?
Posted 15 Aug, 2016 07:35:53 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hello Michael,

0x80004005 is about permissions. I suppose you register a per-machine add-in. If so, you need to do this from an elevated command prompt.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Aug, 2016 08:02:15 Top
Michael Hovdan




Posts: 37
Joined: 2010-06-26
In elevated mode I get almost the same error (in slightly different words):
User added an image
Posted 15 Aug, 2016 08:11:30 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Do you build the DLL for the 32bit or 64bit platform? Since it is deployed to Program Files (x86), it should be a 32bit DLL. Is this the case?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Aug, 2016 08:15:38 Top
Michael Hovdan




Posts: 37
Joined: 2010-06-26
Yes, it is for 32bit but have also generated a 64bit version in the same iss installer:


Source: "ExcSimBasicPrj.dll";          DestDir: "{app}"; Flags: regserver; Check: not IsOffice64
Source: "Win64ExcSimBasicPrj.dll";    DestDir: "{app}"; Flags: regserver; Check: IsOffice64


When using the command prompt (regsvr32.exe) I have tried to register the 32bit version since that is what I am using. The strange thing is that it registers nicely from the Delphi IDE.
Posted 15 Aug, 2016 09:08:40 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Michael,

What parameters do you pass to regsvr32.exe?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Aug, 2016 09:33:42 Top
Michael Hovdan




Posts: 37
Joined: 2010-06-26
%systemroot%\System32\regsvr32.exe /i "C:\Program Files (x86)\ExcSimBasic\ExcSimBasicPrj.dll"
Posted 15 Aug, 2016 09:39:03 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
You need to omit the /i switch.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Aug, 2016 09:47:34 Top
Michael Hovdan




Posts: 37
Joined: 2010-06-26
Great. That solved the error message. But the COM still doesn't load in Excel.
Posted 15 Aug, 2016 10:05:10 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Hello Michael,

Try to debug how the add-in module is constructed and how it processes the AddinInitialize, AddinStartUpComplete, OnRibbonBeforeCreate, and OnRibbonBeforeLoad event.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Aug, 2016 05:01:38 Top