Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Writing Kernel Mode DLLs with Unload

massoud_navabmassoud_navab Member Posts: 256
I followed the example
http://www.osronline.com/article.cfm?id=171

Plus added
NTSTATUS
DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
UNREFERENCED_PARAMETER(RegistryPath);
DriverObject->DriverUnload = Unload;
return STATUS_SUCCESS;
}

VOID Unload(
_In_ struct _DRIVER_OBJECT *DriverObject
)
{
UNREFERENCED_PARAMETER(DriverObject);
return;
}

Export driver works, but after I unload my main driver, export driver stays loaded, no calls to Unload.

I am sure there are no pending refs to the export driver, what is missing to make sure
the export driver unloads when no longer needed?

thanks,

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!