Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1

Desktop Windows: QMessageStore::instance() displays system message box when MAPI subsystem is not available

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • 1.1.x
    • 1.0.x
    • Messaging
    • None

    Description

      On Windows, if a MAPI subsystem has not been installed, calling QMessageStore::instance() results in a system message box being shown (see attachment). This happens when MAPIInitialize() is called from WinHelpers::MapiInitializer::MapiInitializer():

      QtMessagingd.dll!WinHelpers::MapiInitializer::MapiInitializer()  Line 1789	C++
      QtMessagingd.dll!WinHelpers::initializeMapi()  Line 1818 + 0x1f bytes	C++
      QtMessagingd.dll!MapiSession::MapiSession(QMessageStore::ErrorCode * lastError=0x004ade10)  Line 3224 + 0x5e bytes	C++
      QtMessagingd.dll!MapiSession::createSession(QMessageStore::ErrorCode * lastError=0x004ade10)  Line 3197 + 0x43 bytes	C++
      QtMessagingd.dll!QMessageStorePrivatePlatform::QMessageStorePrivatePlatform(QMessageStorePrivate * d=0x004adce0, QMessageStore * q=0x004add28)  Line 109 + 0x72 bytes	C++
      QtMessagingd.dll!QMessageStorePrivate::initialize(QMessageStore * store=0x004add28)  Line 144 + 0x2a bytes	C++
      QtMessagingd.dll!QMessageStore::instance()  Line 169	C++
      

      QtMessaging should prevent the message box from being shown, and indicate that no MAPI subsystem is available in some other way (QMessageStore::instance() could return 0 and lastError() return an appropriate error code).

      It may be possible to detect the presence of a MAPI subsystem by querying the registry:

      http://msdn.microsoft.com/en-us/library/cc815368.aspx

      Reproduced on Windows Vista and Windows 7 without Outloook installed. Not reproducible on Windows XP with Outlook installed.

      Attachments

        Activity

          People

            sanders Don Sanders (closed Nokia identity) (Inactive)
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: