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


Guest


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: 18821
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.


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


Guest


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: 18821
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?


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


Guest


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: 18821
Joined: 2006-05-11
Michael,

What parameters do you pass to regsvr32.exe?


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


Guest


%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: 18821
Joined: 2006-05-11
You need to omit the /i switch.


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


Guest


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: 18821
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.


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