MAPIFindNext return 16 but there are emails in Windows Mail
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: MAPIFindNext return 16 but there are emails in Windows Mail

  1. #1
    Join Date
    Oct 2007
    Posts
    21

    MAPIFindNext return 16 but there are emails in Windows Mail

    Hi everybody,

    I builted an aplication that read emails from windows Mail. The MAPILogon returns 0, but when a try to send a MAPIFindNext before to use MAPIReadMail the return code is 16. There are emails unreaded in windows mail and i thing that the return code must be 0 for MAPIFindNext.

    The windows mail is the default email manager.

    I created an email account as "softools" and conected it to samuel.softools@ig.com.br

    The MAPI in WIN.INI is 1 and set to MAPI32.DLL. I Loaded the MAPI31.DLL correctly with loadlibrary().

    I thing is everything is fine but nothing is heppening

    Some can help me ?

    Sorry by poor english !

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,604

    Re: MAPIFindNext return 16 but there are emails in Windows Mail

    What do these return value 0 and 16 mean?
    According to my "old" MSDN:
    Return Values

    MAPI_E_FAILURE
    One or more unspecified errors occurred while matching the message type. The call failed before message type matching could take place.
    MAPI_E_INSUFFICIENT_MEMORY
    There was insufficient memory to proceed. No message was found.
    MAPI_E_INVALID_MESSAGE
    An invalid message identifier was passed in the lpszSeedMessageID parameter. No message was found.
    MAPI_E_INVALID_SESSION
    An invalid session handle was passed in the lhSession parameter. No message was found.
    MAPI_E_NO_MESSAGES
    A matching message could not be found.
    SUCCESS_SUCCESS
    The call succeeded and the message identifier was returned.
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2007
    Posts
    21

    Re: MAPIFindNext return 16 but there are emails in Windows Mail

    0 = SUCCESS_SUCCESS

    16 = MAPI_E_NO_MESSAGES

    Iīm allways receive a return code 16, but the return code is not correct. There are messages unreaded in windows mail inbox, so, will must be 0.

    I donīt know i cant read the unreaded emails in windows mail.

    Two days ago i need to reinstall the windows vista to factory configuration. The partitions was recreated and the windows vista reinstalled. after this i installed the office 2003.

    The Program was functioning correctly but now it stopped to function.

    The email was readed normaly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center