What is the Outlook version? When is that code called?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
"Vinayakc" <vinayakchitre[ at ]gmail.com> wrote in message news:1144218953.744210.166570[ at ]g10g2000cwb.googlegroups.com...
[Quoted Text] > Hi all, > > My add-in requires handle for Outlook main window. For that I have > written one small piece of code as following. > > //*************************************************** > CComPtr<IOleWindow> olOutlookWindow; > result = m_pHostApp->ActiveExplorer(&pActiveExplorer); > RET_IF_ERROR(L"ActiveExplorer", result) > > result = pActiveExplorer->QueryInterface(&olOutlookWindow); > RET_IF_ERROR(L"GetWindowHandle",result); > > result = olOutlookWindow->GetWindow(&g_hOutlookWindow); > RET_IF_ERROR(L"GetWindowHandle",result); > //**************************************************** > > On my client's machine QueryInterface is failing with return code as > E_NOINTERFACE. > I don't know the configuration on client side. So it it is very > difficult to trace this for me. > Can someone please tell me what can be the possible causes of this > problem and what is solution for this? > > Thanks and regards, > Vinayakc >
|