阅读:1323回复:6
如何在DRIVER中构建Win32 Service?
Do you know how to build a Win32 Service in a device
driver(Win95 or WinNT4)? 请问有哪位高手知道,怎样在Win95 或WinNT4 的设备驱动程序 中构建一个Win32 Service? Thank you ! |
|
|
沙发#
发布于:2002-05-17 10:58
我尝试在内核驱动程序中通过包含“winbase.h”头文件,在.mak文件中加入库文件“kern32.lib”,编译连接都没有问题,而且能够生成.sys文件。
|
|
板凳#
发布于:2002-05-17 18:12
生成的.sys能用吗?值得怀疑,再,你包含了头文件和连接了库,可是你调用了里面的函数吗?
|
|
地板#
发布于:2002-05-17 18:22
当然不行,只要调用了里面的函数,加载器无法或说不会处理引入函数,从而拒绝加载驱动。这与应用中引入内核函数一样不能加载一样。
|
|
地下室#
发布于:2002-05-20 09:34
fracker,你好!
我们知道WinNT4 的device driver 分为DLL(User mode)和 SYS(Kernel mode)两层。 请问你知道怎样在DLL 当中生成一个Win32 SERVICE,从而让它 能够监听系统广播的 message 呢? 谢谢赐教! |
|
|
5楼#
发布于:2002-05-20 09:42
fracker,你好! System-wide GetMessage Hook. Ref by Spy++. |
|
|
6楼#
发布于:2002-05-20 11:30
In the Application,there is a message loop to get meassages
from the system and then dispatch them to the CALLBACK function,which is a member of the registered WNDCLASS. So,how to implement the similar function by writing a SERVICE ? Dear Nouk, it seems that you are familiar in writing App/Service. Could you give me some guide? Thank you very much in advance. |
|
|