Re: Driver unload
- From: Vetzak <ptrshrn@xxxxxxxxx>
- Date: Fri, 18 Jan 2008 07:50:18 -0800 (PST)
What is RxDriverEntry()? Are you linking against a library?
On Jan 18, 3:16 pm, Josef <Jo...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi.
My DriverEntry function does create a symlink though it does not call
IoCreateDevice directly, only through RxDriverEntry. Does that have any
effect on the unload function?
P.S. I set the unload function pointer correctly.
"Vetzak" wrote:
On Jan 17, 5:49 pm, Josef <Jo...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I did read a great deal of it,
and still I can't find an answer why my unload function does not get called.
When I load the driver, the device object has 3 references.
How and why can I dereference them?
Asaf.
"Vetzak" wrote:
On 17 jan, 13:08, Josef <Jo...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
How do I create a device object? Isn't it created by the RDBSS when I call
RxDriverEntry?
Thank you!
"Vetzak" wrote:
On Jan 13, 5:51 pm, Josef <Jo...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I'm writing a network mini-redirector.
I've managed to load and start the driver but I cannot unload it.
When I call ControlService with SERVICE_CONTROL_STOP the call returns
success, but the unload function I wrote in the driver isn't called. I
initialized the pointer to the unload function in DriverEntry by setting the
DriverUnload member of the driver object.
Thank you!
This stuff is highly undocumented. I had the same problem. I found out
that the kernel-mode service should create at least one device object
and a user-mode symlink to that device object; then the service can be
stopped and unloaded.
You may consider reading the WDM documentation first. All of it.
Uh? Let's start from scratch.
Remind that a kernel-mode service is an old-style NT 4 driver. There's
no PnP, no AddDevice or anything. The DriverEntry() sets up resources
(like device objects etc.), DriverUnload() cleans up.
When the driver is loaded in memory, there's nothing but a driver
object. The system calls the DriverEntry() function and passes a
pointer to the driver object. The DriverEntry() function writes the
Unload() address in the driver object, and creates one or more device
objects and symlinks (see: IoCreateDevice(), IoCreateSymbolicLink()).
.
- References:
- Re: Driver unload
- From: Vetzak
- Re: Driver unload
- From: Vetzak
- Re: Driver unload
- From: Vetzak
- Re: Driver unload
- From: Josef
- Re: Driver unload
- Prev by Date: usbISO sample of WLK and "streaming" option
- Next by Date: Re: best way to launch a UI or process from a device driver ?
- Previous by thread: Re: Driver unload
- Next by thread: WPP driver knowing when a somebody is listening
- Index(es):
Relevant Pages
|