Commit 4964c1e9 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleview: Removed use of strlenW, strcmpW and strcpyW functions.

parent d01063e1
......@@ -59,7 +59,7 @@ void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL addings)
if(retEnum != ERROR_SUCCESS)
{
if(!i && strlenW(wszKeyName) > 1)
if(!i && lstrlenW(wszKeyName) > 1)
{
tvis.item.pszText = (LPWSTR)wszKeyName;
addPlace = TreeView_InsertItem(details.hReg, &tvis);
......@@ -75,8 +75,8 @@ void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL addings)
for(j=0; j<MAX_LOAD_STRING/3-1; j++)
wsprintfW(&wszBuf[3*j], wszBinary, (int)((unsigned char)wszData[j]));
wszBuf[(lenData*3>=MAX_LOAD_STRING ? MAX_LOAD_STRING-1 : lenData*3)] = '\0';
strcpyW(wszData, wszBuf);
strcpyW(&wszData[MAX_LOAD_STRING-5], wszDots);
lstrcpyW(wszData, wszBuf);
lstrcpyW(&wszData[MAX_LOAD_STRING-5], wszDots);
}
if(lenName) wsprintfW(wszTree, wszFormat1, wszKeyName, wszName, wszData);
......@@ -86,9 +86,9 @@ void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL addings)
if(addings && !memcmp(wszName, wszAppID, sizeof(WCHAR[6])))
{
strcpyW(wszTree, wszName);
lstrcpyW(wszTree, wszName);
memmove(&wszData[6], wszData, sizeof(WCHAR[MAX_LOAD_STRING-6]));
strcpyW(wszData, wszCLSID);
lstrcpyW(wszData, wszCLSID);
wszData[5] = '\\';
if(RegOpenKey(HKEY_CLASSES_ROOT, wszData, &hCurKey) != ERROR_SUCCESS)
......@@ -229,7 +229,7 @@ void CreateReg(WCHAR *buffer)
return;
lastLenBuffer = lenBuffer+1;
lenBuffer = strlenW(buffer);
lenBuffer = lstrlenW(buffer);
*path = '\\';
path += 1;
......@@ -287,7 +287,7 @@ void RefreshDetails(HTREEITEM item)
if(tvi.lParam)
wsprintfW(wszStaticText, wszFormat, tvi.pszText, ((ITEM_INFO *)tvi.lParam)->clsid);
else strcpyW(wszStaticText, tvi.pszText);
else lstrcpyW(wszStaticText, tvi.pszText);
SetWindowText(details.hStatic, wszStaticText);
......
......@@ -24,7 +24,6 @@
#include <winreg.h>
#include <commctrl.h>
#include <unknwn.h>
#include <wine/unicode.h>
#include "resource.h"
......
......@@ -44,8 +44,8 @@ LPARAM CreateITEM_INFO(INT flag, const WCHAR *info, const WCHAR *clsid)
memset(reg, 0, sizeof(ITEM_INFO));
reg->cFlag = flag;
strcpyW(reg->info, info);
if(clsid) strcpyW(reg->clsid, clsid);
lstrcpyW(reg->info, info);
if(clsid) lstrcpyW(reg->clsid, clsid);
return (LPARAM)reg;
}
......@@ -116,7 +116,7 @@ void CreateInst(HTREEITEM item)
LoadString(globals.hMainInst, IDS_ERROR_UNKN, wszFlagName, MAX_LOAD_STRING);
}
wsprintfW(&wszMessage[strlenW(wszMessage)], wszFormat,
wsprintfW(&wszMessage[lstrlenW(wszMessage)], wszFormat,
wszFlagName, (unsigned)hRes);
MessageBox(globals.hMainWnd, wszMessage, wszTitle, MB_OK|MB_ICONEXCLAMATION);
return;
......@@ -151,8 +151,8 @@ void CreateInst(HTREEITEM item)
{
IUnknown_Release(unk);
strcpyW(wszRegPath, wszInterface);
strcpyW(&wszRegPath[strlenW(wszRegPath)], ((ITEM_INFO *)tvi.lParam)->clsid);
lstrcpyW(wszRegPath, wszInterface);
lstrcpyW(&wszRegPath[lstrlenW(wszRegPath)], ((ITEM_INFO *)tvi.lParam)->clsid);
tvis.item.lParam = CreateITEM_INFO(REGTOP|INTERFACE|REGPATH,
wszRegPath, ((ITEM_INFO *)tvi.lParam)->clsid);
SendMessage(globals.hTree, TVM_INSERTITEM, 0, (LPARAM)&tvis);
......@@ -216,7 +216,7 @@ BOOL CreateRegPath(HTREEITEM item, WCHAR *buffer, int bufSize)
if(tvi.lParam && (((ITEM_INFO *)tvi.lParam)->cFlag & (REGPATH|REGTOP)))
{
bufLen = strlenW(((ITEM_INFO *)tvi.lParam)->info);
bufLen = lstrlenW(((ITEM_INFO *)tvi.lParam)->info);
memmove(&buffer[bufLen], buffer, sizeof(WCHAR[bufSize-bufLen]));
memcpy(buffer, ((ITEM_INFO *)tvi.lParam)->info, sizeof(WCHAR[bufLen]));
}
......@@ -295,7 +295,7 @@ void AddCOMandAll(void)
tvi.hItem = curSearch;
SendMessage(globals.hTree, TVM_GETITEM, 0, (LPARAM)&tvi);
if(tvi.lParam && !strcmpW(((ITEM_INFO *)tvi.lParam)->info, wszComp))
if(tvi.lParam && !lstrcmpW(((ITEM_INFO *)tvi.lParam)->info, wszComp))
{
tvis.hParent = curSearch;
......@@ -403,7 +403,7 @@ void AddTypeLib(void)
LoadString(globals.hMainInst, IDS_TL_VER, wszVer,
sizeof(WCHAR[MAX_LOAD_STRING]));
wsprintfW(&buffer[strlenW(buffer)], wszFormat, wszVer, valName);
wsprintfW(&buffer[lstrlenW(buffer)], wszFormat, wszVer, valName);
tvis.item.pszText = buffer;
}
else tvis.item.pszText = valName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment