--- trunk/reactos/subsys/system/reporterror/reporterror.c 2005-05-09 00:33:23 UTC (rev 15158)
+++ trunk/reactos/subsys/system/reporterror/reporterror.c 2005-05-09 00:38:57 UTC (rev 15159)
@@ -212,6 +212,7 @@
struct hostent *hp;
struct servent *sp;
INT error;
+ WCHAR szMsg[1024];
SOCKET s;
*clientSocket = 0;
@@ -220,7 +221,10 @@
if (hp == NULL)
{
error = WSAGetLastError();
- wsprintf(errorMessage, L"Could not resolve DNS for %S (windows error code %d)", host, error);
+
+ //L"Could not resolve DNS for %S (windows error code %d)
+ LoadString( GetModuleHandle(NULL), IDS_DNS_ERROR, (LPTSTR) szMsg, sizeof(szMsg) / sizeof(WCHAR));
+ wsprintf(errorMessage, L"Could not resolve DNS for %S (windows error code %d)", host, error);
return error;
}
@@ -228,7 +232,10 @@
if (s < 0)
{
error = WSAGetLastError();
- wsprintf(errorMessage, L"Could not create socket (windows error code %d)", error);
+
+ // L"Could not create socket (windows error code %d)
+ LoadString( GetModuleHandle(NULL), IDS_SOCKET_ERROR, (LPTSTR) szMsg, sizeof(szMsg) / sizeof(WCHAR));
+ wsprintf(errorMessage, szMsg, error);
return error;
}
@@ -237,7 +244,10 @@
if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0)
{
error = WSAGetLastError();
- wsprintf(errorMessage, L"Could not resolve DNS for %S (windows error code %d)", host, error);
+
+ //L"Could not resolve DNS for %S (windows error code %d)
+ LoadString( GetModuleHandle(NULL), IDS_DNS_ERROR, (LPTSTR) szMsg, sizeof(szMsg) / sizeof(WCHAR));
+ wsprintf(errorMessage, L"Could not resolve DNS for %S (windows error code %d)", host, error);
closesocket(s);
return error;
}
@@ -247,7 +257,11 @@
if (sp == NULL)
{
error = WSAGetLastError();
- wsprintf(errorMessage, L"Could not get service (windows error code %d)", error);
+
+ //L"Could not get service (windows error code %d)"
+
+ LoadString( GetModuleHandle(NULL), IDS_GET_SRV_ERROR, (LPTSTR) szMsg, sizeof(szMsg) / sizeof(WCHAR));
+ wsprintf(errorMessage, szMsg, error);
closesocket(s);
return error;
}
@@ -257,7 +271,10 @@
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0)
{
error = WSAGetLastError();
- wsprintf(errorMessage, L"Could not connect to server (windows error code %d)", error);
+
+ //L"Could not connect to server (windows error code %d)"
+ LoadString( GetModuleHandle(NULL), IDS_CON_SRV_ERROR, (LPTSTR) szMsg, sizeof(szMsg) / sizeof(WCHAR));
+ wsprintf(errorMessage,szMsg , error);
closesocket(s);
return error;
}