Can't get Outlook Security Manager to work on Windows 7 x64 with Outlook 2010 64-bit

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

Can't get Outlook Security Manager to work on Windows 7 x64 with Outlook 2010 64-bit
 
Jean-Philippe




Posts: 21
Joined: 2009-12-15
Hi,
I'm using secman.dll and secman.dll 3.0.0.0
My Outlook Add-in is deployed through a ClickOnce project generated with the Publish Wizard on VS2008 with "Any PC".
It works fine on Windows Vista Outlook 2007 but on Windows 7 Outlook 2010 64-bit, I get the following exception:

System.InvalidCastException: 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)).
at AddinExpress.Outlook.IOutlookSecurityManager2.Check(Int32 apiType)
at AddinExpress.Outlook.SecurityManager.set_DisableOOMWarnings(Boolean value)
at TungleConnector2010.AddinModule.DisableSecurityWarnings(Boolean val)

I assume that it's because it's using secman.dll instead of secman64.dll.
I followed the steps in "HowTo: Deploy Outlook Security Manager with ClickOnce using Reg Free COM" and created the extra manifest which is now part of the deployed files.

What do I need to do to make it work for Outlook 2010 64-bit?
Posted 27 Jul, 2010 14:57:07 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hi Jean-Philippe,

We published a series of articles devoted to deploying add-ins and standalone applications that use the Outlook Security Manager on machines with 32-bit or 64-bit Outlook versions installed. The starting point is http://www.add-in-express.com/creating-addins-blog/2010/06/16/outlook-security-manager2010-deployment/.


Andrei Smolin
Add-in Express Team Leader
Posted 28 Jul, 2010 07:05:59 Top
Jean-Philippe




Posts: 21
Joined: 2009-12-15
Hi Andrei,

That's what I was looking for.

Thanks.
Posted 29 Jul, 2010 17:31:33 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hi Jean-Philippe,

Any problems, please let me know.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Jul, 2010 02:21:00 Top
Jean-Philippe




Posts: 21
Joined: 2009-12-15
Hi Andrei,
I've read the Outlook Security Manager 2010 deployment, part 1 and Outlook Security Manager 2010 deployment: bitness and regsvr32 utility, part 2 articles and created the manifest used for the Security Manager by following the steps in the HowTo: Deploy Outlook Security Manager with ClickOnce using Reg Free COM article.

Right now, I'm not sure how to proceed to make my Outlook add-in work with 32-bit and 64-bit Outlook through a single ClickOnce project (Platform target = AnyCPU).
The Outlook Security Manager 2010 deployment: Reg Free COM & ClickOnce for Outlook 2010 64-bit, part 5 article seems to be geared for standalone applications where you need to compile with the Platform target set to x86 for 32-bit application and x64 for 64-bit applications.
1) Do I need to compile and publish my Outlook add-in on a x64 platform to make this work?
2) Can I still modify the previously generated manifest by calling ManifestFix.exe through my add-in?
3) If so, can it be done in the ADXClickOnceModule while the application is being installed? Or in the AddinModule_AddinStartupComplete method?
4) Does it mean that the user has to restart Outlook after the manifest is updated to make it work?

Thanks
Posted 05 Aug, 2010 11:26:50 Top
Eugene Astafiev


Guest


Hi Jean-Philippe,

You just need to compile your add-in as AnyCPU. That is all! The article you mentioned in the forum post is for a standalone application (not Add-in Express based add-in).

Do I still need to answer your questions?
Posted 06 Aug, 2010 07:27:02 Top
Jean-Philippe




Posts: 21
Joined: 2009-12-15
I did compile it as AnyCPU and it works fine on Windows Vista Outlook 2007 but on Windows 7 Outlook 2010 64-bit, I get the following exception:

System.InvalidCastException: 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)).
at AddinExpress.Outlook.IOutlookSecurityManager2.Check(Int32 apiType)
at AddinExpress.Outlook.SecurityManager.set_DisableOOMWarnings(Boolean value)


What could be causing this exception then?
Posted 06 Aug, 2010 10:26:35 Top
Eugene Astafiev


Guest


Hi Jean-Philippe,

What version and build number of Add-in Express do you use?
Posted 06 Aug, 2010 11:32:25 Top
Jean-Philippe




Posts: 21
Joined: 2009-12-15
I use Add-in Express versions:
- AddinExpress.MSO.2005.dll 6.0.3043.2005
- adxlauncher.exe 6.0.3043.2005
- adxloader.dll and adxloader64.dll 6.0.3043.0
- secman.dll and secman64.dll 3.0.0
- SecurityManager.2005.dll 6.0.3015.2005

we just tried it on Outlook 2010 32-bit and we get the same error as in Outlook 2010 64-bit
Posted 06 Aug, 2010 13:45:52 Top
Jean-Philippe




Posts: 21
Joined: 2009-12-15
Hi Eugene,

I did a few more tests and it works fine if I manually register secman.dll or secman64.dll depending on the Outlook version.
So, I uninstalled and re-installed the Security Manager, deleted and recreated the security manager component in our project, re-deployed with the Publish wizard.

I'm still having the same issue. Any idea what would cause it to not register the dll automatically?

Thanks.
Posted 09 Aug, 2010 12:47:29 Top