As others said, you have to set cancel routine if you pend IRPs. However,
I’m not quite sure if it is your current problem. You say application
terminates abnormally but task manager still displays it. So it wasn’t
really terminated. Usually, some thread doesn’t want to stop. Try to kill
app using taskmgr or System Internals pskill utility and see if something
changes.
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From: xxxxx@leadbyte.com[SMTP:xxxxx@leadbyte.com]
Reply To: xxxxx@lists.osr.com
Sent: Tuesday, September 03, 2002 3:32 PM
To: xxxxx@lists.osr.com
Subject: [ntdev] Help on MDLGetSystemAddressForMDLSafe and abnormal
app termination…Hi all,
I am writing an IP filter hook driver, and i am having troubles when i
send a lage buffer to the driver via a custom IOCTL which uses
METHOD_IN_DIRECT.
the driver call MmGetSystemAdressForMDLSafe to directly write the captured
IP packets in this buffer.But when the application abnormally terminates it remains in the memory
(as task manager shows it still running…). The driver is not sent any
IRP_MJ_CLEANUP or IRP_MJ_CLOSE . In this routiones i have added
MmUnmapLocked pages call in __try and __except blocks.
but they dont get called…
DDK says that NT calls this routines if application abnormally terminates
but why they dont get called in this case ??
Any help is appreciated…—Subodh