RE: Device driver load sequence



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.
.



Relevant Pages

  • Re: WinCE USB
    ... do a CreateFile( ... If it's a storage card driver, ... If it's a network USB device, ... SetupDiEnumDeviceInterfaces() ...
    (microsoft.public.windowsce.platbuilder)
  • Re: USB Testing
    ... I have no idea if the port is displayed in a GUI or is in the ... Trying to do a CreateFile in XP...As I said above, ... As for using CreateFilefrom XP, I used the device ID for the USB ... WCEUSBSH driver to load. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CreateFile performance
    ... If many applications are calling driver, ... context need a separate handle or duplicate handle for CreateFile. ... CreateFile() for each process context. ... more than one packet from driver to user mode. ...
    (microsoft.public.development.device.drivers)
  • Re: About the settings in CreateFile
    ... sharing modes really apply to file systems, ... But I still have confusion in sharing mode of CreateFile. ... If the dispatch routine for IRP_MJ_CREATE in my driver always returns ... > called in the driver there is no IOCTL present here. ...
    (microsoft.public.development.device.drivers)
  • Re: WinCE USB
    ... do a CreateFile( ... If it's a storage card driver, ... If it's a network USB device, it should provide an IP to ... SetupDiEnumDeviceInterfaces() ...
    (microsoft.public.windowsce.platbuilder)