From b5b57169c2833b9e70cc4cff7cae127c11f02683 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 13 Dec 2014 09:25:14 +0000 Subject: CopyMemory -> memcpy git-svn-id: http://svn.miranda-ng.org/main/trunk@11363 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SMS/src/SMS_svc.cpp | 4 ++-- plugins/SMS/src/functions.cpp | 10 +++++----- plugins/SMS/src/receive.cpp | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/SMS/src') diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 12090b2ed2..05678d0046 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -4,13 +4,13 @@ int LoadServices(void) { char szServiceFunction[MAX_PATH],*pszServiceFunctionName; - CopyMemory(szServiceFunction,PROTOCOL_NAMEA,PROTOCOL_NAME_SIZE); + memcpy(szServiceFunction,PROTOCOL_NAMEA,PROTOCOL_NAME_SIZE); pszServiceFunctionName=szServiceFunction+PROTOCOL_NAME_LEN; // Service creation for (size_t i=0;idwReadedStringLen)) { - CopyMemory(lpwszRetBuff,dbv.pszVal,(dwReadedStringLen*sizeof(WCHAR)));//include null terminated + memcpy(lpwszRetBuff,dbv.pszVal,(dwReadedStringLen*sizeof(WCHAR)));//include null terminated (*((WCHAR*)(lpwszRetBuff+dwReadedStringLen)))=0; bRet=TRUE; }else{ @@ -310,7 +310,7 @@ BOOL GetXMLFieldExBuff(LPSTR lpszXML,size_t dwXMLSize,LPSTR lpszBuff,size_t dwBu if (lpszDataStart) { size_t dwBuffSizeRet=min((dwBuffSize-2),(size_t)((lpszTagStart-1)-lpszDataStart)); - if (lpszBuff && dwBuffSize) CopyMemory(lpszBuff,lpszDataStart,dwBuffSizeRet);(*((WORD*)(lpszBuff+dwBuffSizeRet)))=0; + if (lpszBuff && dwBuffSize) memcpy(lpszBuff,lpszDataStart,dwBuffSizeRet);(*((WORD*)(lpszBuff+dwBuffSizeRet)))=0; if (pdwBuffSizeRet) (*pdwBuffSizeRet)=dwBuffSizeRet; bRet=TRUE; } @@ -373,8 +373,8 @@ DWORD ReplaceInBuff(LPVOID lpInBuff,size_t dwInBuffSize,size_t dwReplaceItemsCou if (plpszFound[dwFirstFoundedIndex]) { dwMemPartToCopy=(plpszFound[dwFirstFoundedIndex]-lpszMessageCurPrev); if (lpszMessageConvertedMax > (lpszMessageConvertedCur+(dwMemPartToCopy+pdwInReplaceItemsCounts[dwFirstFoundedIndex]))) { - CopyMemory(lpszMessageConvertedCur,lpszMessageCurPrev,dwMemPartToCopy);lpszMessageConvertedCur+=dwMemPartToCopy; - CopyMemory(lpszMessageConvertedCur,plpOutReplaceItems[dwFirstFoundedIndex],pdwOutReplaceItemsCounts[dwFirstFoundedIndex]);lpszMessageConvertedCur+=pdwOutReplaceItemsCounts[dwFirstFoundedIndex]; + memcpy(lpszMessageConvertedCur,lpszMessageCurPrev,dwMemPartToCopy);lpszMessageConvertedCur+=dwMemPartToCopy; + memcpy(lpszMessageConvertedCur,plpOutReplaceItems[dwFirstFoundedIndex],pdwOutReplaceItemsCounts[dwFirstFoundedIndex]);lpszMessageConvertedCur+=pdwOutReplaceItemsCounts[dwFirstFoundedIndex]; lpszMessageCurPrev=(plpszFound[dwFirstFoundedIndex]+pdwInReplaceItemsCounts[dwFirstFoundedIndex]); for(i=0;i