diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
commit | 428bf0cbd77813a43094cb5c984436deff251936 (patch) | |
tree | d7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/CrashDumper/src | |
parent | 82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff) |
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CrashDumper/src')
-rw-r--r-- | plugins/CrashDumper/src/crshdmp.cpp | 10 | ||||
-rw-r--r-- | plugins/CrashDumper/src/dumper.cpp | 24 | ||||
-rw-r--r-- | plugins/CrashDumper/src/exhndlr.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/stdafx.h | 26 | ||||
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/upload.cpp | 4 | ||||
-rw-r--r-- | plugins/CrashDumper/src/utils.cpp | 22 |
7 files changed, 45 insertions, 45 deletions
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index eec8817037..d351160b0b 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -65,14 +65,14 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SERVIC INT_PTR StoreVersionInfoToFile(WPARAM, LPARAM lParam)
{
- CreateDirectoryTreeT(VersionInfoFolder);
+ CreateDirectoryTreeW(VersionInfoFolder);
wchar_t path[MAX_PATH];
mir_snwprintf(path, TEXT("%s\\VersionInfo.txt"), VersionInfoFolder);
HANDLE hDumpFile = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDumpFile != INVALID_HANDLE_VALUE) {
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR);
WriteUtfFile(hDumpFile, T2Utf(buffer.c_str()));
@@ -87,7 +87,7 @@ INT_PTR StoreVersionInfoToFile(WPARAM, LPARAM lParam) INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam)
{
- CMString buffer;
+ CMStringW buffer;
WriteBBFile(buffer, true);
PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR | VI_FLAG_FORMAT);
WriteBBFile(buffer, false);
@@ -99,7 +99,7 @@ INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam) INT_PTR UploadVersionInfo(WPARAM, LPARAM lParam)
{
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer);
VerTrnsfr *trn = (VerTrnsfr*)mir_alloc(sizeof(VerTrnsfr));
@@ -130,7 +130,7 @@ INT_PTR GetVersionInfo(WPARAM wParam, LPARAM lParam) {
int result = 1; //failure
if (lParam != NULL) {
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)wParam);
char **retData = (char **)lParam;
*retData = mir_utf8encodeW(buffer.c_str());
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 7843451951..f802e4e33b 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -34,7 +34,7 @@ void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr) }
-void WriteBBFile(CMString& buffer, bool hdr)
+void WriteBBFile(CMStringW& buffer, bool hdr)
{
static const wchar_t header[] = TEXT("[spoiler=VersionInfo][quote]");
static const wchar_t footer[] = TEXT("[/quote][/spoiler]");
@@ -55,7 +55,7 @@ void WriteUtfFile(HANDLE hDumpFile, char* bufu) BOOL CALLBACK LoadedModules64(LPCSTR, DWORD64 ModuleBase, ULONG ModuleSize, PVOID UserContext)
{
- CMString& buffer = *(CMString*)UserContext;
+ CMStringW& buffer = *(CMStringW*)UserContext;
const HMODULE hModule = (HMODULE)ModuleBase;
@@ -100,7 +100,7 @@ BOOL CALLBACK LoadedModulesFind64(LPCSTR ModuleName, DWORD64 ModuleBase, ULONG M }
-void GetLinkedModulesInfo(wchar_t *moduleName, CMString &buffer)
+void GetLinkedModulesInfo(wchar_t *moduleName, CMStringW &buffer)
{
HANDLE hDllFile = CreateFile(moduleName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDllFile == INVALID_HANDLE_VALUE)
@@ -165,11 +165,11 @@ struct ListItem {
ListItem() : str(), next(NULL) {}
- CMString str;
+ CMStringW str;
ListItem *next;
};
-static void GetPluginsString(CMString& buffer, unsigned& flags)
+static void GetPluginsString(CMStringW& buffer, unsigned& flags)
{
buffer.AppendFormat(TEXT("Service Mode: %s\r\n"), servicemode ? TEXT("Yes") : TEXT("No"));
@@ -186,7 +186,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) size_t count = 0, ucount = 0;
- CMString ubuffer;
+ CMStringW ubuffer;
ListItem* dlllist = NULL;
static const wchar_t format[] = TEXT("\xa4 %s v.%s%d.%d.%d.%d%s [%s] - %S %s\r\n");
@@ -299,7 +299,7 @@ struct ProtoCount bool nloaded;
};
-static void GetProtocolStrings(CMString& buffer)
+static void GetProtocolStrings(CMStringW& buffer)
{
PROTOACCOUNT **accList;
int accCount;
@@ -350,7 +350,7 @@ static void GetProtocolStrings(CMString& buffer) }
-static void GetWeatherStrings(CMString& buffer, unsigned flags)
+static void GetWeatherStrings(CMStringW& buffer, unsigned flags)
{
wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
@@ -417,7 +417,7 @@ static void GetWeatherStrings(CMString& buffer, unsigned flags) }
-static void GetIconStrings(CMString& buffer)
+static void GetIconStrings(CMStringW& buffer)
{
wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
@@ -442,7 +442,7 @@ static void GetIconStrings(CMString& buffer) }
-void PrintVersionInfo(CMString& buffer, unsigned flags)
+void PrintVersionInfo(CMStringW& buffer, unsigned flags)
{
GetProcessorString(buffer);
buffer.Append(L"\r\n");
@@ -576,7 +576,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha wchar_t curtime[30];
GetISO8061Time(NULL, curtime, 30);
- CMString buffer;
+ CMStringW buffer;
buffer.AppendFormat(TEXT("Miranda Crash Report from %s. Crash Dumper v.%d.%d.%d.%d\r\n"),
curtime,
HIBYTE(HIWORD(pluginInfoEx->version)), LOBYTE(HIWORD(pluginInfoEx->version)),
@@ -654,7 +654,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha static const wchar_t formatc[] = TEXT("\r\nLikely cause of the crash plugin: %S\r\n\r\n");
if (pi->shortName) {
- CMString crashcause;
+ CMStringW crashcause;
crashcause.AppendFormat(formatc, pi->shortName);
buffer.Insert(crashpos, crashcause);
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index eef812a33a..0a23ed5ba9 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -51,7 +51,7 @@ void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify) HANDLE hDumpFile = NULL;
GetLocalTime(&st);
- CreateDirectoryTreeT(CrashLogFolder);
+ CreateDirectoryTreeW(CrashLogFolder);
__try {
if (dtsubfldr) {
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h index f7abf43d21..6a0dc8bede 100644 --- a/plugins/CrashDumper/src/stdafx.h +++ b/plugins/CrashDumper/src/stdafx.h @@ -95,30 +95,30 @@ extern bool servicemode, clsdates, dtsubfldr, catchcrashes, needrestart; extern wchar_t CrashLogFolder[MAX_PATH];
extern wchar_t VersionInfoFolder[MAX_PATH];
-void WriteBBFile(CMString& buffer, bool hdr);
+void WriteBBFile(CMStringW& buffer, bool hdr);
void WriteUtfFile(HANDLE hDumpFile, char* bufu);
LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr);
LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr);
DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info);
-void GetInternetExplorerVersion(CMString& buffer);
-void GetProcessorString(CMString& buffer);
-void GetFreeMemoryString(CMString& buffer);
-void GetFreeDiskString(LPCTSTR dirname, CMString& buffer);
-void GetAdminString(CMString& buffer);
-void GetLanguageString(CMString& buffer);
-void GetLanguagePackString(CMString& buffer);
-void GetWow64String(CMString& buffer);
-void GetVersionInfo(HMODULE hLib, CMString& buffer);
+void GetInternetExplorerVersion(CMStringW& buffer);
+void GetProcessorString(CMStringW& buffer);
+void GetFreeMemoryString(CMStringW& buffer);
+void GetFreeDiskString(LPCTSTR dirname, CMStringW& buffer);
+void GetAdminString(CMStringW& buffer);
+void GetLanguageString(CMStringW& buffer);
+void GetLanguagePackString(CMStringW& buffer);
+void GetWow64String(CMStringW& buffer);
+void GetVersionInfo(HMODULE hLib, CMStringW& buffer);
void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize);
-void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer);
+void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer);
void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize);
void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, DWORD dwSize);
-void StoreStringToClip(CMString& buffer);
+void StoreStringToClip(CMStringW& buffer);
void ShowMessage(int type, const wchar_t* format, ...);
bool IsPluginEnabled(wchar_t* filename);
@@ -127,7 +127,7 @@ const PLUGININFOEX* GetPluginInfoEx(void); void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wchar_t* msg);
-void PrintVersionInfo(CMString& buffer, unsigned flags = VI_FLAG_PRNVAR);
+void PrintVersionInfo(CMStringW& buffer, unsigned flags = VI_FLAG_PRNVAR);
bool ProcessVIHash(bool store);
void InitExceptionHandler(void);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 319740aaa7..e2d6c71002 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -72,7 +72,7 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara mir_wstrcpy(chf.szFaceName, TEXT("Courier New"));
SendDlgItemMessage(hwndDlg, IDC_VIEWVERSIONINFO, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&chf);
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)lParam);
SetDlgItemText(hwndDlg, IDC_VIEWVERSIONINFO, buffer.c_str());
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp index ad180b0589..dd7583cf79 100644 --- a/plugins/CrashDumper/src/upload.cpp +++ b/plugins/CrashDumper/src/upload.cpp @@ -215,7 +215,7 @@ void __cdecl VersionInfoUploadThread(void* arg) void UploadInit(void)
{
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = (char*)PluginName;
nlu.ptszDescriptiveName = TranslateT("Crash Dumper HTTP connections");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -228,7 +228,7 @@ void UploadClose(void) bool ProcessVIHash(bool store)
{
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, 0);
BYTE hash[16];
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index df32598f4a..2fd7e8f815 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -100,7 +100,7 @@ PLUGININFOEX* GetMirInfo(HMODULE hModule) return bpi(mirandaVersion);
}
-void GetInternetExplorerVersion(CMString &buffer)
+void GetInternetExplorerVersion(CMStringW &buffer)
{
HKEY hKey;
DWORD size;
@@ -164,7 +164,7 @@ void TrimMultiSpaces(wchar_t *str) }
}
-void GetProcessorString(CMString &buffer)
+void GetProcessorString(CMStringW &buffer)
{
HKEY hKey;
DWORD size;
@@ -197,7 +197,7 @@ void GetProcessorString(CMString &buffer) buffer.AppendFormat(TEXT(" [%u CPUs]"), si.dwNumberOfProcessors);
}
-void GetFreeMemoryString(CMString &buffer)
+void GetFreeMemoryString(CMStringW &buffer)
{
unsigned ram;
MEMORYSTATUSEX ms = { 0 };
@@ -207,7 +207,7 @@ void GetFreeMemoryString(CMString &buffer) buffer.AppendFormat(TEXT("Installed RAM: %u MBytes"), ram);
}
-void GetFreeDiskString(LPCTSTR dirname, CMString &buffer)
+void GetFreeDiskString(LPCTSTR dirname, CMStringW &buffer)
{
ULARGE_INTEGER tnb, tfb, fs = { 0 };
GetDiskFreeSpaceEx(dirname, &fs, &tnb, &tfb);
@@ -216,7 +216,7 @@ void GetFreeDiskString(LPCTSTR dirname, CMString &buffer) buffer.AppendFormat(TEXT("Free disk space on Miranda partition: %u MBytes"), fs.LowPart);
}
-void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer)
+void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer)
{
buffer.Append(TEXT("Exception: "));
@@ -317,7 +317,7 @@ void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer) }
}
-void GetAdminString(CMString &buffer)
+void GetAdminString(CMStringW &buffer)
{
BOOL b;
__try {
@@ -341,7 +341,7 @@ void GetAdminString(CMString &buffer) buffer.AppendFormat(TEXT("Administrator privileges: %s"), b ? TEXT("Yes") : TEXT("No"));
}
-void GetLanguageString(CMString &buffer)
+void GetLanguageString(CMStringW &buffer)
{
wchar_t name1[256], name2[256], name3[256], name4[256];
@@ -354,7 +354,7 @@ void GetLanguageString(CMString &buffer) buffer.AppendFormat(TEXT("OS Languages: (UI | Locale (User/System)) : %s/%s | %s/%s"), name3, name4, name1, name2);
}
-void GetLanguagePackString(CMString &buffer)
+void GetLanguagePackString(CMStringW &buffer)
{
buffer.Append(TEXT("Language pack: "));
if (packlcid != LOCALE_USER_DEFAULT) {
@@ -372,7 +372,7 @@ void GetLanguagePackString(CMString &buffer) buffer.Append(TEXT("No language pack installed"));
}
-void GetWow64String(CMString &buffer)
+void GetWow64String(CMStringW &buffer)
{
BOOL wow64 = 0;
if (!IsWow64Process(GetCurrentProcess(), &wow64))
@@ -382,7 +382,7 @@ void GetWow64String(CMString &buffer) buffer.Append(TEXT(" [running inside WOW64]"));
}
-void GetVersionInfo(HMODULE hLib, CMString& buffer)
+void GetVersionInfo(HMODULE hLib, CMStringW& buffer)
{
HRSRC hVersion = FindResource(hLib, MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);
if (hVersion != NULL) {
@@ -406,7 +406,7 @@ void GetVersionInfo(HMODULE hLib, CMString& buffer) }
}
-void StoreStringToClip(CMString& buffer)
+void StoreStringToClip(CMStringW& buffer)
{
int bufLen = (buffer.GetLength() + 1) * sizeof(wchar_t);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
|