QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1324|回复: 2

请教skyeye源码中的两个问题!

[复制链接]
发表于 2009-9-28 09:39:34 | 显示全部楼层 |阅读模式
(skyeye1.2.9)
1. 如何解读common / Skyeye_module.c中函数SKY_load_module()里的语句:
char **module_name;
module_name = dlsym(handler, "skyeye_module");

2. common / Skyeye_module.c中函数register_skyeye_module()里
利用了结构体:skyeye_module_t,但是利用source insight却无法找到该结构体的定义。
请问该结构体是在哪里定义的。

请达人指教,谢谢!
发表于 2009-9-28 13:18:38 | 显示全部楼层
1. http://www.opengroup.org/onlinep ... unctions/dlsym.html
dlsym返回一个动态库中的符号的地址,在你的文中应该是char*变量的地址,所有用char**

2. common/include/skyeye_module.h
16 typedef struct skyeye_module_s{
17         /*
18          * the name for module, should defined in module as an varai    ble.
19          */
20         char* module_name;
21         /*
22          * the library name that contains module
23          */
24         char* filename;
25         /*
26          * the handler for module operation.
27          */
28         void* handler;
29         /*
30          * next node of module linklist.
31          */
32         struct skyeye_module_s *next;
33 }skyeye_module_t;
回复

使用道具 举报

 楼主| 发表于 2009-9-28 14:33:47 | 显示全部楼层
非常感谢LS的热心回答。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-25 14:04 , Processed in 0.068312 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表