today
驱动牛犊
驱动牛犊
  • 注册日期2001-03-23
  • 最后登录2011-06-28
  • 粉丝0
  • 关注0
  • 积分30分
  • 威望3点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
阅读:1805回复:6

2个sys文件之间如何相互调用对方文件中的函数

楼主#
更多 发布于:2002-01-23 11:06
2个sys文件之间如何相互调用对方文件中的函数。
谢谢!

最新喜欢:

idbeeidbee
znsoft
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2023-10-25
  • 粉丝300
  • 关注6
  • 积分910分
  • 威望14796点
  • 贡献值7点
  • 好评度2410点
  • 原创分5分
  • 专家分100分
  • 社区居民
  • 最爱沙发
  • 社区明星
沙发#
发布于:2002-01-23 12:08
好象是calldriver函数可用
http://www.zndev.com 免费源码交换网 ----------------------------- 软件创造价值,驱动提供力量! 淡泊以明志,宁静以致远。 ---------------------------------- 勤用搜索,多查资料,先搜再问。
tigerzd
驱动老牛
驱动老牛
  • 注册日期2001-08-25
  • 最后登录2004-12-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-01-24 16:15
  用ZwCreateFile()也可打开sys.
犯强汉者,虽远必诛! [img]http://www.driverdevelop.com/forum/upload/tigerzd/2002-12-13_sf10.JPG[/img]
matt
驱动中牛
驱动中牛
  • 注册日期2001-07-24
  • 最后登录2016-02-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-01-30 17:43
1,IoGetDeviceObjectPointer
2,IoCallDriver
System Internals http://sys.xiloo.com
lu0
lu0
论坛版主
论坛版主
  • 注册日期2001-06-10
  • 最后登录2016-04-05
  • 粉丝2
  • 关注0
  • 积分-6311分
  • 威望21111点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-01-30 21:26
DRIVER A: __declspec(dllexport) ....
DRIVER B: 就象CALL DLL一样调用
Regards, Lu Lin Webmaster of Inside Programming http://www.lu0s1.com
WindThruEars
驱动老牛
驱动老牛
  • 注册日期2002-11-17
  • 最后登录2004-07-10
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
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.
我是假耳朵
jansen
驱动小牛
驱动小牛
  • 注册日期2001-10-21
  • 最后登录2007-10-17
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2002-03-24 17:45
great!
rich
游客

返回顶部