Use FormatMessage to translate system error codes into textual messages.
authorTor Lillqvist <tml@iki.fi>
Thu, 16 Dec 1999 20:29:12 +0000 (20:29 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 16 Dec 1999 20:29:12 +0000 (20:29 +0000)
1999-12-16  Tor Lillqvist  <tml@iki.fi>

* gmodule/gmodule-win32.c: Use FormatMessage to translate system
error codes into textual messages.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gmodule/gmodule-win32.c

index ba135d3..e43e739 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index ba135d3..e43e739 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * gmodule/gmodule-win32.c: Use FormatMessage to translate system
+       error codes into textual messages.
+
 1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib.h (G_TRYLOCK): This of course should return TRUE in a
index 623398c..792a6b0 100644 (file)
@@ -43,7 +43,8 @@ _g_module_open (const gchar    *file_name,
   if (!handle)
     {
       char error[100];
-      sprintf (error, "Error code %d", GetLastError ());
+      FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (),
+                    0, error, sizeof (error), NULL);
       g_module_set_error (error);
     }
   
@@ -59,7 +60,8 @@ _g_module_self (void)
   if (!handle)
     {
       char error[100];
-      sprintf (error, "Error code %d", GetLastError ());
+      FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (),
+                    0, error, sizeof (error), NULL);
       g_module_set_error (error);
     }
   
@@ -73,7 +75,8 @@ _g_module_close (gpointer       handle,
   if (!FreeLibrary (handle))
     {
       char error[100];
-      sprintf (error, "Error code %d", GetLastError ());
+      FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (),
+                    0, error, sizeof (error), NULL);
       g_module_set_error (error);
     }
 }
@@ -88,7 +91,8 @@ _g_module_symbol (gpointer      handle,
   if (!p)
     {
       char error[100];
-      sprintf (error, "Error code %d", GetLastError ());
+      FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (),
+                    0, error, sizeof (error), NULL);
       g_module_set_error (error);
     }
   return p;