OL2007: TablePtr->ColumnsPtr->Add() triggering Outlook Security Pr

A

AMcMillan

On some systems (not all, and I am not sure yet what makes them different)
every time I add a column to the columns collection, it triggers the Outlook
Security Prompt.

Here is the code I am using...nothing fancy:
----------------------------------------------
pColumns = pTable->GetColumns();
pColumns->RemoveAll();
pColumns->Add(L"EntryID");
pColumns->Add(L"http://schemas.microsoft.com/mapi/proptag/0x66700102"); //
PR_LONGTERM_ENTRYID_FROM_TABLE (0x66700102)
pColumns->Add(L"Subject");
pColumns->Add(L"LastModificationTime");
pColumns->Add(L"MessageClass");
pTable->MoveToStart();
----------------------------------------------

Any idea why this is happening only on some systems, and is there any way
for me to make it stop prompting them?

Thanks,
Andrew
 
K

Ken Slovak - [MVP - Outlook]

Is this an Outlook addin or a standalone program? What version of Outlook?

If it's an addin it should be trusted, assuming you are deriving all your
Outlook objects from the Application object passed to you in OnConnection()
or Startup().

If it's a standalone program then it's only trusted if the user has an
up-to-date AV running. In those cases you will get the prompts unless you
use something not under the Outlook object model guard such as Redemption
(www.dimastr.com/redemption) or Extended MAPI.
 
A

AMcMillan

It is a stand alone program, and the problem is occuring in Outlook 2007
(12.0.6316.5000) SP1 MSO (12.0.6320.5000)...but not on a different computer
with the exact same version.

The AV explains it, I think. This is on a testlab computer that does not
have any AV on it.
 
K

Ken Slovak - [MVP - Outlook]

Without active AV and with a standalone program you will be subject to all
the restrictions of the Outlook object model guard.
 
D

Dmitry Streblechenko

Are you sure the prompt comes from that particular code snippet? Nothign
there is blocked by the security patch.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
A

AMcMillan

I am positive it is happening on the pColumns->Add() calls. I used the good
old fashion dialog box debugging to figure it out. Also, when it pops up, if
you just click the button to allow it, then the dialog will popup 5
times...one for each Add() call.

I installed AntiVirus onto the system, and the prompt stopped showing up.
 
Top