Nikolay Sivov : shlwapi: Don't cast WCHAR string to BSTR.

Alexandre Julliard julliard at winehq.org
Mon Mar 15 12:19:37 CDT 2010


Module: wine
Branch: master
Commit: c8cd1502589a489130a92b96d09568b013fc686a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c8cd1502589a489130a92b96d09568b013fc686a

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Mar 12 18:53:36 2010 +0300

shlwapi: Don't cast WCHAR string to BSTR.

---

 dlls/shlwapi/ordinal.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index 412dac1..364bbfe 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -402,7 +402,9 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown)
     V_VT(&var) = VT_UNKNOWN;
     V_UNKNOWN(&var) = (IUnknown*)pIEnumFormatEtc;
 
-    hRet = IWebBrowserApp_PutProperty(pBrowser, (BSTR)szProperty, var);
+    property = SysAllocString(szProperty);
+    hRet = IWebBrowserApp_PutProperty(pBrowser, property, var);
+    SysFreeString(property);
     if (FAILED(hRet))
     {
        IEnumFORMATETC_Release(pIEnumFormatEtc);




More information about the wine-cvs mailing list