阅读:1805回复:6
2个sys文件之间如何相互调用对方文件中的函数
2个sys文件之间如何相互调用对方文件中的函数。
谢谢! |
|
最新喜欢:idbee |
沙发#
发布于:2002-01-23 12:08
好象是calldriver函数可用
|
|
|
板凳#
发布于:2002-01-24 16:15
用ZwCreateFile()也可打开sys.
|
|
|
地板#
发布于:2002-01-30 17:43
1,IoGetDeviceObjectPointer
2,IoCallDriver |
|
|
地下室#
发布于:2002-01-30 21:26
DRIVER A: __declspec(dllexport) ....
DRIVER B: 就象CALL DLL一样调用 |
|
|
5楼#
发布于:2002-01-31 01:15
Heihei, it\'s a easy task if the two drivers are programmed by yourself.
define a struct with the functions (in the callee) you want to be called by the other driver. struct tagFunctionPtrs { NTSTATUS (*Func1)(argument list); NTSTATUS (*Func2)(argument list); ... ... }; implements a private IOCTL code which can return this function table. In the other driver (caller): 1, IoGetDeviceObjectPointer 2, IoCallDriver with the IOCTL you defined just now So you got the function table now... call these functions as you like... drivers share the same address space, you can do this safely. |
|
|
6楼#
发布于:2002-03-24 17:45
great!
|
|
|