From 884e7eed4a932632d95372b749a807bd3e065331 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 28 Nov 2006 18:39:32 +0800 Subject: [PATCH] shlwapi: Make some data const. --- dlls/shlwapi/ordinal.c | 11 +++++++---- dlls/shlwapi/reg.c | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 7d5a6137f1..689b0400c7 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -370,9 +370,10 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwDstProcId, DWORD dwSrcProcId, */ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown) { - static WCHAR szProperty[] = { '{','D','0','F','C','A','4','2','0', + static const WCHAR szProperty[] = { '{','D','0','F','C','A','4','2','0', '-','D','3','F','5','-','1','1','C','F', '-','B','2','1','1','-','0', '0','A','A','0','0','4','A','E','8','3','7','}','\0' }; + BSTR property; IEnumFORMATETC* pIEnumFormatEtc = NULL; VARIANTARG var; HRESULT hRet; @@ -388,7 +389,9 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown) V_VT(&var) = VT_EMPTY; /* The property we get is the browsers clipboard enumerator */ - hRet = IWebBrowserApp_GetProperty(pBrowser, (BSTR)szProperty, &var); + property = SysAllocString(szProperty); + hRet = IWebBrowserApp_GetProperty(pBrowser, property, &var); + SysFreeString(property); if (FAILED(hRet)) return hRet; @@ -2577,7 +2580,7 @@ HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite) HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG z) { - static const char* szClass = "WorkerA"; + static const char szClass[] = "WorkerA"; WNDCLASSA wc; HWND hWnd; @@ -2814,7 +2817,7 @@ BOOL WINAPI GUIDFromStringW(LPCWSTR idstr, CLSID *id) */ DWORD WINAPI WhichPlatform(void) { - static LPCSTR szIntegratedBrowser = "IntegratedBrowser"; + static const char szIntegratedBrowser[] = "IntegratedBrowser"; static DWORD dwState = 0; HKEY hKey; DWORD dwRet, dwData, dwSize; diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 3cec25c937..8d4e4c14c5 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -33,16 +33,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); /* Key/Value names for MIME content types */ -static const char *lpszContentTypeA = "Content Type"; +static const char lpszContentTypeA[] = "Content Type"; static const WCHAR lpszContentTypeW[] = { 'C','o','n','t','e','n','t',' ','T','y','p','e','\0'}; -static const char *szMimeDbContentA = "MIME\\Database\\Content Type\\"; +static const char szMimeDbContentA[] = "MIME\\Database\\Content Type\\"; static const WCHAR szMimeDbContentW[] = { 'M', 'I', 'M','E','\\', 'D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t', ' ','T','y','p','e','\\', 0 }; static const DWORD dwLenMimeDbContent = 27; /* strlen of szMimeDbContentA/W */ -static const char *szExtensionA = "Extension"; +static const char szExtensionA[] = "Extension"; static const WCHAR szExtensionW[] = { 'E', 'x', 't','e','n','s','i','o','n','\0' }; /* internal structure of what the HUSKEY points to */ -- 2.32.0.93.g670b81a890