I install NT service and add info about ‘message.dll’ file into registry for EvenLog.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp
EventMessageFile = C:\message.dll
Start service and view service’s logging info messages in EventLog viewer.
Works fine.
Next, uninstall service and try to remove message.dll file.
Failed! I receive ‘Access deny’ messagebox because this DLL is loaded.
My question: How can I properly remove/unload/uninstall message.dll in my case?
Thanks a lot,
Dmitry
Do you stop your service before uninstall it? Do you close EventLog viewer before uninstall your serive? These are two typical errors which can follow that the message.dll stay in use.
If you will have the problem after all I would you recommend to use Process Explorer to find the process which hold the dll in use. Ctrl + F or menu “Find” / “Find Handle or DLL…” can be used to find processes used the DLL.