my knowledge in c++ limited i'm trying use sample code create mapi profile programmatically:
https://support.microsoft.com/en-us/kb/306962
i compiled code sample features not enough me adds: profilename, mailboxname , server,
i want add rpc proxy server(connect on http) settings window:
as see in profiler.cpp code mailboxname , server in portion:
// first, server name zeromemory(&rgval[1], sizeof(spropvalue) ); rgval[1].ulproptag = pr_profile_unresolved_server; rgval[1].value.lpsza = szserver; // next, mailbox name zeromemory(&rgval[0], sizeof(spropvalue) ); rgval[0].ulproptag = pr_profile_unresolved_name; rgval[0].value.lpsza = szmailbox;
and tags/properties located in edkmdb.h file, tried add lines:
#define pr_profile_rpc_proxy_server_flags prop_tag( pt_long, pidprofilemin,0x2f) #define pr_profile_rpc_proxy_server_auth_package (pt_long, pidprofilemin,0x1) #define pr_profile_rpc_proxy_server prop_tag(pt_unicode, 0x6622001f)
extend rgval
array
spropvalue rgval[5]; // property structure hold values want set
then added lines profiler.cpp
zeromemory(&rgval[2], sizeof(spropvalue)); rgval[2].ulproptag = pr_profile_rpc_proxy_server; rgval[2].value.lpsza = "mail.domain.com"; zeromemory(&rgval[3], sizeof(spropvalue)); rgval[3].ulproptag = pr_profile_rpc_proxy_server_flags; rgval[3].value.ul = 0x1; zeromemory(&rgval[4], sizeof(spropvalue)); rgval[4].ulproptag = pr_profile_rpc_proxy_server_auth_package; rgval[4].value.ul = 0x2;
and change 'number of properties 5' here:
if (failed(hres = lpsvcadmin->configuremsgservice( (lpmapiuid)lpsvcrows->arow->lpprops[isvcuid].value.bin.lpb, // entry id of service configure null, // handle parent window 0, // flags 5, // number of properties setting rgval)))
but has no effect, proxy setting not configured in new profile,
what i'm doing wrong or missing?
i'm appreciating help, thanks
if need create rpc-over-http connection, there quite few properties need set. see http://blogs.msdn.com/b/dvespa/archive/2014/01/17/how-create-outlook-profile-office-365.aspx
things lot easier in outlook 2016 - need supply smtp address: see http://blogs.msdn.com/b/dvespa/archive/2015/10/29/how-to-configure-an-outlook-2016-profile-using-mfcmapi.aspx
Comments
Post a Comment