摘要: 1 windows下按照标准格式编写dll,然后gcc编译加-shared,生成dll文件。2 windows linux下均可以将.o文件,使用ar.exe,链接成lib[name].a文件,.a文件用来静态链接,生成.exe文件。 编译时候 gcc -o run.exe main.c libname.a.提示:dll的c源文件也可以用来当做.a文件的源,但是倒着回去不行。3 同一个dll文件,可以有两种不同的用法:Loading Library 和 Runtime Library.Loading Library --- 使用函数时候,像正常时候一样,不过头文件中的声明变为:__decls. 阅读全文
posted @ 2011-12-06 21:27 Jack204 阅读(387) 评论(0) 推荐(0) 编辑
摘要: First we will discuss the issues and the requirements that you should consider when you develop your own DLLs.Types of DLLsWhen you load a DLL in an application, two methods of linking let you call the exported DLL functions. The two methods of linking are load-time dynamic linking and run-time dyna 阅读全文
posted @ 2011-12-06 20:56 Jack204 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 某些Zw*和Nt*函数既在ntdll.dll中导出又在ntoskrnl.exe中导出,他们有什么区别呢?我们分三部分比较:step 1: ntdll.dll中的Zw*和Nt*有什么区别?step 2: ntoskrnl.exe中的Zw*和Nt*有什么区别?step 3: ntdll.dll中的Zw*与ntoskrnl.exe中的Zw*有什么区别? ntdll.dll中的Nt*与ntoskrnl.exe中的Nt*有什么区别?在下面的讨论中我们以ZwCreateFile和NtCreateFile为例讨论前:我先贴点Kd给我们的答案Part1:kd> u Ntdll! ZwCreateFile 阅读全文
posted @ 2011-12-06 19:22 Jack204 阅读(2824) 评论(1) 推荐(0) 编辑
摘要: 1 不要纠结于细节,先整体把握,用到实际中再说 ----- 需要很高的自省能力和清醒的认识。 阅读全文
posted @ 2011-12-06 10:29 Jack204 阅读(176) 评论(0) 推荐(0) 编辑