George Spears
Posts: 79
Joined: 2010-05-06
|
Hello,
I am testing a DLL that I have written with Add-In Express. It registers fine on my computer...
(Win 7 64 bit, with development Delphi 2010 environment.) I take the Dll over to another computer and try to register it with "regsvr32 DocAssistCom.dll" and I get an error. I run the command from the directory which has the DLL file.
The second computer is a Windows 7 64 bit computer as well. It does NOT have a development environment installed, although it has the same version of Office (Office 2010 32 bit). It is properly patched (i.e. up to date).
The 1st error is:
Runtime error 217 at 024496F8
The second error then pops up which says:
"The module "DocAssistCom.dll" failed to load.
Make sure the binary is stored at the specific path or debug it to check for problems with the binary or dependent DLL files.
A dynamic link library (DLL) initialization routine failed."
I initially tried to install this via InnoScript (which also has GDIplus.dll in it as well. Same error..
In Googling around, I found this...
Delphi executables will die with runtime error 217 when an exception was raised before SysUtils is initialized or after it is finalized. In both situations the regular exception handling is not put in place.
Any thoughts?
GS |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hello George,
Can you send me the DLL to the support email address? Please find the address in {Add-in Express installation folder}\readme.txt. And make sure your email contains a link to this topic.
Andrei Smolin
Add-in Express Team Leader |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
George,
Thank you for the DLL and the code. We reproduce the issue. Most probably, the problem occurs in the code you add to the initialization section. Note that it is recommended that you run this code in the AddinInitialize or even AddinStartupComplete event, that is when your addin starts working and not when your DLL is loaded (regsvr32 loads it, too).
Andrei Smolin
Add-in Express Team Leader |
|
George Spears
Posts: 79
Joined: 2010-05-06
|
Andrei,
That was the culprit... So when I run regsvr32, it appears that the INITIALIZATION portion of my code is run then as well as when the user is running the plugin. Is that correct? |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
George,
Exactly.
Andrei Smolin
Add-in Express Team Leader |
|