quartz: Don't cast WSTR to BSTR, convert properly instead.

This commit is contained in:
Nikolay Sivov 2010-03-12 19:29:12 +03:00 committed by Alexandre Julliard
parent c8cd150258
commit da550ed257
1 changed files with 7 additions and 2 deletions

View File

@ -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)