Joentke Kornse <> wrote:
>Hi All,
>
>I am getting this error in Win 7 but not in Vista and and not in XP:
>"Windows cannot load the device driver because a previous instance of
>the device driver is still in memory. (Code 38)"
>
>I am hoping that the experts in this group could give me a few tips
>on:
>Is there any obvious flaw that is noticeable from my description?
>Is there any special handling that needs to be done for Win 7?
>...
>The nature of the driver:
>The kernel driver is a KMDF-based upper filter driver, and it is
>filtering a hid device.
>The kernel driver also creates a control device, exposed to the user
>space supporting modules through a symbolic link.
>The filter device registers for EvtCleanupCallback and will
>WdfObjectDelete control device when this callback function is called.
>...
>In XP and Vista, my driver received both the EvtCleanupCallback and
>EvtDestroyCallback callbacks for control device, but in Win 7, my
>driver received only the EvtCleanupCallback callback.
What is the order of the callbacks? Do you see the EvtDestroy call for the
filter device before the EvtCleanup for the control device? That would be
a problem. The control device must be gone before the filter device gets
deleted, otherwise the system will never unload the driver.
Does it matter if you remove the EvtDestroy callback on the control device?
--
Tim Roberts,
Providenza & Boekelheide, Inc.