>the SYS() function will only work, when the EXE is launched as an OLE server. I don't think there is another possibility to make VFP generate a trappable error when it comes into a modal state ... Can you avoid these modal states by your own code (you mentioned that
> it's a small application)? But it would be nice have the SYS working in a regular EXE. Mybe worth an ER!?
The only way would be to turn it into a COM. However, I want to have visual control for some monitoring purposes. But, it runs by itself on the server so nobody is there. That's why I posted this thread in order to know if something found a magic solution in it. Especially that magic was focused at the closing session in GLGDW, I thought that some would have come into this thread with a magical answer. :)