tags:

views:

361

answers:

2

Is there a way that I could programatically detect if Microsoft Outlook (any version of it) is installed on the PC. I have to do it in unmanaged c++.

A: 

Outlook exposes a COM interface, just check for that interface?

MSalters
Could you provide some example?
Darius Kucinskas
A: 

MSalters, do you mean something like the following code:

::CoInitialize(NULL);
_ApplicationPtr pApp;
HRESULT hr;
hr = pApp.CreateInstance(__uuidof(Outlook::Application));
if ((pApp == NULL) || FAILED(hr))
{
 return false;
}
Darius Kucinskas