diff options
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/message.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 34 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 12 |
12 files changed, 49 insertions, 49 deletions
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 019a2ae6e1..f59c466ecb 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -515,11 +515,11 @@ static int Log_AppendRTF(LOGSTREAMDATA *streamData, BOOL simpleMode, char *&buff for (; *line; line++, textCharsCount++) {
if (*line == '\r' && line[1] == '\n') {
- CopyMemory(d, "\\par ", 5);
+ memcpy(d, "\\par ", 5);
line++;
d += 5;
} else if (*line == '\n') {
- CopyMemory(d, "\\line ", 6);
+ memcpy(d, "\\line ", 6);
d += 6;
} else if (*line == '%' && !simpleMode) {
char szTemp[200]; szTemp[0] = '\0';
@@ -586,7 +586,7 @@ static int Log_AppendRTF(LOGSTREAMDATA *streamData, BOOL simpleMode, char *&buff d += iLen;
}
} else if (*line == '\t' && !streamData->bStripFormat) {
- CopyMemory(d, "\\tab ", 5);
+ memcpy(d, "\\tab ", 5);
d += 5;
} else if ((*line == '\\' || *line == '{' || *line == '}') && !streamData->bStripFormat) {
*d++ = '\\';
@@ -837,7 +837,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) while (bufferAlloced - bufferEnd < (pci->logIconBmpSize[0] + 20))
bufferAlloced += 4096;
buffer = (char *) mir_realloc(buffer, bufferAlloced);
- CopyMemory(buffer + bufferEnd, pci->pLogIconBmpBits[iIndex], pci->logIconBmpSize[iIndex]);
+ memcpy(buffer + bufferEnd, pci->pLogIconBmpBits[iIndex], pci->logIconBmpSize[iIndex]);
bufferEnd += pci->logIconBmpSize[iIndex];
}
@@ -941,7 +941,7 @@ static DWORD CALLBACK Log_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG // give the RTF to the RE control
*pcb = min(cb, lstrdat->bufferLen - lstrdat->bufferOffset);
- CopyMemory(pbBuff, lstrdat->buffer + lstrdat->bufferOffset, *pcb);
+ memcpy(pbBuff, lstrdat->buffer + lstrdat->bufferOffset, *pcb);
lstrdat->bufferOffset += *pcb;
// mir_free stuff if the streaming operation is complete
diff --git a/plugins/TabSRMM/src/chat/message.cpp b/plugins/TabSRMM/src/chat/message.cpp index fdab8cc573..c108f97281 100644 --- a/plugins/TabSRMM/src/chat/message.cpp +++ b/plugins/TabSRMM/src/chat/message.cpp @@ -299,7 +299,7 @@ TCHAR* Chat_DoRtfToTags(char* pszText, SESSION_INFO *si) // move the memory and paste in new commands instead of the old RTF
if (InsertThis[0] || iRemoveChars) {
MoveMemory(p1 + mir_strlen(InsertThis) , p1 + iRemoveChars, mir_strlen(p1) - iRemoveChars + 1);
- CopyMemory(p1, InsertThis, mir_strlen(InsertThis));
+ memcpy(p1, InsertThis, mir_strlen(InsertThis));
p1 += mir_strlen(InsertThis);
}
else p1++;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 1c027c954f..341a49df90 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2798,7 +2798,7 @@ LABEL_SHOWWINDOW: pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam); pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam); ClientToScreen(((NMHDR*) lParam)->hwndFrom, &pt); - CopyMemory(&uiNew, ui, sizeof(USERINFO)); + memcpy(&uiNew, ui, sizeof(USERINFO)); UINT uID = CreateGCMenu(hwndDlg, &hMenu, 0, pt, si, uiNew.pszUID, uiNew.pszNick); switch (uID) { case 0: diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 650f3ceb7b..6e06dd7f50 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -312,7 +312,7 @@ void CContactCache::saveHistory(WPARAM wParam, LPARAM lParam) } } } - ::CopyMemory(m_history[m_iHistoryTop].szText, szFromStream, iStreamLength); + ::memcpy(m_history[m_iHistoryTop].szText, szFromStream, iStreamLength); if (!oldTop) { if (m_iHistoryTop < m_iHistorySize) { m_iHistoryTop++; diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index ea04f9eebd..6aa6bd4478 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -357,7 +357,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, GetCursorPos(&pt); GetWindowRect(hwndDlg, &rcWindow); - CopyMemory(&pContainer->oldbuttons[0], &pContainer->buttons[0], sizeof(TitleBtn) * 3); + memcpy(&pContainer->oldbuttons[0], &pContainer->buttons[0], sizeof(TitleBtn) * 3); memset(&pContainer->buttons[0], 0, (sizeof(TitleBtn) * 3)); isMin = isMax = isClose = FALSE; diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index a7b5900688..4435efb0e2 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -222,7 +222,7 @@ void CGlobals::reloadSettings(bool fReloadSkins) m_genericTxtColor = M.GetDword(FONTMODULE, "genericTxtClr", GetSysColor(COLOR_BTNTEXT));
m_cRichBorders = M.GetDword(FONTMODULE, "cRichBorders", 0);
- ::CopyMemory(&globalContainerSettings, &_cnt_default, sizeof(TContainerSettings));
+ ::memcpy(&globalContainerSettings, &_cnt_default, sizeof(TContainerSettings));
Utils::ReadContainerSettingsFromDB(0, &globalContainerSettings);
globalContainerSettings.fPrivate = false;
if (fReloadSkins)
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index a7218aa491..913f0a1f2a 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2082,7 +2082,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTRANGE, 0, (LPARAM)&tr); if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) { MoveMemory(tr.lpstrText + 7, tr.lpstrText, tr.chrg.cpMax - tr.chrg.cpMin + 1); - CopyMemory(tr.lpstrText, _T("mailto:"), 7); + memcpy(tr.lpstrText, _T("mailto:"), 7); } if (!IsStringValidLink(tr.lpstrText)) break; @@ -2783,13 +2783,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->iSendBufferSize = memRequired; } if (utfResult) { - CopyMemory(dat->sendBuffer, utfResult, memRequired); + memcpy(dat->sendBuffer, utfResult, memRequired); mir_free(utfResult); } else { WideCharToMultiByte(dat->codePage, 0, decoded, -1, dat->sendBuffer, bufSize, 0, 0); if (flags & PREF_UNICODE) - CopyMemory(&dat->sendBuffer[bufSize], decoded, (mir_wstrlen(decoded) + 1) * sizeof(WCHAR)); + memcpy(&dat->sendBuffer[bufSize], decoded, (mir_wstrlen(decoded) + 1) * sizeof(WCHAR)); } if (memRequired == 0 || dat->sendBuffer[0] == 0) diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 9712a49f0c..1b3f647bb4 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -807,14 +807,14 @@ static DWORD CALLBACK Message_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, if (*ppText == NULL) {
*ppText = (char *)mir_alloc(cb + 2);
- CopyMemory(*ppText, pbBuff, cb);
+ memcpy(*ppText, pbBuff, cb);
*pcb = cb;
dwRead = cb;
*(*ppText + cb) = '\0';
}
else {
char *p = (char *)mir_realloc(*ppText, dwRead + cb + 2);
- CopyMemory(p + dwRead, pbBuff, cb);
+ memcpy(p + dwRead, pbBuff, cb);
*ppText = p;
*pcb = cb;
dwRead += cb;
@@ -1076,7 +1076,7 @@ BOOL TSAPI DoRtfToTags(TCHAR *pszText, const TWindowData *dat) if (InsertThis[0] || iRemoveChars) {
size_t cbLen = _tcslen(InsertThis);
MoveMemory(p1 + cbLen, p1 + iRemoveChars, (mir_tstrlen(p1) - iRemoveChars + 1) * sizeof(TCHAR));
- CopyMemory(p1, InsertThis, cbLen * sizeof(TCHAR));
+ memcpy(p1, InsertThis, cbLen * sizeof(TCHAR));
p1 += cbLen;
}
else p1++;
@@ -1712,11 +1712,11 @@ void TSAPI LoadOverrideTheme(TContainerData *pContainer) }
if (pContainer->ltr_templates == NULL) {
pContainer->ltr_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
- CopyMemory(pContainer->ltr_templates, <R_Active, sizeof(TTemplateSet));
+ memcpy(pContainer->ltr_templates, <R_Active, sizeof(TTemplateSet));
}
if (pContainer->rtl_templates == NULL) {
pContainer->rtl_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
- CopyMemory(pContainer->rtl_templates, &RTL_Active, sizeof(TTemplateSet));
+ memcpy(pContainer->rtl_templates, &RTL_Active, sizeof(TTemplateSet));
}
pContainer->theme.logFonts = (LOGFONTA *)mir_alloc(sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2));
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 91f580daf7..ea502d8c7e 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -236,28 +236,28 @@ static int AppendUnicodeToBuffer(char *&buffer, size_t &cbBufferEnd, size_t &cbB int begin = (code == '1');
switch (line[1]) {
case 'b':
- CopyMemory(d, begin ? "\\b " : "\\b0 ", begin ? 3 : 4);
+ memcpy(d, begin ? "\\b " : "\\b0 ", begin ? 3 : 4);
d += (begin ? 3 : 4);
line += 3;
continue;
case 'i':
- CopyMemory(d, begin ? "\\i " : "\\i0 ", begin ? 3 : 4);
+ memcpy(d, begin ? "\\i " : "\\i0 ", begin ? 3 : 4);
d += (begin ? 3 : 4);
line += 3;
continue;
case 'u':
- CopyMemory(d, begin ? "\\ul " : "\\ul0 ", begin ? 4 : 5);
+ memcpy(d, begin ? "\\ul " : "\\ul0 ", begin ? 4 : 5);
d += (begin ? 4 : 5);
line += 3;
continue;
case 's':
- CopyMemory(d, begin ? "\\strike " : "\\strike0 ", begin ? 8 : 9);
+ memcpy(d, begin ? "\\strike " : "\\strike0 ", begin ? 8 : 9);
d += (begin ? 8 : 9);
line += 3;
continue;
case 'c':
begin = (code == 'x');
- CopyMemory(d, "\\cf", 3);
+ memcpy(d, "\\cf", 3);
if (begin) {
d[3] = (char)line[3];
d[4] = (char)line[4];
@@ -278,16 +278,16 @@ static int AppendUnicodeToBuffer(char *&buffer, size_t &cbBufferEnd, size_t &cbB }
}
if (*line == '\r' && line[1] == '\n') {
- CopyMemory(d, "\\line ", 6);
+ memcpy(d, "\\line ", 6);
line++;
d += 6;
}
else if (*line == '\n') {
- CopyMemory(d, "\\line ", 6);
+ memcpy(d, "\\line ", 6);
d += 6;
}
else if (*line == '\t') {
- CopyMemory(d, "\\tab ", 5);
+ memcpy(d, "\\tab ", 5);
d += 5;
}
else if (*line == '\\' || *line == '{' || *line == '}') {
@@ -341,26 +341,26 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int }
switch (tag) {
case 'b':
- CopyMemory(*buffer + i, begin ? "\\b1 " : "\\b0 ", 4);
+ memcpy(*buffer + i, begin ? "\\b1 " : "\\b0 ", 4);
continue;
case 'i':
- CopyMemory(*buffer + i, begin ? "\\i1 " : "\\i0 ", 4);
+ memcpy(*buffer + i, begin ? "\\i1 " : "\\i0 ", 4);
continue;
case 'u':
MoveMemory(*buffer + i + 2, *buffer + i + 1, *cbBufferEnd - i);
- CopyMemory(*buffer + i, begin ? "\\ul1 " : "\\ul0 ", 5);
+ memcpy(*buffer + i, begin ? "\\ul1 " : "\\ul0 ", 5);
*cbBufferEnd += 1;
continue;
case 's':
*cbBufferAlloced += 20;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
MoveMemory(*buffer + i + 6, *buffer + i + 1, (*cbBufferEnd - i) + 1);
- CopyMemory(*buffer + i, begin ? "\\strike1 " : "\\strike0 ", begin ? 9 : 9);
+ memcpy(*buffer + i, begin ? "\\strike1 " : "\\strike0 ", begin ? 9 : 9);
*cbBufferEnd += 5;
continue;
case 'c':
begin = (code == 'x');
- CopyMemory(*buffer + i, "\\cf", 3);
+ memcpy(*buffer + i, "\\cf", 3);
if (!begin) {
char szTemp[10];
int colindex = GetColorIndex(GetRTFFont(LOWORD(mode) ? (MSGFONTID_MYMSG + (HIWORD(mode) ? 8 : 0)) : (MSGFONTID_YOURMSG + (HIWORD(mode) ? 8 : 0))));
@@ -380,7 +380,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int *buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
MoveMemory(*buffer + i + 6, *buffer + i + 2, *cbBufferEnd - i - 1);
- CopyMemory(*buffer + i, "\\line ", 6);
+ memcpy(*buffer + i, "\\line ", 6);
*cbBufferEnd += 4;
}
else if ((*buffer)[i] == '\n') {
@@ -389,7 +389,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int *buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
MoveMemory(*buffer + i + 6, *buffer + i + 1, *cbBufferEnd - i);
- CopyMemory(*buffer + i, "\\line ", 6);
+ memcpy(*buffer + i, "\\line ", 6);
*cbBufferEnd += 5;
}
else if ((*buffer)[i] == '\t') {
@@ -398,7 +398,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int *buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
MoveMemory(*buffer + i + 5, *buffer + i + 1, *cbBufferEnd - i);
- CopyMemory(*buffer + i, "\\tab ", 5);
+ memcpy(*buffer + i, "\\tab ", 5);
*cbBufferEnd += 4;
}
else if ((*buffer)[i] == '\\' || (*buffer)[i] == '{' || (*buffer)[i] == '}') {
@@ -1169,7 +1169,7 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG dat->bufferLen = (int)mir_strlen(dat->buffer);
}
*pcb = min(cb, dat->bufferLen - dat->bufferOffset);
- CopyMemory(pbBuff, dat->buffer + dat->bufferOffset, *pcb);
+ memcpy(pbBuff, dat->buffer + dat->bufferOffset, *pcb);
dat->bufferOffset += *pcb;
if (dat->bufferOffset == dat->bufferLen)
replaceStr(dat->buffer, NULL);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 3c2078f9c2..95d550d64f 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -96,7 +96,7 @@ entry_found: SendJob &job = m_jobs[iFound]; job.szSendBuffer = (char*)mir_alloc(iLen); - CopyMemory(job.szSendBuffer, dat->sendBuffer, iLen); + memcpy(job.szSendBuffer, dat->sendBuffer, iLen); job.dwFlags = dwFlags; job.dwTime = time(NULL); @@ -128,7 +128,7 @@ static int SendChunkW(WCHAR *chunk, MCONTACT hContact, DWORD dwFlags) ptrA pBuf((char*)mir_alloc(memRequired)); WideCharToMultiByte(codePage, 0, chunk, -1, pBuf, mbcsSize, 0, 0); - CopyMemory(&pBuf[mbcsSize], chunk, (wLen+1) * sizeof(WCHAR)); + memcpy(&pBuf[mbcsSize], chunk, (wLen+1) * sizeof(WCHAR)); return CallContactService(hContact, PSS_MESSAGE, dwFlags, (LPARAM)pBuf); } @@ -152,7 +152,7 @@ static void DoSplitSendW(LPVOID param) size_t iLen = mir_strlen(job->szSendBuffer); WCHAR *wszBegin = (WCHAR*) & job->szSendBuffer[iLen + 1]; WCHAR *wszTemp = (WCHAR*)mir_alloc(sizeof(WCHAR) * (mir_wstrlen(wszBegin) + 1)); - CopyMemory(wszTemp, wszBegin, sizeof(WCHAR) * (mir_wstrlen(wszBegin) + 1)); + memcpy(wszTemp, wszBegin, sizeof(WCHAR) * (mir_wstrlen(wszBegin) + 1)); wszBegin = wszTemp; do { @@ -222,7 +222,7 @@ static void DoSplitSendA(LPVOID param) size_t iLen = mir_strlen(job->szSendBuffer); szTemp = (char *)mir_alloc(iLen + 1); - CopyMemory(szTemp, job->szSendBuffer, iLen + 1); + memcpy(szTemp, job->szSendBuffer, iLen + 1); szBegin = szTemp; do { diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 34595e958e..571498fcd0 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -256,7 +256,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP TCHAR newTemplate[TEMPLATE_LENGTH + 2]; GetWindowText(GetDlgItem(hwndDlg, IDC_EDITTEMPLATE), newTemplate, SIZEOF(newTemplate)); - CopyMemory(tSet->szTemplates[teInfo->inEdit], newTemplate, sizeof(TCHAR) * TEMPLATE_LENGTH); + memcpy(tSet->szTemplates[teInfo->inEdit], newTemplate, sizeof(TCHAR) * TEMPLATE_LENGTH); teInfo->changed = FALSE; teInfo->updateInfo[teInfo->inEdit] = FALSE; Utils::enableDlgControl(hwndDlg, IDC_SAVETEMPLATE, FALSE); @@ -288,7 +288,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP teInfo->changed = FALSE; teInfo->updateInfo[teInfo->inEdit] = FALSE; teInfo->selchanging = TRUE; - CopyMemory(tSet->szTemplates[teInfo->inEdit], LTR_Default.szTemplates[teInfo->inEdit], sizeof(TCHAR) * TEMPLATE_LENGTH); + memcpy(tSet->szTemplates[teInfo->inEdit], LTR_Default.szTemplates[teInfo->inEdit], sizeof(TCHAR) * TEMPLATE_LENGTH); SetDlgItemText(hwndDlg, IDC_EDITTEMPLATE, tSet->szTemplates[teInfo->inEdit]); db_unset(teInfo->hContact, teInfo->rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[teInfo->inEdit]); SetFocus(GetDlgItem(hwndDlg, IDC_EDITTEMPLATE)); @@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP TCHAR szTemp[TEMPLATE_LENGTH + 2]; if (teInfo->changed) { - CopyMemory(szTemp, tSet->szTemplates[teInfo->inEdit], (TEMPLATE_LENGTH * sizeof(TCHAR))); + memcpy(szTemp, tSet->szTemplates[teInfo->inEdit], (TEMPLATE_LENGTH * sizeof(TCHAR))); GetDlgItemText(hwndDlg, IDC_EDITTEMPLATE, tSet->szTemplates[teInfo->inEdit], TEMPLATE_LENGTH); } dbei.szModule = dat->szProto; @@ -366,7 +366,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP StreamInEvents(hwndDlg, 0, 1, 1, &dbei); SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_SETSEL, -1, -1); if (teInfo->changed) - CopyMemory(tSet->szTemplates[teInfo->inEdit], szTemp, TEMPLATE_LENGTH * sizeof(TCHAR)); + memcpy(tSet->szTemplates[teInfo->inEdit], szTemp, TEMPLATE_LENGTH * sizeof(TCHAR)); break; } case WM_DESTROY: diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index cf5863ec1c..f7a3739098 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -532,7 +532,7 @@ void Utils::RTF_CTableInit() rtf_ctable = (TRTFColorTable *)mir_alloc(iSize);
memset(rtf_ctable, 0, iSize);
- CopyMemory(rtf_ctable, _rtf_ctable, iSize);
+ memcpy(rtf_ctable, _rtf_ctable, iSize);
rtf_ctable_size = RTF_CTABLE_DEFSIZE;
}
@@ -632,12 +632,12 @@ INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam int Utils::ReadContainerSettingsFromDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey)
{
- CopyMemory(cs, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
+ memcpy(cs, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
DBVARIANT dbv = { 0 };
if (0 == db_get(hContact, SRMSGMOD_T, szKey ? szKey : CNT_KEYNAME, &dbv)) {
if (dbv.type == DBVT_BLOB && dbv.cpbVal > 0 && dbv.cpbVal <= sizeof(TContainerSettings)) {
- ::CopyMemory((void*)cs, (void*)dbv.pbVal, dbv.cpbVal);
+ ::memcpy((void*)cs, (void*)dbv.pbVal, dbv.cpbVal);
::db_free(&dbv);
if (hContact == 0 && szKey == 0)
cs->fPrivate = false;
@@ -690,7 +690,7 @@ void Utils::ReadPrivateContainerSettings(TContainerData *pContainer, bool fForce if (csTemp.fPrivate || fForce) {
if (pContainer->settings == 0 || pContainer->settings == &PluginConfig.globalContainerSettings)
pContainer->settings = (TContainerSettings *)mir_alloc(sizeof(TContainerSettings));
- CopyMemory((void*)pContainer->settings, (void*)&csTemp, sizeof(TContainerSettings));
+ memcpy((void*)pContainer->settings, (void*)&csTemp, sizeof(TContainerSettings));
pContainer->settings->fPrivate = true;
}
else pContainer->settings = &PluginConfig.globalContainerSettings;
@@ -977,7 +977,7 @@ const wchar_t* Utils::extractURLFromRichEdit(const ENLINK* _e, const HWND hwndRi ::SendMessageW(hwndRich, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (wcschr(tr.lpstrText, '@') != NULL && wcschr(tr.lpstrText, ':') == NULL && wcschr(tr.lpstrText, '/') == NULL) {
::MoveMemory(tr.lpstrText + 7, tr.lpstrText, sizeof(wchar_t) * (tr.chrg.cpMax - tr.chrg.cpMin + 1));
- ::CopyMemory(tr.lpstrText, L"mailto:", 7 * sizeof(wchar_t));
+ ::memcpy(tr.lpstrText, L"mailto:", 7 * sizeof(wchar_t));
}
return(tr.lpstrText);
}
@@ -1082,7 +1082,7 @@ size_t Utils::CopyToClipBoard(const wchar_t *str, const HWND hwndOwner) EmptyClipboard();
HGLOBAL hData = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, i);
- CopyMemory((void*)GlobalLock(hData), str, i);
+ memcpy((void*)GlobalLock(hData), str, i);
GlobalUnlock(hData);
SetClipboardData(CF_UNICODETEXT, hData);
CloseClipboard();
|