+ return "failed";
+
+#elif defined(UNDER_CE)
+ wchar_t psz_tmp[256];
+
+ int i, i_error = GetLastError();
+
+ FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, i_error, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) psz_tmp, 256, NULL );
+
+ /* Go to the end of the string */
+ for( i = 0;
+ psz_tmp[i] && psz_tmp[i] != L'\r' && psz_tmp[i] != L'\n';
+ i++ ) {};
+
+ if( psz_tmp[i] )
+ {
+ swprintf( psz_tmp + i, L" (error %i)", i_error );
+ psz_tmp[ 255 ] = L'\0';
+ }
+
+ WideCharToMultiByte( CP_ACP, WC_DEFAULTCHAR, psz_tmp, -1,
+ psz_buffer, 256, NULL, NULL );
+
+ return psz_buffer;