Gunnar Frenzel
unread,Jan 16, 2008, 8:14:08 AM1/16/08You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I have a driver that is automatically loaded using the HKLM\Drivers
\BuiltIn\PCI\Template\DriverName. This works fine and the driver is
present in the HKLM\Drivers\Active list.
Now I'd like to have a command line exe that can deactivate and
activate the driver. Deactivate the driver using DeactivateDevice with
the HANDLE retrieved from the drivers HKLM\Drivers\Active key works
well the driver is unloaded from device.exe and the Active key is
removed. Now I tried to call
ActivateDevice(TEXT("Drivers\\BuiltIn\\PCI\\Template\\DriverName"),
0);
as well as
ActivateDeviceEx(TEXT("Drivers\\BuiltIn\\PCI\\Template\\DriverName"),
NULL, 0, NULL);
to reload the driver, but this always fails. Both functions return 0
and GetLastError is 110 (ERROR_OPEN_FAILED).
The usecase is to deactivate the driver so the dlls can be replace
with a new version of the driver and reactivate the driver without
restarting WinCE.
Regards,
Gunnar