summaryrefslogtreecommitdiff
path: root/plugins/AutoRun
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/AutoRun
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/AutoRun')
-rw-r--r--plugins/AutoRun/src/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp
index 8d0a3109eb..7781742096 100644
--- a/plugins/AutoRun/src/main.cpp
+++ b/plugins/AutoRun/src/main.cpp
@@ -24,13 +24,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
return TRUE;
}
-void GetProfilePath(TCHAR *res, size_t resLen)
+void GetProfilePath(wchar_t *res, size_t resLen)
{
- TCHAR dbname[MAX_PATH], exename[MAX_PATH];
+ wchar_t dbname[MAX_PATH], exename[MAX_PATH];
CallService(MS_DB_GETPROFILENAMET, _countof(dbname), (LPARAM)dbname);
GetModuleFileName(NULL, exename, _countof(exename));
- TCHAR *p = _tcsrchr(dbname, '.');
+ wchar_t *p = wcsrchr(dbname, '.');
if (p) *p = 0;
mir_sntprintf(res, resLen, L"\"%s\" \"/profile:%s\"", exename, dbname);
@@ -43,9 +43,9 @@ static void SetAutorun(BOOL autorun)
switch (autorun) {
case TRUE:
if ( RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, NULL, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,NULL,&hKey,&dw) == ERROR_SUCCESS) {
- TCHAR result[MAX_PATH];
+ wchar_t result[MAX_PATH];
GetProfilePath(result, _countof(result));
- RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (BYTE*)result, sizeof(TCHAR)*(DWORD)mir_tstrlen(result));
+ RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (BYTE*)result, sizeof(wchar_t)*(DWORD)mir_tstrlen(result));
RegCloseKey(hKey);
}
break;
@@ -64,7 +64,7 @@ static BOOL CmpCurrentAndRegistry()
if ( RegOpenKeyEx(ROOT_KEY, SUB_KEY, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
return FALSE;
- TCHAR result[MAX_PATH], dbpath[MAX_PATH];
+ wchar_t result[MAX_PATH], dbpath[MAX_PATH];
DWORD dwBufLen = MAX_PATH;
if ( RegQueryValueEx(hKey, L"MirandaNG", NULL, NULL, (LPBYTE)dbpath, &dwBufLen) != ERROR_SUCCESS)
return FALSE;