diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-12-16 07:30:36 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-12-16 07:30:36 +0000 |
commit | e299d511db939232c628d6880e61c32e83937d66 (patch) | |
tree | a2083bfd64a4fb3ed7454a7e7062ff9f7fa1232e /dln.c | |
parent | ce8859c5563493a94f57d3b630e7b9c1d3cd656f (diff) |
first public release of 1.1d (pre1.2) series
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1129,15 +1129,22 @@ dln_strerror() #ifdef _WIN32 static char message[1024]; + int error = GetLastError(); + char *p = message; + p += sprintf(message, "%d: ", error); FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, - GetLastError(), - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), - message, - sizeof message, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + p, + sizeof message - strlen(message), NULL); + for (p = message; *p; p++) { + if (*p == '\n' || *p == '\r') + *p = ' '; + } return message; #endif } @@ -1213,7 +1220,7 @@ dln_load(file) /* Load file */ if ((handle = LoadLibraryExA(winfile, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL) { - printf("LoadLibraryExA\n"); + printf("LoadLibraryExA: %s\n", winfile); goto failed; } |