Hi,
I have a TDI driver which is part of our product. The driver has a
corresponding registry entry under
HKLM\system\currentcontrolset\services. I use the SCM APIs to create
this driver service entry. I have named the driver filename in a way
that it has the appropriate release/build number as part of the name.
On an upgrade of our product, I want to avoid a reboot of the client PC
so that a new driver shd get loaded (which means a new driver service
shd get created).
Steps in upgrade:
-call DeleteService API which marks the old driver service for deletion
from the service control manager database.
-adjust the load order of the old TDI driver at
HKLM\system\currentcontrolset\control\grouporderlist\PNP_TDI
-call CreateService for the new driver service (NOTE: the new driver
file name is different, hence it wont conflict with the older driver
service entry above which was marked for deletion). This call succeeds.
-call OpenService which opens the handle to the new driver service. This
call succeeds.
-call StartService to start the execution of the service (i.e. start the
driver). I expect this call to break in DriverEntry for the driver.
However, this call fails with error code 183 (ERROR_ALREADY_EXISTS)
which is described as - Cannot create a file when that file already
exists.
Does anybody here have any ideas as to what might be happening? Any help
is appreciated.
Thanks,
Sanjay