diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-26 12:29:46 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-26 12:29:46 +0000 |
commit | 0fdbd8fce63637a7abf746942060f858b225af7d (patch) | |
tree | 04492cc05a35a6929f1e367cd2b8309d27ef5363 | |
parent | 2b91102933d8719a44aa6fbfba1920fcd65fcb12 (diff) |
skypekit db moved to userdata directory. it is working for me, needs to test
git-svn-id: http://svn.miranda-ng.org/main/trunk@4533 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/src/skype.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp index bbc948e6ca..a44eed5518 100644 --- a/protocols/Skype/src/skype.cpp +++ b/protocols/Skype/src/skype.cpp @@ -125,7 +125,7 @@ char *LoadKeyPair(HINSTANCE hInstance) return NULL;
}
-int StartSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName, int &port/*, const wchar_t *dbPath*/)
+int StartSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName, int &port)
{
STARTUPINFO cif = {0};
cif.cb = sizeof(STARTUPINFO);
@@ -141,7 +141,7 @@ int StartSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName, int &port ::swprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
if ( !::PathFileExists(fileName))
{
- HRSRC hRes = ::FindResource(hInstance, MAKEINTRESOURCE(/*IDR_RUNTIME*/102), L"BIN");
+ HRSRC hRes = ::FindResource(hInstance, MAKEINTRESOURCE(IDR_RUNTIME), L"BIN");
if (hRes)
{
HGLOBAL hResource = ::LoadResource(hInstance, hRes);
@@ -230,10 +230,13 @@ int StartSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName, int &port }
::CloseHandle(snapshot);
- wchar_t param[128];
+ wchar_t param[128], path[MAX_PATH];
PROCESS_INFORMATION pi;
- //::swprintf(param, SIZEOF(param), L"-p -P %d -f %s", port, dbPath);
- ::swprintf(param, SIZEOF(param), L"-p -P %d", port);
+ VARST dbPath( _T("%miranda_userdata%\\SkypeKit"));
+ _tcslwr(dbPath);
+ mir_sntprintf(path, SIZEOF(path), _T("\"%s\""), dbPath);
+ ::swprintf(param, SIZEOF(param), L"-p -P %d -f %s", port, path);
+ //::swprintf(param, SIZEOF(param), L"-p -P %d", port);
int startingrt = ::CreateProcess(
fileName, param,
NULL, NULL, FALSE,
@@ -274,14 +277,14 @@ extern "C" int __declspec(dllexport) Load(void) return 1;
}
+ free(keyPair);
+
if ( !g_skype->start())
{
::MessageBox(NULL, TranslateT("SkypeKit did not start."), _T(MODULE), MB_OK | MB_ICONERROR);
return 1;
}
- free(keyPair);
-
// ---
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
|