meilimeimei
驱动牛犊
驱动牛犊
  • 注册日期2006-05-16
  • 最后登录2013-02-25
  • 粉丝0
  • 关注0
  • 积分3分
  • 威望72点
  • 贡献值0点
  • 好评度50点
  • 原创分0分
  • 专家分0分
阅读:1735回复:5

还有个有趣的问题 向各位请教

楼主#
更多 发布于:2007-01-22 15:24
  我的驱动以start=0的方式加载 我想在DriverEntry中用zwCreatefile打开一个文件 读里面的数据  但是这个时候文件系统还没有加载  这该怎么办啊
bluacat
驱动小牛
驱动小牛
  • 注册日期2004-09-13
  • 最后登录2016-09-25
  • 粉丝0
  • 关注0
  • 积分1023分
  • 威望277点
  • 贡献值0点
  • 好评度146点
  • 原创分0分
  • 专家分0分
  • 社区居民
沙发#
发布于:2007-01-22 23:55
判断\\SystemRoot 成功后再去做
znsoft
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2023-10-25
  • 粉丝300
  • 关注6
  • 积分910分
  • 威望14796点
  • 贡献值7点
  • 好评度2410点
  • 原创分5分
  • 专家分100分
  • 社区居民
  • 最爱沙发
  • 社区明星
板凳#
发布于:2007-01-23 09:11
就是,死等,直到上帝bill创建整个世界.hehe
http://www.zndev.com 免费源码交换网 ----------------------------- 软件创造价值,驱动提供力量! 淡泊以明志,宁静以致远。 ---------------------------------- 勤用搜索,多查资料,先搜再问。
wowocock
VIP专家组
VIP专家组
  • 注册日期2002-04-08
  • 最后登录2016-01-09
  • 粉丝16
  • 关注2
  • 积分601分
  • 威望1651点
  • 贡献值1点
  • 好评度1227点
  • 原创分1分
  • 专家分0分
地板#
发布于:2007-01-23 09:21
死等是个好方法,不然就只有自己实现文件系统,磁盘系统,==,去做了,也许自己实现个MINI OS也是不错的选择.
花开了,然后又会凋零,星星是璀璨的,可那光芒也会消失。在这样 一瞬间,人降生了,笑者,哭着,战斗,伤害,喜悦,悲伤憎恶,爱。一切都只是刹那间的邂逅,而最后都要归入死亡的永眠
meilimeimei
驱动牛犊
驱动牛犊
  • 注册日期2006-05-16
  • 最后登录2013-02-25
  • 粉丝0
  • 关注0
  • 积分3分
  • 威望72点
  • 贡献值0点
  • 好评度50点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2007-01-23 10:24
死等的话我该怎么等 难道在DriverEntry中写个死循环判断\\SystemRoot 是否可以读? 但是这样的话整个系统都会卡在这里  因为此时系统只是单线程  后面驱动的DriverEntry都不会执行  文件系统又怎么能够初始化
wowocock
VIP专家组
VIP专家组
  • 注册日期2002-04-08
  • 最后登录2016-01-09
  • 粉丝16
  • 关注2
  • 积分601分
  • 威望1651点
  • 贡献值1点
  • 好评度1227点
  • 原创分1分
  • 专家分0分
5楼#
发布于:2007-01-23 17:27
Windows Driver Kit: Kernel-Mode Driver Architecture
IoRegisterBootDriverReinitialization
The IoRegisterBootDriverReinitialization routine is called by a boot driver to register the driver's reinitialization routine with the I/O manager to be called after all devices have been enumerated and started.

VOID   IoRegisterBootDriverReinitialization(    IN PDRIVER_OBJECT  DriverObject,    IN PDRIVER_REINITIALIZE  DriverReinitializationRoutine,    IN PVOID  Context    );
Parameters
DriverObject
Pointer to the driver object for the boot driver to be reinitialized.
DriverReinitializationRoutine
Pointer to the driver's Reinitialize routine.
Context
Optional context pointer to be passed to the driver's reinitialization routine.

Return Value
None

Headers
Declared in ntddk.h and ntifs.h. Include ntddk.h or ntifs.h.

Comments
A boot driver normally calls IoRegisterBootDriverReinitialization from its DriverEntry routine, which is run during boot driver initialization. IoRegisterBootDriverReinitialization registers the driver's reinitialization callback routine to be called by the I/O manager after all devices have been enumerated and started. The DriverReinitializationRoutine is run in a system thread at IRQL = PASSIVE_LEVEL.

A driver should call IoRegisterBootDriverReinitialization only if its DriverEntry routine will return STATUS_SUCCESS.

If the DriverReinitializationRoutine uses the registry, the DriverEntry routine must include in IoRegisterBootDriverReinitialization's Context parameter a copy of the string to which DriverEntry's own RegistryPath parameter points.

The DriverEntry routine can call IoRegisterBootDriverReinitialization only once. If the reinitialization routine needs to be run more than once, the DriverReinitializationRoutine can call IoRegisterBootDriverReinitialization as many additional times as needed, using the Count parameter to keep track of the number of times the DriverReinitializationRoutine has been called.

Callers of IoRegisterBootDriverReinitialization must be running at IRQL = PASSIVE_LEVEL.

See Also
DRIVER_OBJECT, IoRegisterDriverReinitialization
花开了,然后又会凋零,星星是璀璨的,可那光芒也会消失。在这样 一瞬间,人降生了,笑者,哭着,战斗,伤害,喜悦,悲伤憎恶,爱。一切都只是刹那间的邂逅,而最后都要归入死亡的永眠
游客

返回顶部