hello,

Porting a win32 mapi application to openchange, I have the need to
open many message stores within the same session. Currently, when I
open and close a 2nd mailbox, I start to get strange failures on the
operation performed on the first one. I.E. in the following code the
last libmapi call (the creation of the second message) fails.

        mapi_object_t store;
        char* prof =0;
        mapi_session* data=0;
        mapi_object_store_t* str;
        mapi_object_t inbox;
        mapi_object_t sto2;
        mapi_object_t msg2, msg1;

        GetDefaultProfile(&prof);
        MapiLogonEx(&data, prof, 0);

        OpenUserMailbox(data, 0, &store);

        str = (mapi_object_store_t*) store.private_data;
        OpenFolder(&store, str->fid_inbox, &inbox);
        CreateMessage(&inbox, &msg1);

        OpenUserMailbox(data, data->profile->username, &sto2);
        mapi_object_release(&sto2);

        // this operartion fails, even if all the previous ones has been 
successful
        CreateMessage(&inbox, &msg2);

the CreateMessage() call return MAPI_E_CALL_FAILED and the nt status
code reported internally is 0xC0000023 (NT_STATUS_BUFFER_TOO_SMALL) .
I'm I doing something wrong ?!? It's allowed to open multiple time the
same message store ?!?

Thanks in advance for any reply,

cheers,

Paolo
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to