The WinShutdownSystem function will close down the system.
#define INCL_WINWORKPLACE #include <os2.h> HAB hab; /* Anchor-block handle. */ HMQ hmq; /* Message-queue handle. */ BOOL rc; /* Success indicator. */ rc = WinShutdownSystem(hab, hmq);