/*
* PROJECT: ReactOS simple TCP/IP services
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: /base/services/tcpsvcs/tcpsvcs.c
+ * FILE: base/services/tcpsvcs/tcpsvcs.c
* PURPOSE: Provide CharGen, Daytime, Discard, Echo, and Qotd services
* COPYRIGHT: Copyright 2005 - 2008 Ged Murphy <gedmurphy@reactos.org>
*
#include "tcpsvcs.h"
+#include <winsvc.h>
+
static WCHAR ServiceName[] = L"tcpsvcs";
volatile BOOL bShutdown = FALSE;
_snwprintf(szSet,
49,
- L"Service state 0x%lu, CheckPoint %lu",
+ L"Service state 0x%lx, CheckPoint %lu",
pServInfo->servStatus.dwCurrentState,
pServInfo->servStatus.dwCheckPoint);
LogEvent(szSet, 0, 0, LOG_FILE);
if ((RetVal = WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0)
{
- _swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal);
+ swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal);
LogEvent(buf, 0, 100, LOG_ALL);
return FALSE;
}
/* Create worker threads. */
for (i = 0; i < NUM_SERVICES; i++)
{
- _swprintf(buf, L"Creating thread for %s server", Services[i].lpName);
+ swprintf(buf, L"Creating thread for %s server", Services[i].lpName);
LogEvent(buf, 0, 0, LOG_FILE);
hThread[i] = CreateThread(NULL,
if (hThread[i] == NULL)
{
- _swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName);
+ swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName);
LogEvent(buf, GetLastError(), 0, LOG_ALL);
return FALSE;
}