Issue with two registered libraries

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

Issue with two registered libraries
 
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
Hi. I have registered by mistake both secman.dll and secman64.dll at the system while installing project (both files were added to the VS project with Register: vsdrfCOM)
On SecurityManager.ConnectTo(outlookApp) I get following exception:

"Unable to cast COM object of type 'System.__ComObject' to interface type 'AddinExpress.Outlook.IOutlookSecurityManager2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{66EEF543-A9AC-4A9D-AA3C-1ED148AC8FFE}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."

I uninstalled my project from the PC, removed all files and cleaned up registry. Then I've installed project from the scratch with secman.dll only (before I've verified it works perfectly). Still the problem exists. In addition to that I've also reinstalled MS Office. This also didn't help.

The components used are: Windows 7 (both x32 and x64), MS Office 2010 x32
Posted 17 Jan, 2012 08:18:43 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hi Mykhaylo,

I'm sorry, I wasn't able to reproduce the issue on my PC.
Could you please try to set the Register property of secman.dll and secman64.dll to vsdrfCOMSelfReg. Did it help?

You can find the detailed instructions on how to register secmans using self-registration in part 3 of the "Outlook Security Manager 2010 deployment" series on our technical blog, here is the link:
http://www.add-in-express.com/creating-addins-blog/2010/05/07/deployment-visual-studio-setup-projects/
Posted 17 Jan, 2012 09:11:45 Top
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
After I set Register:vsdrfCOMSelfReg it gives me error while trying to register secman64.dll but when I click "Continue" installation is finished and application works fine.

I tried to modify the setup project according to the article you've provided. It works correct at least for x32 Windows 7 and Office 2010. I didn't check yet for Office 2010 x64. Thank you.

Still question remains what can I do with error I've reported. Reinstallation of my application and Office didn't help. I wouldn't want to reinstall whole Windows especially at customer side.
Posted 17 Jan, 2012 11:16:48 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hi Mykhaylo,

After I set Register:vsdrfCOMSelfReg it gives me error while trying to register secman64.dll but when I click "Continue" installation is finished and application works fine.
Did you register secman64.dll on 32-bit Windows 7 when got this error?

I tried to modify the setup project according to the article you've provided. It works correct at least for x32 Windows 7 and Office 2010. I didn't check yet for Office 2010 x64. Thank you.
Please check and let me know about your results on the PC with Office 2010 64-bit.

Still question remains what can I do with error I've reported. Reinstallation of my application and Office didn't help. I wouldn't want to reinstall whole Windows especially at customer side.
Could you please try to check secman registration in the registry after uninstalling your application? The following registry keys exist if secman.dll and secman64.dll are registered:
HKEY_CLASSES_ROOT\secman.OutlookSecurityManager
HKEY_CLASSES_ROOT\secman64.OutlookSecurityManager64

Do these registry keys exist on the customer PC?
Also, please try to register secman.dll (or secman64.dll if it's Outlook 64-bit) manually using the following command line:regsvr32 "path to secman.dll". Did it get registered?
Posted 18 Jan, 2012 04:20:13 Top
Mykhaylo Khodorev




Posts: 16
Joined: 2011-12-27
That's strange but after I've modified setup project according to article you've provided and reinstalled it twice the problem has gone.
I still can reproduce the problem with installing wrong setup package. But since there is a solution I would consider the issue closed. If you want to play with it further I can send you problematic setup package to try to reproduce.
Posted 18 Jan, 2012 08:04:54 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Good news, Mykhaylo!
Thank you for letting me know and good luck with your project!
Posted 18 Jan, 2012 08:28:45 Top