Commit f38b36c596089328bdfa8d008f673a58713aa2e7
1 parent
31726505
Exists in
master
and in
5 other branches
Pequenas correções para compilar em windows
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
src/classlib/module.cc
... | ... | @@ -143,13 +143,13 @@ namespace PW3270_NAMESPACE |
143 | 143 | } |
144 | 144 | else |
145 | 145 | { |
146 | - hModule = LoadLibrary(dllname); | |
146 | + hModule = LoadLibrary(dllname.c_str()); | |
147 | 147 | rc = GetLastError(); |
148 | 148 | } |
149 | 149 | |
150 | 150 | SetErrorMode(errorMode); |
151 | 151 | |
152 | - trace("%s hModule=%p rc=%d",dllname,hModule,(int) rc); | |
152 | + trace("%s hModule=%p rc=%d",dllname.c_str(),hModule,(int) rc); | |
153 | 153 | |
154 | 154 | if(cookie && RemoveDllDirectory) |
155 | 155 | RemoveDllDirectory(cookie); |
... | ... | @@ -158,7 +158,7 @@ namespace PW3270_NAMESPACE |
158 | 158 | FreeLibrary(kernel); |
159 | 159 | |
160 | 160 | if(!hModule) |
161 | - throw exception("Can't load %s",dllname.c_str()); | |
161 | + throw exception("Can't load %s: %s",dllname.c_str(),session::win32_strerror(rc)); | |
162 | 162 | |
163 | 163 | #else |
164 | 164 | dllname += ".so"; | ... | ... |
src/include/pw3270/class.h
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | // charset |
151 | 151 | #ifdef WIN32 |
152 | 152 | void set_display_charset(const char *remote = 0, const char *local = "CP1252"); |
153 | - string win32_strerror(int e); | |
153 | + static string win32_strerror(int e); | |
154 | 154 | #else |
155 | 155 | void set_display_charset(const char *remote = 0, const char *local = "UTF-8"); |
156 | 156 | #endif // WIN32 | ... | ... |