开发者

Perform an action after driver initialization during boot

I would like to perform an action on the device drivers in the system after they initialize during boot-up. I would like to do this from my own application that would not be part of an开发者_运维问答y existing driver. Is there a way to check when a driver is done with its initialization from my application so I can do what I would like to do. Please suggest.


Your question is unclear. Control from where? Is your question better phrased like this?

I would like to perform an action on every driver in the system after they initialize from my own, separate driver/application/etc. code. This code would not be part of any existing driver.

If that's what you're after then no, there is no inherent way to do this. If it's your own OS you could probably clone and modify the busenum driver (%WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS\BUSENUM) which is responsible for loading drivers, but I'm far from convinced that's a good idea. What problem, exactly, are you trying to solve here?

EDIT

For further detail on the BUSENUM driver "option", in BusEnum.cpp, starting at line 260 is the method BusEnum::ActivateAllChildDrivers. This method is responsible for loading each of the drivers in the driver registry. At line 293 you'll see this:

pCurDevice->LoadDevice();

You would then insert your code right after that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜