IOutlookSecurityManager.Check

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

IOutlookSecurityManager.Check
Error when call disableOOMwarnings 
Derek Swoboda




Posts: 5
Joined: 2006-09-26
Hello,

One of our users received an error at the call to IOutlookSecurityManager.check() when attempting to change the state of the oomwarnings. The COM error result is very generic, "HRESULT E_FAIL has been returned from a call to a COM component.

Any idea why this error might have occurred? I have not seen this error before. We are simply reading values from an Outlook mail item, so we are not doing anything complex.

Any insight would be appreciated.

Derek
Posted 26 Sep, 2006 17:06:57 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Derek.

Do you use the OSM component in a C++ application?
Posted 27 Sep, 2006 11:44:56 Top
Derek Swoboda




Posts: 5
Joined: 2006-09-26
Sorry that I didn't provide the system information.

The application is a windows app written in C#, using Visual Studio 2005. Our users are running Windows XP for an OS. Some have Office XP and others have Office 2003. I believe the user that received this error is running Office 2003.

Thank you,
Derek
Posted 27 Sep, 2006 11:49:29 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Derek, this error can occur if the secman.dll is not registered on the PC.
Do you register it on the client's machine? If yes, can I look at the code of the application?
Posted 27 Sep, 2006 12:25:15 Top
Derek Swoboda




Posts: 5
Joined: 2006-09-26
This secman.dll is registered on the client. I spoke with the user and she is not receiving the error today. The application is very large, so unfortunately I cannot send it. Here is a code snippet for how we are using the security manager to access the outlook mail item properties.

We have a global instance of the Outlook application, which is what the security manager instance connects to.

get
{
SecurityManager outlookSecurityManager = new SecurityManager();
outlookSecurityManager.ConnectTo(Outlook);

try
{
outlookSecurityManager.DisableOOMWarnings = true;

return this.MailItm.SenderName;
}
finally
{
outlookSecurityManager.DisableOOMWarnings = false;

outlookSecurityManager.Dispose();
outlookSecurityManager = null;
}
}
Posted 27 Sep, 2006 12:32:45 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Derek, try to connect to Outlook once (just declare the outlookSecurityManager field globally in the application) and then it will only enough to disable/enable the security warnings in the code above.
Posted 27 Sep, 2006 12:44:37 Top
Derek Swoboda




Posts: 5
Joined: 2006-09-26
Sergey,

That was our initial design, but our users were complaining that Outlook was slow. We thought that since the connection between the Security Manager and Outlook was open for the life of the app, that it may have been causing the slow downs.

Is that your recommended design for dealing with the Security Manager? Have you or others experienced slow downs with this design?

Thank you.
Posted 28 Sep, 2006 09:25:24 Top
Matt Driver


Matt


Posts: 152
Joined: 2004-08-17
I have 200+ users with no slow down using this aproach. Is their lots of code on email selection chance that could be slowing you down etc.

Matt
Posted 28 Sep, 2006 09:29:44 Top
Derek Swoboda




Posts: 5
Joined: 2006-09-26
I will try that approach. Thanks.
Posted 28 Sep, 2006 10:37:46 Top