新记事本

NN New Notepad

IT博客 联系 聚合 管理
  6 Posts :: 3 Stories :: 3 Comments :: 0 Trackbacks

nn40增加了扩展自己模块的功能,例如:
[hello.c]
#include <windows.h>

typedef void (*NN_GETINI)(char *sbuf, char *item, char *key, char *ostr);
typedef void (*NN_PRINT)(char *buf);

NN_GETINI nn_getini;
NN_PRINT nn_print;
static char *g_ini;

__declspec(dllexport)void nn_interface(char *ini, NN_GETINI p_getini, NN_PRINT p_print)
{
 char buf[128];
 char buf1[256];
 
 g_ini = ini;
 nn_getini = p_getini;
 nn_print = p_print;
 
 nn_getini(ini, "hello", "str", buf);
 sprintf(buf1, "\n%s OK!\n", buf);
 nn_print(buf1);
 
 return;
}

[Makefile]
all: hello.dll

hello.dll: hello.c
 cl /MT hello.c /link /dll /out:hello.dll /machine:x86
 
clean:
 del *.obj
 del *.exp
 del *.dll
 del *.lib
 
[节点内容]
[nn]
module=d:\c\win32\csplitter\modules\hello\hello.dll

[hello]
str=460007014475732

用鼠标选中节点内容后,点击工具条上的“执行”按钮,这时,就会按照你的要求在节点内容的下面,产生字符串
460007014475732 OK!

posted on 2007-10-08 10:30 李春圃 阅读(174) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。