Changeset 126 for pjproject/trunk/pjlib/src/pj/os_error_win32.c
- Timestamp:
- Jan 20, 2006 9:03:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/os_error_win32.c
r108 r126 22 22 #include <pj/compat/sprintf.h> 23 23 #include <pj/compat/vsprintf.h> 24 #include <pj/unicode.h> 24 25 #include <pj/string.h> 25 26 … … 122 123 { 123 124 int len; 125 PJ_DECL_UNICODE_TEMP_BUF(wbuf,128); 124 126 125 127 pj_assert(buf != NULL); … … 132 134 */ 133 135 136 #if PJ_NATIVE_STRING_IS_UNICODE 134 137 len = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM 135 138 | FORMAT_MESSAGE_IGNORE_INSERTS, … … 137 140 os_errcode, 138 141 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 139 (LPTSTR)buf,140 (DWORD)bufsize,142 wbuf, 143 sizeof(wbuf), 141 144 NULL); 145 if (len) { 146 pj_unicode_to_ansi(wbuf, len, buf, bufsize); 147 } 148 #else 149 len = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM 150 | FORMAT_MESSAGE_IGNORE_INSERTS, 151 NULL, 152 os_errcode, 153 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 154 buf, 155 bufsize, 156 NULL); 157 #endif 142 158 143 159 if (!len) {
Note: See TracChangeset
for help on using the changeset viewer.