Regedit: Stopgap fix to build error just introduced; need to go through
Regedit and TCHAR-ize it
Modified: trunk/reactos/subsys/system/regedit/regedit.c
_____
Modified: trunk/reactos/subsys/system/regedit/regedit.c
--- trunk/reactos/subsys/system/regedit/regedit.c 2005-10-04
12:02:34 UTC (rev 18258)
+++ trunk/reactos/subsys/system/regedit/regedit.c 2005-10-04
12:41:08 UTC (rev 18259)
@@ -194,6 +194,10 @@
}
case ACTION_EXPORT: {
CHAR filename[MAX_PATH];
+ LPCTSTR pszFilename;
+#ifdef UNICODE
+ WCHAR filename_wide[MAX_PATH];
+#endif
filename[0] = '\0';
get_file_name(&s, filename);
@@ -203,13 +207,21 @@
exit(1);
}
+#ifdef UNICODE
+ MultiByteToWideChar(CP_ACP, 0, filename, -1, filename_wide,
+ sizeof(filename_wide) / sizeof(filename_wide[0]));
+ pszFilename = filename_wide;
+#else
+ pszFilename = filename;
+#endif
+
if (s[0]) {
CHAR reg_key_name[KEY_MAX_LEN];
get_file_name(&s, reg_key_name);
- export_registry_key(filename, reg_key_name);
+ export_registry_key(pszFilename, reg_key_name);
} else {
- export_registry_key(filename, NULL);
+ export_registry_key(pszFilename, NULL);
}
break;
}
Show replies by date