home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
IJB20OS2
/
SOURCE
/
WIN32.C
< prev
Wrap
C/C++ Source or Header
|
1997-09-16
|
655b
|
34 lines
char *win32_rcs = "$Id: win32.c,v 1.4 1997/09/08 14:05:05 ACJC Exp $";
#ifdef _WIN32
#include <windows.h>
/*This is called by Windows when the system is shut down or the user
logs off.*/
BOOL WINAPI OnEvent(DWORD dwCtrlType)
{
ExitProcess(0);
return TRUE; /* never reached */
}
extern int hideConsole;
void InitWin32()
{
WORD wVersionRequested;
WSADATA wsaData;
SetConsoleCtrlHandler(OnEvent, TRUE);
SetProcessShutdownParameters(0x280, SHUTDOWN_NORETRY);
if (hideConsole) {
FreeConsole();
}
wVersionRequested = MAKEWORD(2, 0);
if (WSAStartup(wVersionRequested, &wsaData) != 0) {
exit(1);
}
}
#endif