mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
remove last hardcode string to En.rc
need translate to other langes new strings in En.rc are IDS_DNS_ERROR, IDS_SOCKET_ERROR, IDS_GET_SRV_ERROR, IDS_CON_SRV_ERROR svn path=/trunk/; revision=15159
This commit is contained in:
parent
2ba13f06b1
commit
4cced63916
3 changed files with 36 additions and 5 deletions
|
@ -52,3 +52,11 @@ BEGIN
|
|||
IDS_FAILED_TO_LOCATE_SERVER "Failed to contact error reporting server"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DNS_ERROR "Could not resolve DNS for %S (windows error code %d)"
|
||||
IDS_SOCKET_ERROR "Could not create socket (windows error code %d)"
|
||||
IDS_GET_SRV_ERROR "Could not get service (windows error code %d)"
|
||||
IDS_CON_SRV_ERROR "Could not connect to server (windows error code %d)"
|
||||
END
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ ConnectToServer(LPSTR host,
|
|||
struct hostent *hp;
|
||||
struct servent *sp;
|
||||
INT error;
|
||||
WCHAR szMsg[1024];
|
||||
SOCKET s;
|
||||
|
||||
*clientSocket = 0;
|
||||
|
@ -220,7 +221,10 @@ ConnectToServer(LPSTR host,
|
|||
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 @@ ConnectToServer(LPSTR host,
|
|||
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 @@ ConnectToServer(LPSTR host,
|
|||
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 @@ ConnectToServer(LPSTR host,
|
|||
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 @@ ConnectToServer(LPSTR host,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,12 @@
|
|||
#define IDB_WATERMARK 100
|
||||
#define IDB_HEADER 101
|
||||
|
||||
|
||||
#define IDS_DNS_ERROR 600
|
||||
#define IDS_SOCKET_ERROR 601
|
||||
#define IDS_GET_SRV_ERROR 602
|
||||
#define IDS_CON_SRV_ERROR 603
|
||||
|
||||
typedef struct _ERROR_REPORT
|
||||
{
|
||||
LPSTR YourEmail;
|
||||
|
|
Loading…
Reference in a new issue