summaryrefslogtreecommitdiff
path: root/plugins/ShellExt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/ShellExt
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ShellExt')
-rw-r--r--plugins/ShellExt/src/main.cpp10
-rw-r--r--plugins/ShellExt/src/options.cpp12
-rw-r--r--plugins/ShellExt/src/shlcom.cpp4
-rw-r--r--plugins/ShellExt/src/utils.cpp4
4 files changed, 15 insertions, 15 deletions
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 83d5842fb2..1c16adb12d 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -6,7 +6,7 @@ HINSTANCE hInst;
int hLangpack;
bool bIsVistaPlus;
-TCHAR tszLogPath[MAX_PATH];
+wchar_t tszLogPath[MAX_PATH];
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
@@ -28,7 +28,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
bIsVistaPlus = GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetProductInfo") != NULL;
GetTempPath(_countof(tszLogPath), tszLogPath);
- _tcscat_s(tszLogPath, _countof(tszLogPath), L"shlext.log");
+ wcscat_s(tszLogPath, _countof(tszLogPath), L"shlext.log");
hInst = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
@@ -83,7 +83,7 @@ STDAPI DllCanUnloadNow()
struct HRegKey
{
- HRegKey(HKEY hRoot, const TCHAR *ptszKey) : m_key(NULL)
+ HRegKey(HKEY hRoot, const wchar_t *ptszKey) : m_key(NULL)
{ RegCreateKeyEx(hRoot, ptszKey, 0, 0, 0, KEY_SET_VALUE | KEY_CREATE_SUB_KEY, 0, &m_key, 0);
}
@@ -127,9 +127,9 @@ STDAPI DllRegisterServer()
if (kInprocServer == NULL)
return E_FAIL;
- TCHAR tszFileName[MAX_PATH];
+ wchar_t tszFileName[MAX_PATH];
GetModuleFileName(hInst, tszFileName, _countof(tszFileName));
- if ( RegSetValueEx(kInprocServer, NULL, 0, REG_SZ, (LPBYTE)tszFileName, sizeof(TCHAR)*(lstrlen(tszFileName)+1)))
+ if ( RegSetValueEx(kInprocServer, NULL, 0, REG_SZ, (LPBYTE)tszFileName, sizeof(wchar_t)*(lstrlen(tszFileName)+1)))
return E_FAIL;
if ( RegSetValueExA(kInprocServer, "ThreadingModel", 0, REG_SZ, (PBYTE)str4, sizeof(str4)))
return E_FAIL;
diff --git a/plugins/ShellExt/src/options.cpp b/plugins/ShellExt/src/options.cpp
index 0a0c837ee4..e052f2fda7 100644
--- a/plugins/ShellExt/src/options.cpp
+++ b/plugins/ShellExt/src/options.cpp
@@ -7,7 +7,7 @@ static void AutoSize(HWND hwnd)
HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
HFONT hOldFont = (HFONT)SelectObject(hDC, hFont);
- TCHAR szBuf[MAX_PATH];
+ wchar_t szBuf[MAX_PATH];
int i = GetWindowText(hwnd, szBuf, _countof(szBuf));
SIZE tS;
@@ -20,16 +20,16 @@ static void AutoSize(HWND hwnd)
////////////////////////////////////////////////////////////////////////////////////////////
-static TCHAR* COM_OKSTR[2] = {
- LPGENT("Problem, registration missing/deleted."),
- LPGENT("Successfully created shell registration.") };
-static TCHAR* COM_APPROVEDSTR[2] = { LPGENT("Not Approved"), LPGENT("Approved") };
+static wchar_t* COM_OKSTR[2] = {
+ LPGENW("Problem, registration missing/deleted."),
+ LPGENW("Successfully created shell registration.") };
+static wchar_t* COM_APPROVEDSTR[2] = { LPGENW("Not Approved"), LPGENW("Approved") };
static void InitControls(HWND hwndDlg)
{
int comReg = IsCOMRegistered();
- TCHAR szBuf[MAX_PATH];
+ wchar_t szBuf[MAX_PATH];
mir_sntprintf(szBuf, L"%s (%s)",
TranslateTS(COM_OKSTR[(comReg & COMREG_OK) != 0]),
TranslateTS(COM_APPROVEDSTR[(comReg & COMREG_APPROVED) != 0]));
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 17915853ec..f711fb1512 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -550,7 +550,7 @@ void CheckUnregisterServer()
{
if (bIsVistaPlus) {
// launches regsvr to remove the dll under admin.
- TCHAR szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
+ wchar_t szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
GetModuleFileName(hInst, szFileName, _countof(szFileName));
mir_sntprintf(szBuf, L"/s /u \"%s\"", szFileName);
@@ -570,7 +570,7 @@ void CheckUnregisterServer()
// for permission before installing the shell extension. note the filepath arg has to be quoted }
void CheckRegisterServer()
{
- TCHAR szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
+ wchar_t szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
HKEY hRegKey;
if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"miranda.shlext", 0, KEY_READ, &hRegKey))
diff --git a/plugins/ShellExt/src/utils.cpp b/plugins/ShellExt/src/utils.cpp
index 834850073d..275224388e 100644
--- a/plugins/ShellExt/src/utils.cpp
+++ b/plugins/ShellExt/src/utils.cpp
@@ -1,11 +1,11 @@
#include "stdafx.h"
#ifdef LOG_ENABLED
-extern TCHAR tszLogPath[];
+extern wchar_t tszLogPath[];
void logA(const char *format, ...)
{
- FILE *out = _tfopen(tszLogPath, L"a+");
+ FILE *out = _wfopen(tszLogPath, L"a+");
if (out) {
va_list args;
va_start(args, format);