ExitWindowsEx - again.

In the last month or so, I havge seen many questions about
problems with making ExitWindowsEx(...,0) close Windows gracefully.

I have the same problem myself.

In larger programs the function fails and in smaller programs it is
working allright.

But what do I do wrong ?
There must be some guidelines to follow to make i work.

Gunnar Martensen