How can I load a DLL from mIRC so that it stays in memory, but executes in a new thread, so as not to cause mIRC to freeze while the dll is executing? It runs in a long loop receiving debug messages from an application, which I want to relay to mIRC. I want to keep mIRC responsive - yet how do I keep mIRC up to date with the latest messages the DLL receives as they arrive? (Think an EnumWindows type situation, with the DLL acting as Windows).

Thanks for your help.