simplever2.c

来自「通过Notes C API访问Notes数据库」· C语言 代码 · 共 47 行

C
47
字号
/*	Simple program to find the data directory using the Lotus C API for Notes/Domino
	
	Using NotesMain() 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>


/* Functions defined in this file */

void APIErrHandler (STATUS);


/* The NotesMain() function */

STATUS LNPUBLIC NotesMain(int argc, char far *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 */


	/* 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);

	return (NOERROR); 
}

⌨️ 快捷键说明

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