Hello Zbynek, First of all, I assume your DLL has some shared data (using a technique like the one described in How to share a data segment in a DLL, for instance) --otherwise, your question makes little sense. That said, maybe the following technique will work: Have a shared global variable (with proper CRITICAL_SECTION-controlled access) that keeps track of how many processes are currently attached to the DLL. When this count is one (i.e., upon launching of the first process) make your entry point launch a special process (with CreateProcess) that in turn loads the DLL and creates the service thread (or does the required job at its primary thread). This "service" process can then quit when all other "normal" processes abandon the DLL. Make the service process a non-GUI one and the scheme will go unnoticed. I hope I made myself clear enough. Let me know it this did help. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo