IIRC, typically the address of the function to be 'called back' is passed as a "pointer to function" parameter. The subroutine being called can then use that address whenever it needs to invoke some function in the calling code's scope. I've seen this mechanism implemented on several multi-threaded systems that I've worked with but I can't say for certain that this is allowed with a Windows DLL. Regards, Bob ************ Jeeze. So much for trying to reply throught the PICLst archive. I wonder if the is why some posts don't have the original text quoted. I think that's the workaround I mentioned that I couldn't remember. Pass a callback ptr to the dll. Why I'm associating that with the fact that dll's can't receive messages is anyone's guess. I think someone once asked how to use a callback in a dll. As I mentioned before, you can always pass a HWnd to the dll and use PostMessage / SendMessage, IIRC. Mike -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads