On Tue, 2008-12-30 at 13:31 +0300, Евгений Степанищев wrote: > Hello! > > Please help, I don't know how to solve this problem. > > May be I don't understand how to work OpenUserMailbox function. In > documentation: > > _PUBLIC_ enum MAPISTATUS OpenUserMailbox ( struct > mapi_session * session, > const char * username, > mapi_object_t * obj_store ) > > > I write tiny Python (ctypes) binding and try to get another user > calendar. I call: > > session = pointer(mapi_session()) > store = mapi_object_t() > > MapiLogonEx(pointer(session), login, password) > OpenUserMailbox(session, user, pointer(store)) > > fid = c_uint64() > > GetDefaultFolder(pointer(store), pointer(fid), olFolderCalendar) <- > returns error (-1) > > > I look at source and found error path: > > GetDefaultFolder <- > CacheDefaultFolders (because folder id > 6) <- > GetReceiveFolder <- > status = emsmdb_transaction(session->emsmdb->ctx, > mapi_request, &mapi_response); > MAPI_RETVAL_IF(!NT_STATUS_IS_OK(status), > MAPI_E_CALL_FAILED, mem_ctx); > retval = mapi_response->mapi_repl->error_code; > MAPI_RETVAL_IF(retval, retval, mem_ctx); > > seems like retval here = -1 > > Is my code correct?
Hi Evgeny, I would suggest you to check for OpenUserMailbox return value. Sounds to me like you don't have the permissions to browse this user calendar using the login/password you have specified. You should also set global_mapi_ctx->dump_data to true and debuglevel to 10, this would give you some enhanced network trace associated to your code and make debug/help much easier for me to provide. -- Julien Kerihuel [email protected] OpenChange Project Manager GPG Fingerprint: 0B55 783D A781 6329 108A B609 7EF6 FE11 A35F 1F79
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devel mailing list [email protected] http://mailman.openchange.org/listinfo/devel
