Message board for the users of flat assembler.
> Windows > driverentry/driverunload jobs
what should i do in those functions?
i use DriverEntry only to setup dispatch, unload, and AddDevice.
Should i do anything else?
What about unload routine?
should i do any cleanup there, or just depend on PnP?
if i depend on pnp, i have no guarantee that PnP dispatch function will be called before system unload driver, by NtUnloadDriver for example. And my driver would leak resources.
so should my unload routine do any sort of cleanup, or not?
and how should i handle cancelation? i understand irp queue and i know how to manage it manually (setting context flag 'IsCalceled' and checking if irp is already communicationg with hardware/check for this flag when removing it from queue). Ive found tons of information about this, and i dont understand a bit from it. Its just soo complicated that i give up.
What is IRP->Cancel used for? When is IRP->CancelRoutine called?
what should i do? how cancel safe queue apply to that?
this driver stuff reallyis complicated more that it should be.
|31 May 2010, 13:20||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.