-1

My service takes ~20min to reboot, it obviously consists of a large number of libraries. Testing even a minor enhancement/bugfix is extremely inconvenient.

How can I substitute a loaded dll with the "same" one, only rebuilt, without shutting down the service?

user3209815
  • 357
  • 1
  • 11
  • 25
  • You have to ensure that the dll isn't being used, otherwise the process will most likely crash. Btw, no service should take 20 minutes to reboot, especially not under a test environment. You might have some design issues there. – simonzack Nov 03 '14 at 15:14
  • It is a service, which contains dozens of processes, it is a huge load and it is expected to boot a long time, on the other hand it is not expected to ever shut down. The key point for my question is that the dll is being used and that I'm looking for a way to get the processes using that dll to reload it. – user3209815 Nov 03 '14 at 15:21

1 Answers1

0

Get the dll's module handle using some way, call FreeLibrary on that handle, then call LoadLibrary to load the new dll.

simonzack
  • 19,729
  • 13
  • 73
  • 118