⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple.c

📁 通过Notes C API访问Notes数据库
💻 C
字号:
/*	Simple program to find the data directory using the Lotus C API for Notes/Domino
	
	Using main() as the entry point

*/

/* Include header files that we will need from the C library */

#include <stdio.h>
#include <string.h>


/* Include header files that we will need from the Lotus C API for Notes/Domino */

#include <global.h>
#include <osfile.h>


/* The main() function */

int main(int argc, char *argv[])
{

	/* Local variables */
	char        DataDir[256];		/* the data directory for Notes*/
	STATUS   error = NOERROR;       /* return type for most Lotus C 
									API functions for Notes/Domino - defined in global.h */
	WORD	wlength;				/* unsigned integer - defined in global.h */

	/* Initialize Notes/Domino runtime */

	if (error = NotesInitExtended (argc, argv))
	{
     printf("\n Unable to initialize Notes.\n");
     return (1);
	}

	/* Get the full path of the data directory which is returned by the OSGetDataDirectory() function in the text buffer 
	whose address is passed in as the arguement. The function return value is the length of the buffer returned */

	wlength = OSGetDataDirectory(DataDir);

	/* Print the data directory path */
	if (wlength > 0)
		printf("\n The data directory is %s", DataDir);

	/* Done - shutdown the Notes/Domino runtime and return from the function */

	NotesTerm();
	return (0); 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -