How to logoff Windows after shutdown the runtime automatically?

IWS version: v7.1 SP3 Patch 9 or newer.

Platform: Windows and Windows Embedded Standard.

- > This little demo project shows how to shutdown the IWS runtime and, in the same command, logoff the current Windows user session.