Mercuryus, I don't want to ask too much, since your demo and dll have already helped so much, but if you do decide to give the dllmain fix jcl suggested a try, I'd love to get a copy. Otherwise, I'll see if I can create some sort of "proxy dll" that calls your original dll from dllmain. Many thanks again.