The MAPIFindNext function returns the MAPI_E_FAILURE(2) error when a program that is based on Simple MAPI (SMAPI) calls the function in Windows Vista

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
When a program that is based on Simple MAPI (SMAPI) calls the MAPIFindNext function in Windows Vista, the function returns the MAPI_E_FAILURE(2) error. Therefore, you cannot use the MAPIFindNext function in the Simple MAPI program.
Cause
This problem occurs if Windows Mail is configured as the default e-mail program in Windows Vista.

To determine whether Windows Mail is configured as the default e-mail program in Windows Vista, follow these steps:
  1. Click StartStart button, type default programs in the Start Search box, and then click Default Programs in the Programs list.
  2. In the Default Programs dialog box, click Set program access and computer defaults.

     User Account Control permission If you are prompted for an administrator password or confirmation, type your password or click Continue.
  3. In the Set Program Access and Computer Defaults dialog box, expand the configuration option that is selected. For example, expand Custom.
  4. Determine whether the Windows Mail option is selected under Choose a default e-mail program.
Workaround
To work around this problem, use the Windows Mail API in the program. For more information about the Windows Mail API, visit the following Web site:
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Properties

Article ID: 930279 - Last Review: 01/16/2015 09:24:18 - Revision: 2.0

  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Ultimate
  • kbnosurvey kbarchive kbbug kbapi kbenv kbui kberrmsg kbmm kbnetwork kbsetup kbwindowsupdate kbexpertiseadvanced kbexpertiseinter kbtshoot KB930279
Feedback