View Single Post
  #1  
Old June 7th 06, 11:34 AM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.platformsdk.mapi,microsoft.public.platformsdk.messaging
news.microsoft.com
external usenet poster
 
Posts: 1
Default Outlook 2007: Problem with SinkEvents on first explorer

Hi,

I'm having trouble sinking events on the initial Outlook explorer with the OL 2007 Beta.

I get an exception (access violation) on this queryinterface call in my explorer event handler when I try to sink events.

hr = m_pExplorer-QueryInterface(IID_IConnectionPointContainer, (void **)&pCPC);

m_pExplorer is an Outlook::_ExplorerPtr

Here's the code in context .....
void CExplorerHandler::SinkEvents()
{
HRESULT hr;

IConnectionPointContainer* pCPC;
hr = m_pExplorer-QueryInterface(IID_IConnectionPointContainer, (void **)&pCPC);
if (SUCCEEDED(hr))
{
hr = pCPC-FindConnectionPoint(__uuidof(Outlook::ExplorerEve nts), &m_pConnection);
if (SUCCEEDED(hr))
{
AddRef();

hr = m_pConnection-Advise(static_castIDispatch*(this), &m_dwCookie);
}

----- SNIP ----
Now this used to work just fine on OL2003 (and OLXP and OL2000) and also works on any additional explorers opened in Outlook 2007.

It just seems to be the 1st one that causes the problem.

Any ideas ? ....... A security issue ? A Microsoft bug ? Something about the timing of the Outlook startup has changed ?

Regards,

Scott Quinn


Ads