diff options
Diffstat (limited to 'plugins/CrashDumper/src')
-rw-r--r-- | plugins/CrashDumper/src/crshdmp.cpp | 18 | ||||
-rw-r--r-- | plugins/CrashDumper/src/dumper.cpp | 68 | ||||
-rw-r--r-- | plugins/CrashDumper/src/exhndlr.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/stdafx.h | 10 | ||||
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 4 | ||||
-rw-r--r-- | plugins/CrashDumper/src/upload.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/utils.cpp | 22 |
7 files changed, 63 insertions, 63 deletions
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 1d6692ca26..5c96a12456 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -27,11 +27,11 @@ LCID packlcid; HANDLE hVerInfoFolder;
HMODULE hMsftedit;
-TCHAR* vertxt;
-TCHAR* profname;
-TCHAR* profpath;
+wchar_t* vertxt;
+wchar_t* profname;
+wchar_t* profpath;
-TCHAR CrashLogFolder[MAX_PATH], VersionInfoFolder[MAX_PATH];
+wchar_t CrashLogFolder[MAX_PATH], VersionInfoFolder[MAX_PATH];
bool servicemode, clsdates, dtsubfldr, catchcrashes, needrestart = 0;
@@ -67,7 +67,7 @@ INT_PTR StoreVersionInfoToFile(WPARAM, LPARAM lParam) {
CreateDirectoryTreeT(VersionInfoFolder);
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
mir_sntprintf(path, TEXT("%s\\VersionInfo.txt"), VersionInfoFolder);
HANDLE hDumpFile = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -158,10 +158,10 @@ INT_PTR CopyLinkToClipboard(WPARAM, LPARAM) {
ptrT tmp(db_get_wsa(NULL, PluginName, "Username"));
if (tmp != NULL) {
- TCHAR buffer[MAX_PATH];
+ wchar_t buffer[MAX_PATH];
mir_sntprintf(buffer, L"http://vi.miranda-ng.org/detail/%s", tmp);
- int bufLen = (sizeof(buffer) + 1) * sizeof(TCHAR);
+ int bufLen = (sizeof(buffer) + 1) * sizeof(wchar_t);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
LPSTR buf = (LPSTR)GlobalLock(hData);
memcpy(buf, buffer, bufLen);
@@ -256,7 +256,7 @@ static int ModulesLoaded(WPARAM, LPARAM) }
CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));
+ mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Version Information"), 2000089999, GetIconHandle(IDI_VI));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "9A7A9C76-7FD8-4C05-B402-6C46060C2D78");
SET_UID(mi, 0x52930e40, 0xb2ee, 0x4433, 0xad, 0x77, 0xf5, 0x42, 0xe, 0xf6, 0x57, 0xc1);
@@ -369,7 +369,7 @@ extern "C" int __declspec(dllexport) Load(void) profpath = Utils_ReplaceVarsT(L"%miranda_userdata%");
if (catchcrashes && !needrestart)
mir_sntprintf(CrashLogFolder, TEXT("%s\\CrashLog"), profpath);
- _tcsncpy_s(VersionInfoFolder, profpath, _TRUNCATE);
+ wcsncpy_s(VersionInfoFolder, profpath, _TRUNCATE);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 0ea80781bd..3fa432aa47 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -18,9 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
-extern TCHAR* vertxt;
-extern TCHAR* profname;
-extern TCHAR* profpath;
+extern wchar_t* vertxt;
+extern wchar_t* profname;
+extern wchar_t* profpath;
void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr)
{
@@ -36,8 +36,8 @@ void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr) void WriteBBFile(CMString& buffer, bool hdr)
{
- static const TCHAR header[] = TEXT("[spoiler=VersionInfo][quote]");
- static const TCHAR footer[] = TEXT("[/quote][/spoiler]");
+ static const wchar_t header[] = TEXT("[spoiler=VersionInfo][quote]");
+ static const wchar_t footer[] = TEXT("[/quote][/spoiler]");
buffer.Append(hdr ? header : footer);
}
@@ -59,14 +59,14 @@ BOOL CALLBACK LoadedModules64(LPCSTR, DWORD64 ModuleBase, ULONG ModuleSize, PVOI const HMODULE hModule = (HMODULE)ModuleBase;
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
GetModuleFileName(hModule, path, MAX_PATH);
buffer.AppendFormat(TEXT("%s %p - %p"), path, (void*)ModuleBase, (void*)(ModuleBase + ModuleSize));
GetVersionInfo(hModule, buffer);
- TCHAR timebuf[30] = TEXT("");
+ wchar_t timebuf[30] = TEXT("");
GetLastWriteTime(path, timebuf, 30);
buffer.AppendFormat(TEXT(" [%s]\r\n"), timebuf);
@@ -100,7 +100,7 @@ BOOL CALLBACK LoadedModulesFind64(LPCSTR ModuleName, DWORD64 ModuleBase, ULONG M }
-void GetLinkedModulesInfo(TCHAR *moduleName, CMString &buffer)
+void GetLinkedModulesInfo(wchar_t *moduleName, CMString &buffer)
{
HANDLE hDllFile = CreateFile(moduleName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDllFile == INVALID_HANDLE_VALUE)
@@ -114,7 +114,7 @@ void GetLinkedModulesInfo(TCHAR *moduleName, CMString &buffer) LPVOID dllAddr = MapViewOfFile(hDllMapping, FILE_MAP_READ, 0, 0, 0);
- static const TCHAR format[] = TEXT(" Plugin statically linked to missing module: %S\r\n");
+ static const wchar_t format[] = TEXT(" Plugin statically linked to missing module: %S\r\n");
__try {
PIMAGE_NT_HEADERS nthdrs = ImageNtHeader(dllAddr);
@@ -173,10 +173,10 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) {
buffer.AppendFormat(TEXT("Service Mode: %s\r\n"), servicemode ? TEXT("Yes") : TEXT("No"));
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
- LPTSTR fname = _tcsrchr(path, TEXT('\\'));
+ LPTSTR fname = wcsrchr(path, TEXT('\\'));
if (fname == NULL) fname = path;
mir_sntprintf(fname, MAX_PATH - (fname - path), TEXT("\\plugins\\*.dll"));
@@ -189,7 +189,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) CMString ubuffer;
ListItem* dlllist = NULL;
- static const TCHAR format[] = TEXT("\xa4 %s v.%s%d.%d.%d.%d%s [%s] - %S %s\r\n");
+ static const wchar_t format[] = TEXT("\xa4 %s v.%s%d.%d.%d.%d%s [%s] - %S %s\r\n");
do {
bool loaded = false;
@@ -201,7 +201,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) }
if (hModule == NULL) {
if ((flags & VI_FLAG_PRNVAR) && IsPluginEnabled(FindFileData.cFileName)) {
- TCHAR timebuf[30] = TEXT("");
+ wchar_t timebuf[30] = TEXT("");
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
ubuffer.AppendFormat(format, FindFileData.cFileName,
@@ -220,10 +220,10 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) PLUGININFOEX* pi = GetMirInfo(hModule);
if (pi != NULL) {
- TCHAR timebuf[30] = TEXT("");
+ wchar_t timebuf[30] = TEXT("");
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
- const TCHAR *unica = !(((PLUGININFOEX*)pi)->flags & UNICODE_AWARE) ? TEXT("|ANSI|") : TEXT("");
+ const wchar_t *unica = !(((PLUGININFOEX*)pi)->flags & UNICODE_AWARE) ? TEXT("|ANSI|") : TEXT("");
ListItem* lst = new ListItem;
int v1, v2, v3, v4;
@@ -345,17 +345,17 @@ static void GetProtocolStrings(CMString& buffer) for (i = 0; i < protoCountMy; i++)
buffer.AppendFormat(TEXT("%-24s %d - Enabled %d - Disabled %sLoaded\r\n"),
- (TCHAR*)_A2T(protoListMy[i]), protos[i].countse,
+ (wchar_t*)_A2T(protoListMy[i]), protos[i].countse,
protos[i].countsd, protos[i].nloaded ? L"Not " : L"");
}
static void GetWeatherStrings(CMString& buffer, unsigned flags)
{
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
- LPTSTR fname = _tcsrchr(path, TEXT('\\'));
+ LPTSTR fname = wcsrchr(path, TEXT('\\'));
if (fname == NULL) fname = path;
mir_sntprintf(fname, MAX_PATH - (fname - path), TEXT("\\plugins\\weather\\*.ini"));
@@ -399,11 +399,11 @@ static void GetWeatherStrings(CMString& buffer, unsigned flags) id += 5;
}
- TCHAR timebuf[30] = TEXT("");
+ wchar_t timebuf[30] = TEXT("");
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
- static const TCHAR format[] = TEXT(" %s v.%s%S%s [%s] - %S\r\n");
+ static const wchar_t format[] = TEXT(" %s v.%s%S%s [%s] - %S\r\n");
buffer.AppendFormat(format, FindFileData.cFileName,
(flags & VI_FLAG_FORMAT) ? TEXT("[b]") : TEXT(""),
@@ -419,10 +419,10 @@ static void GetWeatherStrings(CMString& buffer, unsigned flags) static void GetIconStrings(CMString& buffer)
{
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
- LPTSTR fname = _tcsrchr(path, TEXT('\\'));
+ LPTSTR fname = wcsrchr(path, TEXT('\\'));
if (fname == NULL) fname = path;
mir_sntprintf(fname, MAX_PATH - (fname - path), TEXT("\\Icons\\*.*"));
@@ -433,7 +433,7 @@ static void GetIconStrings(CMString& buffer) do {
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue;
- TCHAR timebuf[30] = TEXT("");
+ wchar_t timebuf[30] = TEXT("");
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
buffer.AppendFormat(TEXT(" %s [%s]\r\n"), FindFileData.cFileName, timebuf);
@@ -450,7 +450,7 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) GetFreeMemoryString(buffer);
buffer.Append(L"\r\n");
- TCHAR tszOsVer[200];
+ wchar_t tszOsVer[200];
GetOSDisplayString(tszOsVer, _countof(tszOsVer));
buffer.Append(tszOsVer);
buffer.Append(L"\r\n");
@@ -464,7 +464,7 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) GetLanguageString(buffer);
buffer.Append(L"\r\n");
- TCHAR *profpathfull = Utils_ReplaceVarsT(profpath);
+ wchar_t *profpathfull = Utils_ReplaceVarsT(profpath);
if (flags & VI_FLAG_PRNVAR) {
GetFreeDiskString(profpathfull, buffer);
buffer.Append(L"\r\n");
@@ -474,12 +474,12 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) GetWow64String(buffer);
buffer.Append(L"\r\n");
- TCHAR path[MAX_PATH], mirtime[30];
+ wchar_t path[MAX_PATH], mirtime[30];
GetModuleFileName(NULL, path, MAX_PATH);
GetLastWriteTime(path, mirtime, 30);
buffer.AppendFormat(TEXT("Build time: %s\r\n"), mirtime);
- TCHAR profpn[MAX_PATH];
+ wchar_t profpn[MAX_PATH];
mir_sntprintf(profpn, TEXT("%s\\%s"), profpathfull, profname);
DATABASELINK *db = FindDatabasePlugin(profpn);
@@ -505,8 +505,8 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) GetLanguagePackString(buffer);
buffer.Append(L"\r\n");
- // buffer.AppendFormat(TEXT("Nightly: %s\r\n"), _tcsstr(vertxt, TEXT("alpha")) ? TEXT("Yes") : TEXT("No"));
- // buffer.AppendFormat(TEXT("Unicode: %s\r\n"), _tcsstr(vertxt, TEXT("Unicode")) ? TEXT("Yes") : TEXT("No"));
+ // buffer.AppendFormat(TEXT("Nightly: %s\r\n"), wcsstr(vertxt, TEXT("alpha")) ? TEXT("Yes") : TEXT("No"));
+ // buffer.AppendFormat(TEXT("Unicode: %s\r\n"), wcsstr(vertxt, TEXT("Unicode")) ? TEXT("Yes") : TEXT("No"));
GetPluginsString(buffer, flags);
@@ -541,7 +541,7 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) }
-void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHAR* msg)
+void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wchar_t* msg)
{
if (exc_ptr->ContextRecord == NULL || (exc_ptr->ContextRecord->ContextFlags & CONTEXT_CONTROL) == 0)
return;
@@ -573,7 +573,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA const PLUGININFOEX *pluginInfoEx = GetPluginInfoEx();
- TCHAR curtime[30];
+ wchar_t curtime[30];
GetISO8061Time(NULL, curtime, 30);
CMString buffer;
@@ -596,7 +596,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA buffer.Append(TEXT("\r\nStack Trace:\r\n---------------------------------------------------------------\r\n"));
for (int i = 81; --i;) {
- char symbuf[sizeof(IMAGEHLP_SYMBOL64) + MAX_SYM_NAME * sizeof(TCHAR) + 4] = { 0 };
+ char symbuf[sizeof(IMAGEHLP_SYMBOL64) + MAX_SYM_NAME * sizeof(wchar_t) + 4] = { 0 };
PIMAGEHLP_SYMBOL64 pSym = (PIMAGEHLP_SYMBOL64)symbuf;
pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
pSym->MaxNameLength = MAX_SYM_NAME;
@@ -651,7 +651,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA HMODULE hModule = (HMODULE)Module.BaseOfImage;
PLUGININFOEX *pi = GetMirInfo(hModule);
if (pi != NULL) {
- static const TCHAR formatc[] = TEXT("\r\nLikely cause of the crash plugin: %S\r\n\r\n");
+ static const wchar_t formatc[] = TEXT("\r\nLikely cause of the crash plugin: %S\r\n\r\n");
if (pi->shortName) {
CMString crashcause;
@@ -663,7 +663,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA }
- static const TCHAR formatd[] = TEXT("%p (%S %p): %S (%d): %S\r\n");
+ static const wchar_t formatd[] = TEXT("%p (%S %p): %S (%d): %S\r\n");
buffer.AppendFormat(formatd, (void*)frame.AddrPC.Offset, moduleName, (void*)Module.BaseOfImage,lineFileName, Line.LineNumber, name);
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index c690bdc9d2..6fbace54c1 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -46,7 +46,7 @@ int myDebugFilter(unsigned int code, PEXCEPTION_POINTERS ep) void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify)
{
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
SYSTEMTIME st;
HANDLE hDumpFile = NULL;
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h index 64b86b2da7..f7abf43d21 100644 --- a/plugins/CrashDumper/src/stdafx.h +++ b/plugins/CrashDumper/src/stdafx.h @@ -92,8 +92,8 @@ extern DWORD mirandaVersion; extern LCID packlcid;
extern bool servicemode, clsdates, dtsubfldr, catchcrashes, needrestart;
-extern TCHAR CrashLogFolder[MAX_PATH];
-extern TCHAR VersionInfoFolder[MAX_PATH];
+extern wchar_t CrashLogFolder[MAX_PATH];
+extern wchar_t VersionInfoFolder[MAX_PATH];
void WriteBBFile(CMString& buffer, bool hdr);
void WriteUtfFile(HANDLE hDumpFile, char* bufu);
@@ -119,14 +119,14 @@ void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer); void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize);
void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, DWORD dwSize);
void StoreStringToClip(CMString& buffer);
-void ShowMessage(int type, const TCHAR* format, ...);
-bool IsPluginEnabled(TCHAR* filename);
+void ShowMessage(int type, const wchar_t* format, ...);
+bool IsPluginEnabled(wchar_t* filename);
PLUGININFOEX* GetMirInfo(HMODULE hModule);
const PLUGININFOEX* GetPluginInfoEx(void);
void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
-void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHAR* msg);
+void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wchar_t* msg);
void PrintVersionInfo(CMString& buffer, unsigned flags = VI_FLAG_PRNVAR);
bool ProcessVIHash(bool store);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 34f82b15a3..14e018aa2f 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -278,7 +278,7 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) break;
case 3:
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
mir_sntprintf(path, TEXT("%s\\VersionInfo.txt"), VersionInfoFolder);
ShellExecute(NULL, TEXT("open"), path, NULL, NULL, SW_SHOW);
break;
@@ -295,7 +295,7 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) return DefWindowProc(hWnd, msg, wParam, lParam);
}
-void ShowMessage(int type, const TCHAR* format, ...)
+void ShowMessage(int type, const wchar_t* format, ...)
{
POPUPDATAT pi = { 0 };
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp index fbd87e2f5c..ad180b0589 100644 --- a/plugins/CrashDumper/src/upload.cpp +++ b/plugins/CrashDumper/src/upload.cpp @@ -235,7 +235,7 @@ bool ProcessVIHash(bool store) mir_md5_state_t context;
mir_md5_init(&context);
- mir_md5_append(&context, (PBYTE)buffer.c_str(), buffer.GetLength()*sizeof(TCHAR));
+ mir_md5_append(&context, (PBYTE)buffer.c_str(), buffer.GetLength()*sizeof(wchar_t));
mir_md5_finish(&context, hash);
char hashstr[40];
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index 4abad60ed6..356bf6a8a1 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -105,9 +105,9 @@ void GetInternetExplorerVersion(CMString &buffer) HKEY hKey;
DWORD size;
- TCHAR ieVersion[1024] = { 0 };
- TCHAR ieBuild[512] = { 0 };
- TCHAR iVer[64] = { 0 };
+ wchar_t ieVersion[1024] = { 0 };
+ wchar_t ieBuild[512] = { 0 };
+ wchar_t iVer[64] = { 0 };
if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Internet Explorer"), 0, KEY_QUERY_VALUE, &hKey)) {
size = _countof(ieBuild);
@@ -144,9 +144,9 @@ void GetInternetExplorerVersion(CMString &buffer) buffer.AppendFormat(TEXT(" (build %s)"), ieBuild);
}
-void TrimMultiSpaces(TCHAR *str)
+void TrimMultiSpaces(wchar_t *str)
{
- TCHAR *src = str, *dest = str;
+ wchar_t *src = str, *dest = str;
bool trimst = false;
for (;;) {
@@ -169,8 +169,8 @@ void GetProcessorString(CMString &buffer) HKEY hKey;
DWORD size;
- TCHAR cpuIdent[512] = { 0 };
- TCHAR cpuName[512] = { 0 };
+ wchar_t cpuIdent[512] = { 0 };
+ wchar_t cpuName[512] = { 0 };
if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hKey)) {
size = _countof(cpuName);
@@ -343,7 +343,7 @@ void GetAdminString(CMString &buffer) void GetLanguageString(CMString &buffer)
{
- TCHAR name1[256], name2[256], name3[256], name4[256];
+ wchar_t name1[256], name2[256], name3[256], name4[256];
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SENGLANGUAGE, name1, 256);
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, name2, 256);
@@ -358,7 +358,7 @@ void GetLanguagePackString(CMString &buffer) {
buffer.Append(TEXT("Language pack: "));
if (packlcid != LOCALE_USER_DEFAULT) {
- TCHAR lang[MAX_PATH], ctry[MAX_PATH];
+ wchar_t lang[MAX_PATH], ctry[MAX_PATH];
if (GetLocaleInfo(packlcid, LOCALE_SENGLANGUAGE, lang, MAX_PATH)) {
if (GetLocaleInfo(packlcid, LOCALE_SISO3166CTRYNAME, ctry, MAX_PATH))
buffer.AppendFormat(TEXT("%s (%s) [%04x]"), lang, ctry, packlcid);
@@ -408,7 +408,7 @@ void GetVersionInfo(HMODULE hLib, CMString& buffer) void StoreStringToClip(CMString& buffer)
{
- int bufLen = (buffer.GetLength() + 1) * sizeof(TCHAR);
+ int bufLen = (buffer.GetLength() + 1) * sizeof(wchar_t);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
LPSTR buf = (LPSTR)GlobalLock(hData);
@@ -425,7 +425,7 @@ void StoreStringToClip(CMString& buffer) }
}
-bool IsPluginEnabled(TCHAR* filename)
+bool IsPluginEnabled(wchar_t* filename)
{
char* fname;
crsi_t2a(fname, filename);
|