RE: Device driver load sequence
- From: Rob <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Sep 2008 05:16:01 -0700
The situation that your first driver has no SD-media is normal.
So both drivers should just be loaded normally and the 2nd one should check
it's dependencies before doing it's thing, and return failure if the
dependencies are not met. (in that case read()/write(), returns 0 or -1 or
something...)
This has little or nothing to do with all the tech-stuff you are thinking
about.
Donot try to alter the entire driver-load-model to solve a specific problem.
Q4 is an example of this, I guess you were thinking global variable's ?
Forget that, and do it properly !
Try to look at it in a less technical way, and look at the big picture first.
Greetings,
Rob.
"Gammaraman" wrote:
Hi,.
1. I have a stream device driver which gets its XXX_Init called when an SD
card is inserted. I would like to create another stream device driver whose
YYY_Init I would like to have called only if the XXX_Init successfully
completes. If an application does a CreateFile on the YYY device before a SD
card is inserted, I would like the call to fail. I am not sure if/how the
Order in the registry can be used for this.
2. If XXX_Init has not been called when an application does a CreateFile,
what happens? Does the call fail or does it cause the XXX_Init to get invoked?
3. The handle returned from XXX_Init is passed as the first param to
XXX_Open. However applications don't know the handle, so who supplies this
handle when an application does a CreateFile (which causes the XXX_Open entry
point to get exercised)?
4. Can a single DLL implement more than one stream interface?
Thanks.
- Follow-Ups:
- RE: Device driver load sequence
- From: Gammaraman
- RE: Device driver load sequence
- References:
- Device driver load sequence
- From: Gammaraman
- Device driver load sequence
- Prev by Date: Enable / Disable Paging
- Next by Date: WinCE 5: building date
- Previous by thread: Re: Device driver load sequence
- Next by thread: RE: Device driver load sequence
- Index(es):
Relevant Pages
|