This article has been archived. It is offered "as is" and will no longer be updated.
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.
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:
Click Start, type default programs in the Start Search box, and then click Default Programs in the Programs list.
In the Default Programs dialog box, click Set program access and computer defaults.
If you are prompted for an administrator password or confirmation, type your password or click Continue.
In the Set Program Access and Computer Defaults dialog box, expand the configuration option that is selected. For example, expand Custom.
Determine whether the Windows Mail option is selected under Choose a default e-mail program.
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: