I seem to recall reading somewhere that calling changeresolution with the flag cds_fullscreen will block screensavers and power options, eg. sleep, hibernate, etc.
You are talking about exclusive mode?

The fact is that with the [pascal]initialization[/pascal] and [pascal]finalization[/pascal] tags you can automatically unload a dll and its functions even when the game has been forced quit (ctrl+alt+del) or crashed.

But I don't know how to use them. Anyone that can apply it to the code above.