Re: driver loading sequence



But I found that waiting an event calling WaitforSingleOject isn't a
good idea in the init function. this will slow down the whole system's
booting up.

any good approach to this issue?
Don't do it with an event like that. use the Order value in the registery to
have drivers loaded based on an increasing value in the order value. So that
the order for B is C+1 and A is B+1 that way the device manager will load
them and call the init functions in the correct sequence and you can know
the driver has returned from Init correctly.

Although I would seriously challenge you to re-think your design as a 3
layered driver model like that would be an exceptionally rare thing. There
is probably a better way of doing things.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com


.



Relevant Pages

  • Re: Device Driver for WatchDog using WIN CE 4.2
    ... Why are you "unable to use activatedeviceEx"? ... Does your driver's init function ... Do you have entries in the registry for the driver? ... beitman AT applieddata DOT net ...
    (microsoft.public.windowsce.embedded)
  • RE: RegisterDevice failed !!!
    ... And in my source code declare the init function as ... PVOID Context ... >> when the CE platform load the driver, ...
    (microsoft.public.windowsce.platbuilder)
  • driver loading sequence
    ... I have driver A,B and C. ... obviously I will load C first and then B and then A. When C is ready, ... it will set an event using SetEvent function to tell B, ... good idea in the init function. ...
    (microsoft.public.windowsce.platbuilder)