secman.dll Outlook Security Manager

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

secman.dll Outlook Security Manager
 
Matteo Pasqualin




Posts: 27
Joined: 2006-08-04
Hi Sergey,

I installed Outlook Security Manager, and read PDF's deployment information to correctly install my toolbar.

Well in setup project I added the folder: \Common Files\Outlook Security Manager where I placed the secman.dll, and in its register property to: vsdrfCOMSelfReg. Do I strictly need to run regsvr32 to register the .dll?

It is not clear to me wich dll to use, the wich one in my add-in express folder \Add-in Express\Outlook Security Manager .NET\Redistributables or
the wich one in my \Common Files\Outlook Security Manager

Thanx

Kind regards

Matteo Pasqualin


Posted 23 Oct, 2006 08:07:01 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Matteo.

There is no need to use the regsvr32.exe tool if you set the Register property of the secman.dll to 'vsdrfCOMSelfReg' in the setup project.

It is not clear to me wich dll to use, the wich one in my add-in express folder \Add-in Express\Outlook Security Manager .NET\Redistributables or
the wich one in my \Common Files\Outlook Security Manager

These DLLs are the same. You can use any of them.
Posted 23 Oct, 2006 10:08:00 Top
Matteo Pasqualin




Posts: 27
Joined: 2006-08-04
Hi Sergey,

I'll describe you what I did for the deploy of my project:

I added secman.dll in Otlook Security Folder under common files and set Register to vsdrfCOMSelfReg. In my pc, where I'm developing there is no problem, while in another pc in Outlook I got the following error:

HRESULT E_FAIL from call to a COM component.

Where am I wrong?

Thanx

Matteo





Posted 23 Oct, 2006 10:49:25 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Matteo.

What does the code produce the exception? Do you use the Outlook Object Model?
Posted 23 Oct, 2006 15:55:52 Top
Matteo Pasqualin




Posts: 27
Joined: 2006-08-04
Hi Sergey,

I'll have a look later in the morning and let you know.

Thanx

Matteo
Posted 24 Oct, 2006 02:37:25 Top
Matteo Pasqualin




Posts: 27
Joined: 2006-08-04
Hi Sergey,

here is my code, to retrieve Outlook contacts:

GetCotactList() method

List<OutlookContact> _olcList = new List<OutlookContact>();
Microsoft.Office.Interop.Outlook.NameSpace _oNS = null;
Microsoft.Office.Interop.Outlook.MAPIFolder _oContacts = null;
Microsoft.Office.Interop.Outlook.Items _oItems = null;

try
{

this._olSecurityManager.DisableOOMWarnings = true;
this._olSecurityManager.DisableSMAPIWarnings = true;

_oNS = this.OutlookApp.GetNamespace("mapi");
_oContacts = _oNS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
_oItems = _oContacts.Items;

foreach (Microsoft.Office.Interop.Outlook.ContactItem cItem in _oItems)
{
OutlookContact _ocl = new OutlookContact(cItem.FullName, cItem.CompanyName, cItem.Email1Address, cItem.MobileTelephoneNumber);
_olcList.Add(_ocl);
}
}
catch (Exception ex)
{
MessageBox.Show("Errore in One-etere SMS Toolbar: " + ex.Message, "One-etere SMS Toolbar Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
this._olSecurityManager.DisableOOMWarnings = false;
this._olSecurityManager.DisableSMAPIWarnings = false;
}

return _olcList;


Then at inspectorActivate event:

private void adxOutlookEvents_InspectorActivate(object sender, object inspector, string folderName)
{
Outlook.ContactItem _contact = null;

try
{
this._olSecurityManager.DisableOOMWarnings = true;
this._olSecurityManager.DisableSMAPIWarnings = true;


if (inspector != null)
{
olInsp = inspector as Outlook._Inspector;

if (olInsp != null)
{
if (olInsp.CurrentItem is Outlook.ContactItem)
{
_contact = (Outlook.ContactItem)olInsp.CurrentItem;
MobileContact = _contact.MobileTelephoneNumber;
}




}
}
}
catch (Exception ex)
{
MessageBox.Show("Errore in One-etere SMS Toolbar: " + ex.Message, "One-etere SMS Toolbar Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
this._olSecurityManager.DisableOOMWarnings = false;
this._olSecurityManager.DisableSMAPIWarnings = false;
}


Anything wrong?

Thank you

Matteo
Posted 24 Oct, 2006 02:57:21 Top
Matteo Pasqualin




Posts: 27
Joined: 2006-08-04
Hi Sergey,

have you seen the code in my last post, is it correct?

Thanks

Matteo
Posted 24 Oct, 2006 05:19:14 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Matteo.

As far as I see, you use the OOM only. So please remove the DisableSMAPIWarnings property from the code. Let me know if it doesn't help. You can send me the project if you wish. I will test it.
Posted 24 Oct, 2006 09:07:37 Top