mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-28 23:12:17 +01:00 
			
		
		
		
	Use FormatMessage to translate system error codes into textual messages.
1999-12-16 Tor Lillqvist <tml@iki.fi> * gmodule/gmodule-win32.c: Use FormatMessage to translate system error codes into textual messages.
This commit is contained in:
		
				
					committed by
					
						 Tor Lillqvist
						Tor Lillqvist
					
				
			
			
				
	
			
			
			
						parent
						
							d1bbb7f07f
						
					
				
				
					commit
					bc5baaa76d
				
			| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user