NotesInitExtended报错error:1543
参照notesapi中dbback用例写的代码,在运行时报错。
错误信息:
error = NotesInitExtended (argc, argv);
166 if (error)
(gdb) n
168 fprintf(stderr, "NotesInitExtended failed.\n");
(gdb) p error
$1 = 1543
--"Encountered zero length record."
Linux环境:Redhat 6.1
官方函数说明:
NotesInitExtended uses argv[0] to attempt to locate the Domino or Notes executable directory. If the Domino or Notes executable directory is not in argv[0], then NotesInitExtended will use the path to determine the Domino or Notes executable directory.
用例中argv[0]就是进程本身的绝对路径。我尝试给argv[0]赋值为1、notes数据目录 2、notes安装目录
3、notes的bin目录都是1543错误。同样代码在windows下NotesInitExtended初始化成功。
现在我怀疑是不是需要设置某个环境变量?
请大侠们帮忙提点, 不胜感激!