src/native/addrbook/msoutlook/MAPIBitness.cxx
/**
 * Returns the Outlook version installed.
 *
 * @return 2013 for "Outlook 2013", 2010 for "Outlook 2010", 2007 for "Outlook
 * 2007" or 2003 for "Outlook 2003". -1 otherwise.
 */
Returns the Outlook version installed.
Returns the Outlook version installed .
int MAPIBitness_getOutlookVersion(void)
{
    int outlookVersions[] = {
        2016, 
        2013, 
        2010, 
        2007, 
        2003 
    };
    DWORD pathLength = 0;
    for(int i = 0; i < nbOutlookRegister; ++i)
    {
        if(MsiProvideQualifiedComponent(
                    outlookRegister[i],
                    TEXT("outlook.x64.exe"),
                    (DWORD) INSTALLMODE_DEFAULT,
                    NULL,
                    &pathLength)
                == ERROR_SUCCESS)
        {
            return outlookVersions[i];
        }
        else if(MsiProvideQualifiedComponent(
                    outlookRegister[i],
                    TEXT("outlook.exe"),
                    (DWORD) INSTALLMODE_DEFAULT,
                    NULL,
                    &pathLength)
                == ERROR_SUCCESS)
        {
            return outlookVersions[i];
        }
    }
    return -1;
}
int MAPIBitness_getOutlookVersion ( void ) { int outlookVersions [ ] = { 2016 , 2013 , 2010 , 2007 , 2003 } ; DWORD pathLength = 0 ; for ( int i = 0 ; i < nbOutlookRegister ; ++ i ) { if ( MsiProvideQualifiedComponent ( outlookRegister [ i ] , TEXT ( " " ) , ( DWORD ) INSTALLMODE_DEFAULT , NULL , & pathLength ) == ERROR_SUCCESS ) { return outlookVersions [ i ] ; } else if ( MsiProvideQualifiedComponent ( outlookRegister [ i ] , TEXT ( " " ) , ( DWORD ) INSTALLMODE_DEFAULT , NULL , & pathLength ) == ERROR_SUCCESS ) { return outlookVersions [ i ] ; } } return -1 ; }
Returns the Outlook version installed.
Returns the Outlook version installed .
// Outlook 2016 // Outlook 2013 // Outlook 2010 // Outlook 2007 // Outlook 2003