#define INCL_WINWORKPLACE #define INCL_DOSFILEMGR #define INCL_DOSERRORS #include #include int main(VOID) { HAB hab = NULLHANDLE; HMQ hmq = NULLHANDLE; BOOL fSuccess = 0; hab = WinInitialize( 0 ); hmq = WinCreateMsgQueue( hab, 0 ); /* The following call is needed to prevent this program from hanging the shutdown... */ fSuccess = WinCancelShutdown( hmq, TRUE ); printf( "System Shutdown will now be attempted...\n" ); DosBeep(800, 90); DosBeep(600, 90); DosBeep(400, 300); /* Shut the machine down */ fSuccess = WinShutdownSystem( hab, hmq ); return( 0 ); }