diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-04 23:42:36 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-04 23:42:36 +0000 |
commit | e63926f79d51119b829d683983e562527f7dd10a (patch) | |
tree | 4ad26cc425798912f9391d9166cf32c6ea573c17 /plugins/Non-IM Contact/src/contactinfo.cpp | |
parent | a16429430c5cd7b20c6790c0f1084a8df6bbc9f4 (diff) |
Db_autobackups: multiple changes
+ varios fixs
git-svn-id: http://svn.miranda-ng.org/main/trunk@11245 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact/src/contactinfo.cpp')
-rw-r--r-- | plugins/Non-IM Contact/src/contactinfo.cpp | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index 8638bc5e48..265a2f1ae6 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -81,29 +81,27 @@ LRESULT CALLBACK ButtWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar int BrowseForFolder(HWND hwnd,char *szPath)
{
int result=0;
-
- if (SUCCEEDED(OleInitialize(NULL))) {
- LPMALLOC pMalloc;
- if (SUCCEEDED(CoGetMalloc(1,&pMalloc))) {
- ptrT tszPath( mir_a2t(szPath));
- BROWSEINFO bi={0};
- bi.hwndOwner = hwnd;
- bi.pszDisplayName = tszPath;
- bi.lpszTitle = TranslateT("Select Folder");
- bi.ulFlags = BIF_EDITBOX | BIF_RETURNONLYFSDIRS; // Use this combo instead of BIF_USENEWUI
- bi.lParam = (LPARAM)szPath;
-
- ITEMIDLIST *pidlResult = SHBrowseForFolder(&bi);
- if (pidlResult) {
- SHGetPathFromIDListA(pidlResult, szPath);
- mir_strcat(szPath,"\\");
- result = 1;
- }
- pMalloc->Free(pidlResult);
- pMalloc->Release();
+ LPMALLOC pMalloc;
+
+ if (SUCCEEDED(CoGetMalloc(1,&pMalloc))) {
+ ptrT tszPath( mir_a2t(szPath));
+ BROWSEINFO bi={0};
+ bi.hwndOwner = hwnd;
+ bi.pszDisplayName = tszPath;
+ bi.lpszTitle = TranslateT("Select Folder");
+ bi.ulFlags = BIF_EDITBOX | BIF_RETURNONLYFSDIRS; // Use this combo instead of BIF_USENEWUI
+ bi.lParam = (LPARAM)szPath;
+
+ ITEMIDLIST *pidlResult = SHBrowseForFolder(&bi);
+ if (pidlResult) {
+ SHGetPathFromIDListA(pidlResult, szPath);
+ mir_strcat(szPath,"\\");
+ result = 1;
}
- OleUninitialize();
+ pMalloc->Free(pidlResult);
+ pMalloc->Release();
}
+
return result;
}
|