我需要使用注册新Lotus Notes用户的Notes C API将客户端编程到Domino Server。使用REGNewUser(参见http://www-12.lotus.com/ldd/doc/domino_notes/8.5.3/api853ref.nsf/ef2467c10609eaa8852561cc0067a76f/0326bfa2438ebe9985256678006a6ff2?OpenDocument&Highlight=0,REGNew *)它看起来很有希望,除了我需要让用户的邮件文件从指定的邮件服务器复制到邮件服务器的集群伙伴。有旗帜
fREGExtMailReplicasUsingAdminp
并且文档非常简短:
“通过管理流程创建邮件副本”
如果我谷歌谷歌我得到4(!)点击。 如何指定创建邮件文件副本的位置?有没有人有关于这个标志实际上在做什么的更多信息?
由于 启
答案 0 :(得分:0)
在Notes C API参考中进行了3周的研究后,我发现: 在REGNewPerson中有2个结构REG_MAIL_INFO_EXT和REG_PERSON_INFO,如果在REG_PERSON_INFO中设置上述标志,则必须在REG_MAIL_INFO_EXT中提供副本服务器列表,如下所示:
REG_MAIL_INFO_EXT mail_info, *pmail_info;
REG_PERSON_INFO person_info, *pperson_info;
...
pmail_info = &mail_info;
pperson_info = &person_info;
...
// pmail_info->pMailForwardAddress = NULL; // brauchen wir nicht.
pmail_info->pMailServerName = mailserver;
pmail_info->pMailTemplateName = mailfiletemplate;
// do the list crap for replica servers
if (error = ListAllocate (0, 0, FALSE, &hReplicaServers, &pList, &list_size)) {
goto __error;
}
OSUnlock (hReplicaServers);
pList = NULL;
if (error = ListAddEntry (hReplicaServers, // handle to list
FALSE, // do not include data type
&list_size, // pass list size in memory
0, // index to add
replicationserver, // value to add
(WORD) strlen(replicationserver))) // size of value to add
{
goto __error;
}
// now we can add the handle to the structure
pmail_info->hReplicaServers = hReplicaServers;
...
pperson_info->MailInfo = pmail_info;
...
pperson_info->Flags = fREGCreateIDFileNow | fREGCreateAddrBookEntry | fREGCreateMailFileUsingAdminp;
pperson_info->FlagsExt = fREGExtEnforceUniqueShortName | fREGExtMailReplicasUsingAdminp;
就我而言,这就是诀窍。