summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:52:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:52:26 +0000
commit427891e0d28becb428ae8435954399f2e4daa9fe (patch)
treed4ec79359e9b35293c3ff7ca25ccda6fd71f23b4
parentec4498ee255a018ccb16061de4594618e7ab5690 (diff)
service call replaced with helper: MS_UTILS_PATHTOABSOLUTEW
git-svn-id: http://svn.miranda-ng.org/main/trunk@3827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_core.h10
-rw-r--r--plugins/AVS/src/image_utils.cpp4
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/Misc.h2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp19
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp9
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp19
-rw-r--r--plugins/Clist_mw/src/BkgrCfg.cpp6
-rw-r--r--plugins/Clist_mw/src/clcopts.cpp26
-rw-r--r--plugins/Clist_mw/src/clui.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp3
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp2
-rw-r--r--plugins/FlashAvatars/src/cflash.cpp15
-rw-r--r--plugins/IEView/src/Options.cpp48
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/Utils.cpp2
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp2
-rwxr-xr-xplugins/New_GPG/src/gpg_wrapper.cpp6
-rwxr-xr-xplugins/New_GPG/src/main.cpp24
-rwxr-xr-xplugins/New_GPG/src/options.cpp4
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp4
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp2
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp2
-rw-r--r--plugins/Scriver/src/chat/options.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/mir_icolib.cpp18
-rw-r--r--plugins/SmileyAdd/src/general.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp10
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp17
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp2
-rw-r--r--plugins/VersionInfo/src/utils.cpp4
-rw-r--r--plugins/YAMN/src/main.cpp8
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp2
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp2
-rw-r--r--src/core/stdchat/src/options.cpp4
-rw-r--r--src/core/stdclist/src/clcopts.cpp9
-rw-r--r--src/mir_core/langpack.cpp4
-rw-r--r--src/modules/database/database.cpp4
-rw-r--r--src/modules/database/dbini.cpp6
-rw-r--r--src/modules/icolib/skin2icons.cpp8
-rw-r--r--src/modules/icolib/skin2opts.cpp2
-rw-r--r--src/modules/netlib/netliblog.cpp4
-rw-r--r--src/modules/plugins/newplugins.cpp2
-rw-r--r--src/modules/skin/sounds.cpp8
-rw-r--r--src/modules/utils/bmpfilter.cpp2
-rw-r--r--src/modules/utils/path.cpp2
50 files changed, 163 insertions, 198 deletions
diff --git a/include/m_core.h b/include/m_core.h
index a27b993623..62ce2a594c 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -361,14 +361,20 @@ MIR_CORE_DLL(HINSTANCE) GetInstByAddress(void* codePtr);
MIR_CORE_DLL(void) CreatePathToFile(char* wszFilePath);
MIR_CORE_DLL(int) CreateDirectoryTree(const char* szDir);
-MIR_CORE_DLL(int) PathToAbsolute(const char *pSrc, char *pOut, char* base);
MIR_CORE_DLL(int) PathToRelative(const char *pSrc, char *pOut);
MIR_CORE_DLL(void) CreatePathToFileW(WCHAR* wszFilePath);
MIR_CORE_DLL(int) CreateDirectoryTreeW(const WCHAR* szDir);
-MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, WCHAR* base);
MIR_CORE_DLL(int) PathToRelativeW(const WCHAR *pSrc, WCHAR *pOut);
+#if defined( __cplusplus )
+ MIR_CORE_DLL(int) PathToAbsolute(const char *pSrc, char *pOut, char* base=0);
+ MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, WCHAR* base=0);
+#else
+ MIR_CORE_DLL(int) PathToAbsolute(const char *pSrc, char *pOut, char* base);
+ MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, WCHAR* base);
+#endif
+
#define CreatePathToFileT CreatePathToFileW
#define CreateDirectoryTreeT CreateDirectoryTreeW
#define PathToAbsoluteT PathToAbsoluteW
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 35cb33259a..4c1d830711 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -307,7 +307,7 @@ INT_PTR BmpFilterSaveBitmap(WPARAM wParam,LPARAM lParam)
const char *szFile = (const char*)lParam;
char szFilename[MAX_PATH];
- if ( !CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szFile, (LPARAM)szFilename))
+ if ( !PathToAbsolute(szFile, szFilename))
mir_snprintf(szFilename, SIZEOF(szFilename), "%s", szFile);
int filenameLen = lstrlenA( szFilename );
@@ -324,7 +324,7 @@ INT_PTR BmpFilterSaveBitmapW(WPARAM wParam,LPARAM lParam)
const wchar_t *wszFile = (const wchar_t *)lParam;
wchar_t wszFilename[MAX_PATH];
- if ( !CallService(MS_UTILS_PATHTOABSOLUTEW, (WPARAM)wszFile, (LPARAM)wszFilename))
+ if ( !PathToAbsoluteW(wszFile, wszFilename))
mir_sntprintf(wszFilename, SIZEOF(wszFilename), _T("%s"), wszFile);
int filenameLen = lstrlenW( wszFilename );
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp
index 2ea9980597..cc2a58828a 100644
--- a/plugins/AssocMgr/src/assoclist.cpp
+++ b/plugins/AssocMgr/src/assoclist.cpp
@@ -96,7 +96,7 @@ void CleanupAssocEnabledSettings(void)
pszSuffix = &ppszSettings[i][8];
mir_snprintf(szSetting, sizeof(szSetting), "module_%s", pszSuffix);
if (!DBGetContactSettingTString(NULL, "AssocMgr", szSetting, &dbv)) {
- if(CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)dbv.ptszVal, (LPARAM)szDLL)) {
+ if( PathToAbsoluteT(dbv.ptszVal, szDLL)) {
/* file still exists? */
hFile = CreateFile(szDLL, 0, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
if(hFile == INVALID_HANDLE_VALUE) {
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index f06469adef..c79374a1ec 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -464,7 +464,7 @@ int FillAvatarListFromDB(HWND list, HANDLE hContact)
// Get file in disk
char path[MAX_PATH] = "";
- CallService(MS_UTILS_PATHTOABSOLUTE,(WPARAM) (char *) &dbei.pBlob[i+1],(LPARAM)path);
+ PathToAbsolute((char*)&dbei.pBlob[i+1], path);
TCHAR *filename = mir_a2t(path);
// Add to list
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index dcc2679bcd..4c33dfa38a 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -901,7 +901,7 @@ void * GetHistoryEventText(HANDLE hContact, HANDLE hDbEvent, DBEVENTINFO *dbe, i
if (dbe->pBlob[i] != 0)
{
TCHAR absFile[MAX_PATH] = _T("");
- CallService(MS_UTILS_PATHTOABSOLUTET,(WPARAM) &dbe->pBlob[i], (LPARAM)absFile);
+ PathToAbsoluteT((TCHAR*)&dbe->pBlob[i], absFile);
if(absFile != NULL)
{
HBITMAP hBmp = (HBITMAP) CallService(MS_IMG_LOAD, (WPARAM) absFile, IMGL_TCHAR);
diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h
index 9ef8337636..6853fcc442 100644
--- a/plugins/ClientChangeNotify/src/Misc.h
+++ b/plugins/ClientChangeNotify/src/Misc.h
@@ -53,7 +53,7 @@ __inline TCString Path_ToAbsolute(TCString &Path)
{
CString Str;
Str.GetBuffer(MAX_PATH);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)(const char*)TCHAR2ANSI(Path), (LPARAM)(char*)Str);
+ PathToAbsolute( TCHAR2ANSI(Path), Str);
Str.ReleaseBuffer();
return ANSI2TCHAR(Str);
}
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 107a46958f..4dd2d44ec8 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -587,15 +587,14 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_SELBKCOLOUR);
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR, 0, db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
{
- DBVARIANT dbv = {0};
- if ( !DBGetContactSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
+ DBVARIANT dbv;
+ if ( !DBGetContactSettingString(NULL, "StatusBar", "BkBitmap", &dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
- if ( ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)szPath))
- SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
- }
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
+
db_free(&dbv);
}
}
@@ -1497,7 +1496,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,module,"BkBitmap",&dbv))
{
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)dat->item[indx].filename);
+ int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
@@ -1670,9 +1669,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
db_set_b(NULL, module, "UseWinColours", (BYTE)dat->item[indx].useWinColours);
char str[MAX_PATH];
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE,
- (WPARAM)dat->item[indx].filename,
- (LPARAM)str);
+ int retval = PathToAbsolute(dat->item[indx].filename, str);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
db_set_s(NULL, module, "BkBitmap", dat->item[indx].filename);
else
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 3fd7ed5423..b8fb2365c3 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -894,8 +894,9 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
char szRelativePath[MAX_PATH];
GetModuleFileNameA(GetModuleHandle(NULL), szRelativePath, MAX_PATH);
char *str = strrchr( szRelativePath, '\\' );
- if ( str != NULL ) *str = 0;
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szRelativePath, (LPARAM)szFolderPath);
+ if (str != NULL)
+ *str = 0;
+ PathToAbsolute(szRelativePath, szFolderPath);
}
if ( szAccoName ) {
@@ -934,7 +935,7 @@ static HICON CLUI_ExtractIconFromPath(const char *path, BOOL * needFree)
comma = strrchr(file,',');
if (comma == NULL) n = 0;
else {n = atoi(comma+1); *comma = 0;}
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
hIcon = NULL;
ExtractIconExA(fileFull,n,NULL,&hIcon,1);
if (needFree)
@@ -1648,7 +1649,7 @@ HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDes
sid.ptszDefaultFile = fileFull;
if (tszDefaultFile) {
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)tszDefaultFile, (LPARAM)fileFull);
+ PathToAbsoluteT(tszDefaultFile, fileFull);
if ( !FileExists(fileFull))
fileFull[0] = _T('\0');
}
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index d86d025d4a..1deee93360 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -1778,13 +1778,13 @@ int ske_GetFullFilename(char * buf, char *file, char * skinfolder,BOOL madeAbsol
_snprintf(b2, MAX_PATH,"%s\\%s",(skinfolder == NULL)?SkinPlace:((INT_PTR)skinfolder != -1)?skinfolder:"",file);
else
_snprintf(b2, MAX_PATH,"%s",file);
- if (madeAbsolute)
+ if (madeAbsolute) {
if (b2[0] == '\\' && b2[1] != '\\')
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)(b2+1), (LPARAM)buf);
+ PathToAbsolute(b2+1, buf);
else
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)(b2), (LPARAM)buf);
- else
- memcpy(buf,b2,MAX_PATH);
+ PathToAbsolute(b2, buf);
+ }
+ else memcpy(buf,b2,MAX_PATH);
mir_free(SkinPlace);
return 0;
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index 522446fd62..0d804d46bc 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -345,7 +345,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
GetPrivateProfileString( _T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, SIZEOF( imfn ), sd->File );
IniParser::GetSkinFolder( sd->File, skinfolder );
_sntprintf( prfn, SIZEOF( prfn ), _T("%s\\%s"), skinfolder, imfn );
- CallService( MS_UTILS_PATHTOABSOLUTET, (WPARAM)prfn, (LPARAM) imfn );
+ PathToAbsoluteT(prfn, imfn);
char * imfn_ch = mir_t2a( imfn );
hPreviewBitmap = ske_LoadGlyphImage( imfn_ch );
mir_free( imfn_ch );
@@ -477,8 +477,8 @@ HTREEITEM FillAvailableSkinList( HWND hwndDlg )
TCHAR *SkinsFolder = DBGetStringT( NULL, "ModernData", "SkinsFolder");
if ( !SkinsFolder ) SkinsFolder = mir_tstrdup( _T("Skins"));
- CallService( MS_UTILS_PATHTOABSOLUTET, (WPARAM)SkinsFolder, (LPARAM)path );
- mir_free_and_nil( SkinsFolder );
+ PathToAbsoluteT(SkinsFolder, path);
+ mir_free_and_nil(SkinsFolder);
AddSkinToList( hwndDlg, TranslateT("Default Skin"), _T("%Default Skin%"));
attrib = GetFileAttributes( path );
@@ -488,10 +488,9 @@ HTREEITEM FillAvailableSkinList( HWND hwndDlg )
TCHAR * skinfile;
TCHAR skinfull[MAX_PATH];
skinfile = DBGetStringT( NULL, SKIN, "SkinFile");
- if ( skinfile )
- {
- CallService( MS_UTILS_PATHTOABSOLUTET, (WPARAM)skinfile, (LPARAM)skinfull );
- res = AddSkinToListFullName( hwndDlg, skinfull );
+ if ( skinfile ) {
+ PathToAbsoluteT(skinfile, skinfull);
+ res = AddSkinToListFullName(hwndDlg, skinfull);
mir_free( skinfile );
}
@@ -668,7 +667,7 @@ INT_PTR SvcActiveSkin(WPARAM wParam, LPARAM lParam)
TCHAR skinfull[MAX_PATH];
skinfile = DBGetStringT( NULL, SKIN, "SkinFile");
if ( skinfile ) {
- CallService( MS_UTILS_PATHTOABSOLUTET, (WPARAM)skinfile, (LPARAM)skinfull );
+ PathToAbsoluteT(skinfile, skinfull);
mir_free(skinfile);
return (INT_PTR)mir_tstrdup(skinfull);
}
@@ -722,8 +721,8 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam)
GetPrivateProfileString( _T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, SIZEOF( imfn ), (LPCTSTR)lParam );
IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder );
_sntprintf( prfn, SIZEOF( prfn ), _T("%s\\%s"), skinfolder, imfn );
- CallService( MS_UTILS_PATHTOABSOLUTET, (WPARAM)prfn, (LPARAM) imfn );
- char * imfn_ch = mir_t2a( imfn );
+ PathToAbsoluteT(prfn, imfn);
+ char * imfn_ch = mir_t2a(imfn);
hPreviewBitmap = ske_LoadGlyphImage( imfn_ch );
mir_free( imfn_ch );
diff --git a/plugins/Clist_mw/src/BkgrCfg.cpp b/plugins/Clist_mw/src/BkgrCfg.cpp
index 33932c7e5f..5dced4e4db 100644
--- a/plugins/Clist_mw/src/BkgrCfg.cpp
+++ b/plugins/Clist_mw/src/BkgrCfg.cpp
@@ -71,7 +71,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,module,"BkBitmap",&dbv))
{
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)dat->item[indx].filename);
+ int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
@@ -232,9 +232,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
{
char str[MAX_PATH];
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE,
- (WPARAM)dat->item[indx].filename,
- (LPARAM)str);
+ int retval = PathToAbsolute(dat->item[indx].filename, str);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
db_set_s(NULL, module, "BkBitmap", dat->item[indx].filename);
else
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp
index 5d74eddc72..63ee91a856 100644
--- a/plugins/Clist_mw/src/clcopts.cpp
+++ b/plugins/Clist_mw/src/clcopts.cpp
@@ -327,14 +327,12 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w
DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)szPath))
- SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
- }
- else
- mir_free(dbv.pszVal);
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
+
+ mir_free(dbv.pszVal);
}
WORD bmpUse = db_get_w(NULL,"StatusBar","BkBmpUse",CLCDEFAULT_BKBMPUSE);
@@ -447,16 +445,16 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","BkColour",CLCDEFAULT_BKCOLOUR));
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
- { DBVARIANT dbv;
+ {
+ DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,"CLC","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)szPath))
- SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
- }
- else mir_free(dbv.pszVal);
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
+
+ mir_free(dbv.pszVal);
}
}
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp
index f30e910dd3..3e63f9ceff 100644
--- a/plugins/Clist_mw/src/clui.cpp
+++ b/plugins/Clist_mw/src/clui.cpp
@@ -139,7 +139,7 @@ int GetConnectingIconForProtoCount(char *szProto)
_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\proto_conn_%s.dll", szPath, szProto);
lstrcpynA(file,szFullPath,SIZEOF(file));
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
ret = ExtractIconExA(fileFull,-1,NULL,NULL,1);
if (ret == 0&&!strcmp(szProto,"ICQ")) ret = 8;
return ret;
@@ -160,7 +160,7 @@ static HICON ExtractIconFromPath(const char *path)
comma = strrchr(file,',');
if (comma == NULL) n = 0;
else {n = atoi(comma+1); *comma = 0;}
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
#ifdef _DEBUG
{
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index bf2cb0c777..f5747d4246 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -741,10 +741,9 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendMessage(hwndDlg, WM_USER + 11, 0, 0);
{
DBVARIANT dbv;
-
if ( !cfg::getTString(NULL, "CLC", "BkBitmap", &dbv)) {
TCHAR szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM) dbv.ptszVal, (LPARAM)szPath))
+ if ( PathToAbsoluteT(dbv.ptszVal, szPath))
SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
DBFreeVariant(&dbv);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index e6e1a520f3..562fc411e0 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -143,7 +143,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)DEFAULT_SKIN_FOLDER, (LPARAM)g_szSkinLib);
+ PathToAbsoluteT(DEFAULT_SKIN_FOLDER, g_szSkinLib);
RegisterIcons();
diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp
index 00c1226331..f571a4ac7c 100644
--- a/plugins/FlashAvatars/src/cflash.cpp
+++ b/plugins/FlashAvatars/src/cflash.cpp
@@ -174,9 +174,10 @@ static void __cdecl loadFlash_Thread(void *p) {
TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%"));
mir_sntprintf(path, MAX_PATH, _T("%s\\%s"), tmpPath, _T("Flash"));
mir_free(tmpPath);
- } else
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)(_T("Flash")), (LPARAM)path);
- } else {
+ }
+ else PathToAbsoluteT( _T("Flash"), path);
+ }
+ else {
if(_tcslen(path) && path[_tcslen(path)-1]=='\\')
path[_tcslen(path)-1] = 0;
}
@@ -600,11 +601,11 @@ static int systemModulesLoaded(WPARAM /*wParam*/, LPARAM /*lParam*/)
TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%"));
mir_sntprintf(path, MAX_PATH, _T("%s\\%s\\"), tmpPath, _T("Flash"));
mir_free(tmpPath);
- } // default for older Mirandas
- else
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)(_T("Flash\\")), (LPARAM)path);
- hAvatarsFolder = FoldersRegisterCustomPathT("Flash Avatars", "Avatars Cache", path);
+ }
+ // default for older Mirandas
+ else PathToAbsoluteT( _T("Flash\\"), path);
+ hAvatarsFolder = FoldersRegisterCustomPathT("Flash Avatars", "Avatars Cache", path);
return 0;
}
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index e9ff0922f5..f3864a46d0 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -1538,27 +1538,25 @@ void Options::init() {
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setSRMMBackgroundFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setSRMMCssFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMTemplateFilename(tmpPath);
DBFreeVariant(&dbv);
}
@@ -1573,27 +1571,25 @@ void Options::init() {
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setChatBackgroundFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setChatCssFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatTemplateFilename(tmpPath);
DBFreeVariant(&dbv);
}
@@ -1608,27 +1604,25 @@ void Options::init() {
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setHistoryBackgroundFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE) && strncmp(tmpPath, "http://", 7)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ if ( strncmp(tmpPath, "http://", 7))
+ PathToAbsolute(dbv.pszVal, tmpPath);
+
proto->setHistoryCssFilename(tmpPath);
DBFreeVariant(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)tmpPath);
- }
+ PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
DBFreeVariant(&dbv);
}
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 3cc39d9d43..6a65eab30c 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -73,8 +73,8 @@ char *TemplateHTMLBuilder::getAvatar(HANDLE hContact, const char * szProto) {
if (result == NULL) {
/* relative -> absolute */
_tcscpy (tmpPath, dbv.ptszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTET) && _tcsncmp(tmpPath, _T("http://"), 7))
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)dbv.ptszVal, (LPARAM)tmpPath);
+ if ( _tcsncmp(tmpPath, _T("http://"), 7))
+ PathToAbsoluteT(dbv.ptszVal, tmpPath);
result = tmpPath;
}
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp
index 5c52ae696a..d9a3f85043 100644
--- a/plugins/IEView/src/Utils.cpp
+++ b/plugins/IEView/src/Utils.cpp
@@ -30,7 +30,7 @@ HANDLE* Utils::hServices = NULL;
const wchar_t *Utils::getBaseDir() {
char temp[MAX_PATH];
base_dir[0] = '\0';
- long tlen = CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"miranda32.exe", (LPARAM)temp);
+ long tlen = PathToAbsolute("miranda32.exe", temp);
if (tlen) {
temp[tlen - 13]=0;
MultiByteToWideChar(CP_ACP, 0, temp, (int)strlen(temp), base_dir, MAX_PATH);
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 265682ee8d..eb7e51567a 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -544,7 +544,7 @@ bool bReadMirandaDirAndPath()
char tmp[MAX_PATH];
TCHAR *tmp2;
_tcscpy( szDBPath , pszDbPathError );
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"miranda32.exe", (LPARAM)tmp);
+ PathToAbsolute("miranda32.exe", tmp);
tmp2 = mir_utf8decodeT(tmp);
sMirandaPath = tmp2;
sMirandaPath.erase(sMirandaPath.find_last_of(_T("\\")));
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index 80fdc8279d..af4a2da89a 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -49,7 +49,7 @@ void PreviewSound(HWND hList)
}
else
{
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)buff, (LPARAM)stzSoundPath);
+ PathToAbsoluteT(buff, stzSoundPath);
PlaySound(stzSoundPath, NULL, SND_ASYNC | SND_FILENAME);
}
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 3dd69e97a5..d7418dbc1e 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -741,7 +741,7 @@ void PlayChangeSound(HANDLE hContact, WORD oldStatus, WORD newStatus)
if (stzSoundFile[0]) {
//Now make path to IndSound absolute, as it isn't registered
TCHAR stzSoundPath[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)stzSoundFile, (LPARAM)stzSoundPath);
+ PathToAbsoluteT(stzSoundFile, stzSoundPath);
PlaySound(stzSoundPath, NULL, SND_ASYNC | SND_FILENAME | SND_NOSTOP);
return;
}
diff --git a/plugins/New_GPG/src/gpg_wrapper.cpp b/plugins/New_GPG/src/gpg_wrapper.cpp
index 5f9df7dfd1..bfa359d69a 100755
--- a/plugins/New_GPG/src/gpg_wrapper.cpp
+++ b/plugins/New_GPG/src/gpg_wrapper.cpp
@@ -74,7 +74,7 @@ pxResult pxExecute(std::vector<std::wstring> &aargv, string *aoutput, LPDWORD ae
file_descriptor_sink sout(pout.sink, close_handle);
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
child c = execute(set_args(argv), bind_stdout(sout), /*bind_stdin(sin),*/ show_window(SW_HIDE), hide_console(), inherit_env(), set_env(env), start_in_dir(toUTF16(mir_path)));
_child = &c;
@@ -185,7 +185,7 @@ pxResult pxExecute_passwd_change(std::vector<std::wstring> &aargv, string *aoutp
// file_descriptor_source sin(pin.source, close_handle);
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
//execute(set_args(argv), bind_stdout(sout), bind_stdin(sin), show_window(SW_HIDE), hide_console(), inherit_env(), set_env(env), start_in_dir(toUTF16(mir_path)));
child c = execute(set_args(argv), /*bind_stdin(sin), */inherit_env(), set_env(env), start_in_dir(toUTF16(mir_path)));
@@ -230,7 +230,7 @@ pxResult pxExecute_passwd_change(std::vector<std::wstring> &aargv, string *aoutp
ctx.environment["LC_ALL"] = "English";
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
ctx.work_directory = mir_path;
delete [] mir_path;
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index c70022a8d9..3b5f63ea19 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -860,7 +860,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
bool gpg_exists = false, lang_exists = false;
{
char *mir_path = (char*)mir_alloc(sizeof(char) * MAX_PATH);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
SetCurrentDirectoryA(mir_path);
tmp = mir_a2t(mir_path);
mir_free(mir_path);
@@ -888,20 +888,12 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
{
tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", (SHGetValue(HKEY_CURRENT_USER, _T("Software\\GNU\\GnuPG"), _T("gpgProgram"), 0, path, &len) == ERROR_SUCCESS)?path:_T(""));
if(tmp[0])
- {
if(!boost::filesystem::exists(tmp))
- {
MessageBox(0, TranslateT("wrong gpg binary location found in system.\nplease choose another location"), TranslateT("Warning"), MB_OK);
- }
-/* char *mir_path = (char*)mir_alloc(MAX_PATH);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
- SetCurrentDirectoryA(mir_path);
- mir_free(mir_path); */
- }
}
- else
- tmp = mir_wstrdup(path);
+ else tmp = mir_wstrdup(path);
mir_free(path);
+
SetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp);
bool bad_version = false;
if(gpg_exists/* && lang_exists*/)
@@ -942,7 +934,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
{
mir_free(tmp);
char *mir_path = (char*)mir_alloc(sizeof(char) * MAX_PATH);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
strcat(mir_path, "\\gpg");
if(_access(mir_path, 0) != -1)
{
@@ -980,7 +972,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
char mir_path[MAX_PATH];
char *atmp = mir_t2a(tmp);
mir_free(tmp);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
char* p_path = NULL;
if(StriStr(atmp, mir_path))
{
@@ -998,7 +990,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
char mir_path[MAX_PATH];
char *atmp = mir_t2a(tmp);
mir_free(tmp);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
char* p_path = NULL;
if(StriStr(atmp, mir_path))
{
@@ -1015,7 +1007,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if(tmp[0])
{
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
SetCurrentDirectoryA(mir_path);
delete [] mir_path;
if(!boost::filesystem::exists(tmp))
@@ -1093,7 +1085,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if(tmp[0])
{
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
SetCurrentDirectoryA(mir_path);
delete [] mir_path;
if(!boost::filesystem::exists(tmp))
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 4e63d6f17d..32cc4160ac 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -548,7 +548,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
char mir_path[MAX_PATH];
char *atmp = mir_t2a(tmp);
mir_free(tmp);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
char* p_path = NULL;
if(StriStr(atmp, mir_path))
{
@@ -566,7 +566,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
char mir_path[MAX_PATH];
char *atmp = mir_t2a(tmp);
mir_free(tmp);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
char* p_path = NULL;
if(StriStr(atmp, mir_path))
{
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 8e56388172..b6e7cc8fc4 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1135,7 +1135,7 @@ bool isGPGValid()
mir_free(tmp);
TCHAR *path = (TCHAR*)mir_alloc(sizeof(TCHAR)*MAX_PATH);
char *mir_path = (char*)mir_alloc(MAX_PATH);
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
SetCurrentDirectoryA(mir_path);
tmp = mir_a2t(mir_path);
mir_free(mir_path);
@@ -2207,7 +2207,7 @@ void clean_temp_dir()
{
using namespace boost::filesystem;
char *mir_path = new char [MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"\\", (LPARAM)mir_path);
+ PathToAbsolute("\\", mir_path);
wstring path = toUTF16(mir_path);
SetCurrentDirectoryA(mir_path);
delete [] mir_path;
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index a4e12ee591..4f702b1931 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -858,7 +858,7 @@ static void SkinPlaySoundPoly(LPCSTR pszSoundName)
if (DBGetContactSettingString(NULL, "SkinSounds", pszSoundName, &dbv)==0) {
char szFull[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)szFull);
+ PathToAbsolute(dbv.pszVal, szFull);
//NotifyEventHooks(hPlayEvent, 0, (LPARAM)szFull);
{
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index 2e7f8ba142..5e438cd934 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -290,7 +290,7 @@ static void CheckUpdates(void *)
mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s"), Files[CurrentFile].File.tszDiskPath);
else
mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s\\%s"), Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)tszBuff, (LPARAM)pluginFolgerName);
+ PathToAbsoluteT(tszBuff, pluginFolgerName);
if ((IsPluginDisabled(Files[CurrentFile].File.tszDiskPath) || !Exists(pluginFolgerName))) //check if plugin disabled or not exists
continue;
}
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 1057196dbf..eba15ce208 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -564,7 +564,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
TCHAR *pszText1 = (TCHAR *)malloc(iLen*sizeof(TCHAR) + 2);
GetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, pszText1, iLen + 1);
DBWriteContactSettingTString(NULL, "Chat", "LogDirectory", pszText1);
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)pszText1, (LPARAM)g_Settings.pszLogDir);
+ PathToAbsoluteT(pszText1, g_Settings.pszLogDir);
free(pszText1);
}
else {
diff --git a/plugins/SendScreenshotPlus/src/mir_icolib.cpp b/plugins/SendScreenshotPlus/src/mir_icolib.cpp
index 4255e2e461..5082fc80b8 100644
--- a/plugins/SendScreenshotPlus/src/mir_icolib.cpp
+++ b/plugins/SendScreenshotPlus/src/mir_icolib.cpp
@@ -101,13 +101,10 @@ LPTSTR IcoLib_GetDefaultIconFileName()
};
TCHAR absolute[MAX_PATH];
- for (INT i = 0; i < SIZEOF(path); i++)
- {
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)path[i], (LPARAM)absolute);
- if (PathFileExists(absolute))
- {
+ for (INT i = 0; i < SIZEOF(path); i++) {
+ PathToAbsoluteT(path[i], absolute);
+ if ( PathFileExists(absolute))
return path[i];
- }
}
return NULL;
}
@@ -130,13 +127,10 @@ static VOID IcoLib_CheckIconPackVersion(LPTSTR szIconPack)
if (szIconPack)
{
TCHAR szAbsolutePath[MAX_PATH];
- HMODULE hIconDll;
+ PathToAbsoluteT(szIconPack, szAbsolutePath);
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szIconPack, (LPARAM)szAbsolutePath);
-
- hIconDll = LoadLibrary(szAbsolutePath);
- if (hIconDll)
- {
+ HMODULE hIconDll = LoadLibrary(szAbsolutePath);
+ if (hIconDll) {
CHAR szFileVersion[64];
if (!LoadStringA(hIconDll, IDS_ICOPACKVERSION, szFileVersion, sizeof(szFileVersion)) ||
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp
index 4f5c86c811..02d20ea0ab 100644
--- a/plugins/SmileyAdd/src/general.cpp
+++ b/plugins/SmileyAdd/src/general.cpp
@@ -163,11 +163,11 @@ void pathToAbsolute(const bkstring& pSrc, bkstring& pOut)
{
TCHAR szExpPath[MAX_PATH];
ExpandEnvironmentStrings(pSrc.c_str(), szExpPath, SIZEOF(szExpPath));
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szExpPath, (LPARAM)szOutPath);
+ PathToAbsoluteT(szExpPath, szOutPath);
}
else
{
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szVarPath, (LPARAM)szOutPath);
+ PathToAbsoluteT(szVarPath, szOutPath);
mir_free(szVarPath);
}
pOut = szOutPath;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
index c00751dabe..132d5b4107 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -234,19 +234,17 @@ static VOID GetInitialDir(LPSTR pszInitialDir)
// is some standard path defined
if (!DB::Setting::GetStatic(0, MODNAME, "vCardPath", szRelative, SIZEOF(szRelative))) {
- if (!CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szRelative, (WPARAM)pszInitialDir))
+ if ( !PathToAbsolute(szRelative, pszInitialDir))
strcpy(pszInitialDir, szRelative);
}
else if (//try to use environment variables supported by pathpatch of db3xSA
!ServiceExists(MS_DB_GETPROFILEPATH_BASIC) ||
- !CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)PROFILEPATH "\\" PROFILENAME, (WPARAM)pszInitialDir)
- ) {
+ !PathToAbsolute(PROFILEPATH "\\" PROFILENAME, pszInitialDir)) {
// use standard path to absolute
- if (!CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)"", (WPARAM)pszInitialDir))
+ if ( !PathToAbsolute("", pszInitialDir))
*pszInitialDir = 0;
}
- else
- *pszInitialDir = 0;
+ else *pszInitialDir = 0;
}
/**
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index 2b77314895..1cc6a5c59a 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -140,13 +140,10 @@ LPTSTR IcoLib_GetDefaultIconFileName()
};
TCHAR absolute[MAX_PATH];
- for (INT i = 0; i < SIZEOF(path); i++)
- {
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)path[i], (LPARAM)absolute);
- if (PathFileExists(absolute))
- {
+ for (INT i = 0; i < SIZEOF(path); i++) {
+ PathToAbsoluteT(path[i], absolute);
+ if ( PathFileExists(absolute))
return path[i];
- }
}
return NULL;
}
@@ -167,12 +164,10 @@ static VOID IcoLib_CheckIconPackVersion(LPTSTR szIconPack)
{
if (szIconPack)
{
- TCHAR szAbsolutePath[MAX_PATH];
- HMODULE hIconDll;
-
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szIconPack, (LPARAM)szAbsolutePath);
+ TCHAR szAbsolutePath[MAX_PATH];
+ PathToAbsoluteT(szIconPack, szAbsolutePath);
- hIconDll = LoadLibrary(szAbsolutePath);
+ HMODULE hIconDll = LoadLibrary(szAbsolutePath);
if (hIconDll)
{
CHAR szFileVersion[64];
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index 450538e02f..129fc95084 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -177,7 +177,7 @@ namespace NServices
absolute[0] = '\0';
// check if file exists
- if (!CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)absolute))
+ if ( !PathToAbsolute(dbv.pszVal, absolute))
{
FILE *f = fopen(absolute, "rb");
if (f) {
diff --git a/plugins/VersionInfo/src/utils.cpp b/plugins/VersionInfo/src/utils.cpp
index 79ab0b564e..b89eb94a46 100644
--- a/plugins/VersionInfo/src/utils.cpp
+++ b/plugins/VersionInfo/src/utils.cpp
@@ -86,10 +86,10 @@ TCHAR *RelativePathToAbsolute(TCHAR *szRelative, TCHAR *szAbsolute, size_t size)
{
if (size < MAX_PATH) {
TCHAR buffer[MAX_PATH]; //new path should be at least MAX_PATH chars
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM) szRelative, (LPARAM) buffer);
+ PathToAbsoluteT(szRelative, buffer);
_tcsncpy(szAbsolute, buffer, size);
}
- else CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM) szRelative, (LPARAM) szAbsolute);
+ else PathToAbsoluteT(szRelative, szAbsolute);
return szAbsolute;
}
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 96344c2f80..c5bc34e0ed 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -332,13 +332,7 @@ extern "C" int __declspec(dllexport) Load(void)
YAMN_STATUS = ID_STATUS_OFFLINE;
// we get the Miranda Root Path
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTET))
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)_T("."), (LPARAM)szMirandaDir);
- else {
- GetModuleFileName(GetModuleHandle(NULL), szMirandaDir, MAX_PATH);
- TCHAR* str2 = _tcsrchr(szMirandaDir, '\\');
- if (str2 != NULL) *str2 = 0;
- }
+ PathToAbsoluteT( _T("."), szMirandaDir);
// retrieve the current profile name
CallService(MS_DB_GETPROFILENAMET, (WPARAM)SIZEOF(ProfileName), (LPARAM)ProfileName); //not to pass entire array to fcn
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index 53f4241c15..b7ab99aac3 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -104,7 +104,7 @@ TCHAR* CIcqProto::GetOwnAvatarFileName()
if (!getSettingStringT(NULL, "AvatarFile", &dbvFile))
{
TCHAR tmp[MAX_PATH * 2];
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)dbvFile.ptszVal, (LPARAM)tmp);
+ PathToAbsoluteT(dbvFile.ptszVal, tmp);
db_free(&dbvFile);
return null_strdup(tmp);
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 23a704f48c..57ae08257b 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -269,7 +269,7 @@ static HICON ExtractIconFromPath(const char *path, BOOL * needFree)
comma=strrchr(file,',');
if (comma==NULL) n=0;
else {n=atoi(comma+1); *comma=0;}
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
hIcon=NULL;
ExtractIconExA(fileFull,n,NULL,&hIcon,1);
if (needFree)
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 75e56a0f60..d184b976ef 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -756,7 +756,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
}
else db_unset(NULL, "Chat", "LogDirectory");
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)pszText, (LPARAM)g_Settings.pszLogDir);
+ PathToAbsoluteT(pszText, g_Settings.pszLogDir);
iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGTIMESTAMP));
if ( iLen > 0 ) {
@@ -991,7 +991,7 @@ void LoadGlobalSettings(void)
mir_free(tmpPath);
}
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)pszTemp, (LPARAM)g_Settings.pszLogDir);
+ PathToAbsoluteT(pszTemp, g_Settings.pszLogDir);
}
g_Settings.LogIndentEnabled = (DBGetContactSettingByte(NULL, "Chat", "LogIndentEnabled", 1) != 0)?TRUE:FALSE;
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index 61c69e5849..fe578c6fd9 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -295,12 +295,11 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
DBVARIANT dbv;
if (!DBGetContactSettingString(NULL, "CLC", "BkBitmap", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_FILENAME, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) dbv.pszVal, (LPARAM) szPath))
- SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
- }
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
+
DBFreeVariant(&dbv);
}
}
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index d9e7676345..7eb2ad7d9e 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -580,12 +580,12 @@ MIR_CORE_DLL(int) LoadLangPackModule(void)
hevChanged = CreateHookableEvent(ME_LANGPACK_CHANGED);
TCHAR szSearch[MAX_PATH];
- PathToAbsoluteT(_T("langpack_*.txt"), szSearch, NULL);
+ PathToAbsoluteT(_T("langpack_*.txt"), szSearch);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(szSearch, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
- PathToAbsoluteT(fd.cFileName, szSearch, NULL);
+ PathToAbsoluteT(fd.cFileName, szSearch);
FindClose(hFind);
LoadLangPack(szSearch);
}
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index adea9e0caa..f9718181cf 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -71,7 +71,7 @@ int getProfilePath(TCHAR *buf, size_t cch)
if (profiledir[0] == 0)
_tcscpy(profiledir, _T("%miranda_path%\\Profiles"));
- size_t len = PathToAbsoluteT( VARST(profiledir), buf, NULL);
+ size_t len = PathToAbsoluteT( VARST(profiledir), buf);
if (buf[len-1] == '/' || buf[len-1] == '\\')
buf[len-1] = 0;
@@ -427,7 +427,7 @@ static int FindMirandaForProfile(TCHAR *szProfile)
int LoadDatabaseModule(void)
{
TCHAR szProfile[MAX_PATH];
- PathToAbsoluteT(_T("."), szProfile, NULL);
+ PathToAbsoluteT(_T("."), szProfile);
_tchdir(szProfile);
szProfile[0] = 0;
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index 0445da160e..442bd35567 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -415,11 +415,11 @@ static void DoAutoExec(void)
GetPrivateProfileString(_T("AutoExec"), _T("Glob"), _T("autoexec_*.ini"), szFindPath, SIZEOF(szFindPath), mirandabootini);
if (g_bDbCreated && szOnCreateFilename[0]) {
- PathToAbsoluteT( VARST(szOnCreateFilename), szIniPath, NULL);
+ PathToAbsoluteT( VARST(szOnCreateFilename), szIniPath);
ProcessIniFile(szIniPath, szSafeSections, szUnsafeSections, 0, 1);
}
- PathToAbsoluteT( VARST(szFindPath), szFindPath, NULL);
+ PathToAbsoluteT( VARST(szFindPath), szFindPath);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(szFindPath, &fd);
@@ -494,7 +494,7 @@ int InitIni(void)
DoAutoExec();
TCHAR szMirandaDir[MAX_PATH];
- PathToAbsoluteT(_T("."), szMirandaDir, NULL);
+ PathToAbsoluteT(_T("."), szMirandaDir);
hIniChangeNotification = FindFirstChangeNotification(szMirandaDir, 0, FILE_NOTIFY_CHANGE_FILE_NAME);
if (hIniChangeNotification != INVALID_HANDLE_VALUE) {
CreateServiceFunction("DB/Ini/CheckImportNow", CheckIniImportNow);
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 9570709115..51b443197d 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -118,7 +118,7 @@ IconSourceFile* IconSourceFile_Get(const TCHAR* file, bool isPath)
return NULL;
if (isPath)
- PathToAbsoluteT(file, fileFull, NULL);
+ PathToAbsoluteT(file, fileFull);
/// TODO: convert path to long - eliminate duplicate items
else
_tcscpy(fileFull, file);
@@ -539,9 +539,9 @@ HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid)
if (sid->pszDefaultFile) {
WCHAR fileFull[ MAX_PATH ];
if (utf_path)
- PathToAbsoluteT(sid->pwszDefaultFile, fileFull, NULL);
+ PathToAbsoluteT(sid->pwszDefaultFile, fileFull);
else
- PathToAbsoluteT( StrConvT(sid->pszDefaultFile), fileFull, NULL);
+ PathToAbsoluteT( StrConvT(sid->pszDefaultFile), fileFull);
item->default_file = mir_wstrdup(fileFull);
}
item->default_indx = sid->iDefaultIndex;
@@ -681,7 +681,7 @@ HICON IconItem_GetIcon(IcolibItem* item, bool big)
if ( !source && !DBGetContactSettingTString(NULL, "SkinIcons", item->name, &dbv)) {
TCHAR tszFullPath[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, tszFullPath, NULL);
+ PathToAbsoluteT(dbv.ptszVal, tszFullPath);
int cx = item->cx ? item->cx : GetSystemMetrics(big ? SM_CXICON : SM_CXSMICON);
int cy = item->cy ? item->cy : GetSystemMetrics(big ? SM_CYICON : SM_CYSMICON);
source = GetIconSourceItemFromPath(tszFullPath, cx, cy);
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index bea305bf78..107149f087 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -56,7 +56,7 @@ static HICON ExtractIconFromPath(const TCHAR *path, int cxIcon, int cyIcon)
n = _ttoi(comma+1);
*comma = 0;
}
- PathToAbsoluteT(file, fileFull, NULL);
+ PathToAbsoluteT(file, fileFull);
hIcon = NULL;
//SHOULD BE REPLACED WITH GOOD ENOUGH FUNCTION
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp
index 81ae80c604..76331b51e3 100644
--- a/src/modules/netlib/netliblog.cpp
+++ b/src/modules/netlib/netliblog.cpp
@@ -145,7 +145,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
TCHAR path[MAX_PATH];
GetWindowText((HWND)lParam, path, MAX_PATH);
- PathToAbsoluteT( VARST(path), path, NULL);
+ PathToAbsoluteT( VARST(path), path);
SetDlgItemText(hwndDlg, IDC_PATH, path);
}
break;
@@ -567,7 +567,7 @@ void NetlibLogInit(void)
logOptions.szUserFile = mir_tstrdup(dbv.ptszVal);
TCHAR path[MAX_PATH];
- PathToAbsoluteT( VARST(dbv.ptszVal), path, NULL);
+ PathToAbsoluteT( VARST(dbv.ptszVal), path);
logOptions.szFile = mir_tstrdup(path);
db_free(&dbv);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 94c04b23e2..b3c46d4482 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -836,7 +836,7 @@ int LoadNewPluginsModuleInfos(void)
mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
// remember where the mirandaboot.ini goes
- PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini, NULL);
+ PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini);
// look for all *.dll's
enumPlugins(scanPluginsDir, 0, 0);
return 0;
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 19a469a13e..8133a7e5ef 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -127,7 +127,7 @@ static INT_PTR ServiceSkinPlaySound(WPARAM, LPARAM lParam)
DBVARIANT dbv;
if ( DBGetContactSettingTString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
TCHAR szFull[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, szFull, NULL);
+ PathToAbsoluteT(dbv.ptszVal, szFull);
NotifyEventHooks(hPlayEvent, 0, (LPARAM)szFull);
db_free(&dbv);
}
@@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
DBVARIANT dbv;
if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
TCHAR szPathFull[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, szPathFull, NULL);
+ PathToAbsoluteT(dbv.ptszVal, szPathFull);
NotifyEventHooks(hPlayEvent, 1, (LPARAM)szPathFull);
db_free(&dbv);
}
@@ -281,12 +281,12 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (db_get_b(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
DBVARIANT dbv;
if (DBGetContactSettingTString(NULL, "SkinSounds", snd.name, &dbv) == 0) {
- PathToAbsoluteT(dbv.ptszVal, strdir, NULL);
+ PathToAbsoluteT(dbv.ptszVal, strdir);
db_free(&dbv);
} } }
mir_sntprintf(strFull, SIZEOF(strFull), _T("%s"), snd.ptszTempFile ? snd.ptszTempFile : _T(""));
- PathToAbsoluteT(strFull, strdir, NULL);
+ PathToAbsoluteT(strFull, strdir);
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(ofn));
diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp
index 2f111f8ae6..411c822e33 100644
--- a/src/modules/utils/bmpfilter.cpp
+++ b/src/modules/utils/bmpfilter.cpp
@@ -37,7 +37,7 @@ static INT_PTR sttBitmapLoader(const TCHAR* ptszFileName)
short picType;
TCHAR szFilename[MAX_PATH];
- if ( !PathToAbsoluteT(ptszFileName, szFilename, NULL))
+ if ( !PathToAbsoluteT(ptszFileName, szFilename))
mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s"), ptszFileName);
int filenameLen = lstrlen(szFilename);
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 0e9f38eb42..75fad634e8 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -35,7 +35,7 @@ static INT_PTR pathToRelative(WPARAM wParam, LPARAM lParam)
static INT_PTR pathToAbsolute(WPARAM wParam, LPARAM lParam)
{
- return PathToAbsolute((char*)wParam, (char*)lParam, NULL);
+ return PathToAbsolute((char*)wParam, (char*)lParam);
}
static INT_PTR createDirTree(WPARAM, LPARAM lParam)