summaryrefslogtreecommitdiff
path: root/protocols/Skype/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-08-07 16:00:02 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-08-07 16:00:02 +0000
commita1f4c0621436e68af9c12a63df0b6449b0f96e22 (patch)
treef1b0350e70b918b9a25452aa1288cb60e2f7c17a /protocols/Skype/src
parent940b761b023eba93d9d605e75a3216ba5d023dad (diff)
resource update
git-svn-id: http://svn.miranda-ng.org/main/trunk@5612 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src')
-rw-r--r--protocols/Skype/src/resource.h8
-rw-r--r--protocols/Skype/src/skype.cpp6
-rw-r--r--protocols/Skype/src/skype_runtime.cpp84
3 files changed, 52 insertions, 46 deletions
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h
index 508353d960..e155854f36 100644
--- a/protocols/Skype/src/resource.h
+++ b/protocols/Skype/src/resource.h
@@ -104,6 +104,12 @@
#define IDC_PRIVACY_WEB 1073
#define IDC_CREDITVALUE 1074
#define IDC_CREDITCURRENCY 1075
+#define IDC_PRIVACY_AVATAR_ANYONE 1076
+#define IDC_PRIVACY_AVATARS_CONTACTLIST 1077
+#define IDC_PRIVACY_COUNT_ANYONE 1078
+#define IDC_PRIVACY_COUNT_CONTACTLIST 1079
+#define IDC_PRIVACY_TIME_ANYONE 1080
+#define IDC_PRIVACY_TIME_CONTACTLIST 1081
// Next default values for new objects
//
@@ -111,7 +117,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 118
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1076
+#define _APS_NEXT_CONTROL_VALUE 1082
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp
index 423a216eaf..0416d8f473 100644
--- a/protocols/Skype/src/skype.cpp
+++ b/protocols/Skype/src/skype.cpp
@@ -92,7 +92,7 @@ int UnpackSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName)
wchar_t *skypeKitPath = ::wcsrchr(fileName, '\\');
if (skypeKitPath != NULL)
*skypeKitPath = 0;
- ::swprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
+ ::mir_snwprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
if ( ::GetFileAttributes(fileName) == DWORD(-1))
{
HRSRC hRes = ::FindResource(hInstance, MAKEINTRESOURCE(IDR_RUNTIME), L"BIN");
@@ -126,14 +126,14 @@ int UnpackSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName)
::GetModuleFileName(NULL, path, ARRAYSIZE(path));
if (profileName)
- ::swprintf(
+ ::mir_snwprintf(
cmdLine,
SIZEOF(cmdLine),
L" /restart:%d /profile=%s",
::GetCurrentProcessId(),
profileName);
else
- ::swprintf(
+ ::mir_snwprintf(
cmdLine,
SIZEOF(cmdLine),
L" /restart:%d",
diff --git a/protocols/Skype/src/skype_runtime.cpp b/protocols/Skype/src/skype_runtime.cpp
index bd6fe46a49..793d96f5f3 100644
--- a/protocols/Skype/src/skype_runtime.cpp
+++ b/protocols/Skype/src/skype_runtime.cpp
@@ -23,8 +23,8 @@ char *CSkypeProto::LoadKeyPair()
return NULL;
char* pData = (char*)_alloca(length + 1);
- ::memcpy(pData, pLockedResource, length);
- pData[length] = 0;
+ ::memcpy(pData, pLockedResource, length);
+ pData[length] = 0;
unsigned decodedLen;
mir_ptr<BYTE> tmpD((BYTE*)::mir_base64_decode(pData, &decodedLen));
@@ -55,7 +55,7 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName)
wchar_t *skypeKitPath = ::wcsrchr(fileName, '\\');
if (skypeKitPath != NULL)
*skypeKitPath = 0;
- ::swprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
+ ::mir_snwprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
@@ -77,7 +77,7 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName)
wchar_t param[128];
VARST dbPath( _T("%miranda_userdata%\\SkypeKit"));
- ::swprintf(param, SIZEOF(param), L"-p -P %d -f \"%s\"", this->skypeKitPort, dbPath);
+ ::mir_snwprintf(param, SIZEOF(param), L"-p -P %d -f \"%s\"", this->skypeKitPort, dbPath);
int startingrt = ::CreateProcess(
fileName, param,
NULL, NULL, FALSE,
@@ -89,59 +89,59 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName)
BOOL CSkypeProto::SafeTerminateProcess(HANDLE hProcess, UINT uExitCode)
{
- DWORD dwTID, dwCode, dwErr = 0;
- HANDLE hProcessDup = INVALID_HANDLE_VALUE;
- HANDLE hRT = NULL;
- HINSTANCE hKernel = ::GetModuleHandle(L"Kernel32");
- BOOL bSuccess = FALSE;
-
- BOOL bDup = ::DuplicateHandle(
- ::GetCurrentProcess(),
- hProcess,
- GetCurrentProcess(),
- &hProcessDup,
- PROCESS_ALL_ACCESS,
+ DWORD dwTID, dwCode, dwErr = 0;
+ HANDLE hProcessDup = INVALID_HANDLE_VALUE;
+ HANDLE hRT = NULL;
+ HINSTANCE hKernel = ::GetModuleHandle(L"Kernel32");
+ BOOL bSuccess = FALSE;
+
+ BOOL bDup = ::DuplicateHandle(
+ ::GetCurrentProcess(),
+ hProcess,
+ GetCurrentProcess(),
+ &hProcessDup,
+ PROCESS_ALL_ACCESS,
FALSE,
0);
- // Detect the special case where the process is
- // already dead...
- if (::GetExitCodeProcess((bDup) ? hProcessDup : hProcess, &dwCode) && (dwCode == STILL_ACTIVE))
- {
- FARPROC pfnExitProc;
-
- pfnExitProc = GetProcAddress(hKernel, "ExitProcess");
+ // Detect the special case where the process is
+ // already dead...
+ if (::GetExitCodeProcess((bDup) ? hProcessDup : hProcess, &dwCode) && (dwCode == STILL_ACTIVE))
+ {
+ FARPROC pfnExitProc;
+
+ pfnExitProc = GetProcAddress(hKernel, "ExitProcess");
- hRT = ::CreateRemoteThread(
+ hRT = ::CreateRemoteThread(
(bDup) ? hProcessDup : hProcess,
NULL,
0,
(LPTHREAD_START_ROUTINE)pfnExitProc,
(PVOID)uExitCode, 0, &dwTID);
- if ( hRT == NULL )
- dwErr = GetLastError();
- }
- else
- dwErr = ERROR_PROCESS_ABORTED;
+ if ( hRT == NULL )
+ dwErr = GetLastError();
+ }
+ else
+ dwErr = ERROR_PROCESS_ABORTED;
- if (hRT)
- {
- // Must wait process to terminate to
- // guarantee that it has exited...
- ::WaitForSingleObject((bDup) ? hProcessDup : hProcess, INFINITE);
+ if (hRT)
+ {
+ // Must wait process to terminate to
+ // guarantee that it has exited...
+ ::WaitForSingleObject((bDup) ? hProcessDup : hProcess, INFINITE);
- ::CloseHandle(hRT);
- bSuccess = TRUE;
- }
+ ::CloseHandle(hRT);
+ bSuccess = TRUE;
+ }
- if ( bDup )
- ::CloseHandle(hProcessDup);
+ if ( bDup )
+ ::CloseHandle(hProcessDup);
- if ( !bSuccess )
- ::SetLastError(dwErr);
+ if ( !bSuccess )
+ ::SetLastError(dwErr);
- return bSuccess;
+ return bSuccess;
}
void CSkypeProto::StopSkypeRuntime()