Nikolay Sivov : quartz: Don't cast WSTR to BSTR, convert properly instead.
Alexandre Julliard
julliard at winehq.org
Mon Mar 15 12:19:38 CDT 2010
Module: wine
Branch: master
Commit: da550ed25731eb6f0c46041da39e2e371c8ebe5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da550ed25731eb6f0c46041da39e2e371c8ebe5a
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Mar 12 19:29:12 2010 +0300
quartz: Don't cast WSTR to BSTR, convert properly instead.
---
dlls/quartz/filtermapper.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c
index 7b8d954..bacb729 100644
--- a/dlls/quartz/filtermapper.c
+++ b/dlls/quartz/filtermapper.c
@@ -479,11 +479,16 @@ static HRESULT WINAPI FilterMapper2_UnregisterFilter(
static HRESULT FM2_WriteFriendlyName(IPropertyBag * pPropBag, LPCWSTR szName)
{
VARIANT var;
+ HRESULT ret;
+ BSTR value;
V_VT(&var) = VT_BSTR;
- V_UNION(&var, bstrVal) = (BSTR)szName;
+ V_UNION(&var, bstrVal) = value = SysAllocString(szName);
- return IPropertyBag_Write(pPropBag, wszFriendlyName, &var);
+ ret = IPropertyBag_Write(pPropBag, wszFriendlyName, &var);
+ SysFreeString(value);
+
+ return ret;
}
static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid)
More information about the wine-cvs
mailing list