Dmitry Timoshkov : shlwapi: Make some data const.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 28 06:05:56 CST 2006
Module: wine
Branch: master
Commit: 884e7eed4a932632d95372b749a807bd3e065331
URL: http://source.winehq.org/git/wine.git/?a=commit;h=884e7eed4a932632d95372b749a807bd3e065331
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Tue Nov 28 18:39:32 2006 +0800
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 7d5a613..689b040 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -370,9 +370,10 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared
*/
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 RegisterDefaultAcceptHead
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(LPUNKNOW
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 idst
*/
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 3cec25c..8d4e4c1 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 */
More information about the wine-cvs
mailing list