ecore_con: fix use of FormatMessage for error reporting on windows.
authorGuillaume Friloux <guillaume.friloux@gmail.com>
Fri, 30 Jan 2015 13:09:34 +0000 (14:09 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 11 Feb 2015 16:03:38 +0000 (17:03 +0100)
@fix

src/lib/ecore_con/ecore_con.c

index 75a23d2..48c8416 100644 (file)
@@ -2481,9 +2481,10 @@ _ecore_con_server_flush(Ecore_Con_Server *obj)
                 LPTSTR s;
 
                 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                              FORMAT_MESSAGE_FROM_SYSTEM     |
-                              FORMAT_MESSAGE_FROM_STRING,
-                              NULL, WSAGetLastError(), (DWORD)NULL, s, 0, NULL);
+                              FORMAT_MESSAGE_FROM_SYSTEM,
+                              NULL, WSAGetLastError(),
+                              MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                              (LPTSTR)&s, 0, NULL);
                 ecore_con_event_server_error(obj, (char *)s);
                 free(s);
                 _ecore_con_server_kill(obj);