Hi ,

I have question on CreateService/DeleteService.

>>The CreateService function creates a service object and installs it in the service control manager database by creating a key with the same name as the service under the following registry key:

>>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services

The above line yanked out of CreateService() page, says a entry is made in
the registry when the driver gets loaded.

>> The service control manager deletes the service by deleting the service key and its subkeys from the registry.

The above line yanked out of DeleteService() page says that it will delete
the Registry entry.

But the fact is I donâ??t see the removal part of it. I run only instance of
the application and load only one driver and then unload. I do all the
procedures needed correctly to remove the service because I am using one of
your DDK examples without modifications.

Ex: If I run my application from say c:\abcd\app once it works fine. Assume
I copied the app+driver to say e:\xyz\app and deleted it form c:\abcd\app.
Then it will not run. It will complain the Driver is not in the directory
expected. If I copy the driver back to c:\abcd\app and then run the app from
e:\xyz\app it will work. Even after a reboot the registry entry does not get
deletedâ?¦

Please explain why this deletion never happens? What is the solution?

OS: W2K3, SP2, x64 bit. However I have seen this happen on other OS and x86
also.

Thanks for your time and advice

Best regards,

Ananda vardhana