+ if (res)
+ {
+ log_module(MAIN_LOG, LOG_FATAL, "Unable to start Windows Sockets (%d)", res);
+ }
+
+ // Get Windows HINSTANCE.
+ hinst = GetModuleHandle(NULL);
+
+ // Describe and register a window class.
+ memset(&wcx, 0, sizeof(wcx));
+ wcx.cbSize = sizeof(wcx);
+ wcx.lpfnWndProc = ioset_win32_wndproc;
+ wcx.hInstance = hinst;
+ wcx.lpszClassName = "srvxMainWindow";
+ if (!RegisterClassEx(&wcx))
+ {
+ log_module(MAIN_LOG, LOG_FATAL, "Unable to register window class (%lu)", GetLastError());
+ }
+
+ ioset_window = CreateWindow("srvxMainWindow", PACKAGE_STRING, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hinst, NULL);
+ if (!ioset_window)
+ {
+ log_module(MAIN_LOG, LOG_FATAL, "Unable to create window (%lu)", GetLastError());
+ }
+