diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 771a3306a28..3d495dbeed0 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -822,7 +822,7 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, VARIANT* pvar) hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL); if (SUCCEEDED(hr)) - TRACE("Moniker = %s\n", debugstr_w(V_UNION(pvar, bstrVal))); + TRACE("Moniker = %s\n", debugstr_w(V_BSTR(pvar))); if (pPropBagCat) IPropertyBag_Release(pPropBagCat); @@ -1071,7 +1071,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, } } - hr = IFilterGraph2_AddFilter(iface, pfilter, V_UNION(&var, bstrVal)); + hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var)); if (FAILED(hr)) { WARN("Unable to add filter (%x)\n", hr); IBaseFilter_Release(pfilter); @@ -1405,7 +1405,7 @@ static HRESULT WINAPI FilterGraph2_Render(IFilterGraph2 *iface, IPin *ppinOut) goto error; } - hr = IFilterGraph2_AddFilter(iface, pfilter, V_UNION(&var, bstrVal)); + hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var)); if (FAILED(hr)) { WARN("Unable to add filter (%x)\n", hr); IBaseFilter_Release(pfilter); @@ -1445,10 +1445,10 @@ static HRESULT WINAPI FilterGraph2_Render(IFilterGraph2 *iface, IPin *ppinOut) IPin_Release(ppinfilter); if (FAILED(hr)) { - WARN("Unable to connect %s to renderer (%x)\n", debugstr_w(V_UNION(&var, bstrVal)), hr); + WARN("Unable to connect %s to renderer (%x)\n", debugstr_w(V_BSTR(&var)), hr); goto error; } - TRACE("Connected, recursing %s\n", debugstr_w(V_UNION(&var, bstrVal))); + TRACE("Connected, recursing %s\n", debugstr_w(V_BSTR(&var))); VariantClear(&var); diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 6d02a7a15fc..a462fbcdde9 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -366,7 +366,7 @@ static HRESULT FM2_WriteFriendlyName(IPropertyBag * pPropBag, LPCWSTR szName) BSTR value; V_VT(&var) = VT_BSTR; - V_UNION(&var, bstrVal) = value = SysAllocString(szName); + V_BSTR(&var) = value = SysAllocString(szName); ret = IPropertyBag_Write(pPropBag, wszFriendlyName, &var); SysFreeString(value); @@ -385,7 +385,7 @@ static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid) if (SUCCEEDED(hr)) { V_VT(&var) = VT_BSTR; - V_UNION(&var, bstrVal) = wszClsid; + V_BSTR(&var) = wszClsid; hr = IPropertyBag_Write(pPropBag, wszClsidName, &var); } CoTaskMemFree(wszClsid); @@ -797,7 +797,7 @@ static HRESULT WINAPI FilterMapper3_RegisterFilter( } V_VT(&var) = VT_ARRAY | VT_UI1; - V_UNION(&var, parray) = psa; + V_ARRAY(&var) = psa; if (SUCCEEDED(hr)) hr = IPropertyBag_Write(pPropBag, wszFilterDataName, &var); @@ -946,7 +946,7 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters( if (SUCCEEDED(hrSub)) hrSub = IPropertyBag_Read(pPropBagCat, wszMeritName, &var, NULL); - if (SUCCEEDED(hrSub) && (V_UNION(&var, ulVal) >= dwMerit)) + if (SUCCEEDED(hrSub) && (V_UI4(&var) >= dwMerit)) { CLSID clsidCat; IEnumMoniker * pEnum; @@ -959,14 +959,14 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters( VARIANT temp; V_VT(&temp) = VT_EMPTY; IPropertyBag_Read(pPropBagCat, wszFriendlyName, &temp, NULL); - TRACE("Considering category %s\n", debugstr_w(V_UNION(&temp, bstrVal))); + TRACE("Considering category %s\n", debugstr_w(V_BSTR(&temp))); VariantClear(&temp); } hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL); if (SUCCEEDED(hrSub)) - hrSub = CLSIDFromString(V_UNION(&var, bstrVal), &clsidCat); + hrSub = CLSIDFromString(V_BSTR(&var), &clsidCat); if (SUCCEEDED(hrSub)) hrSub = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum, &clsidCat, &pEnum, 0); @@ -993,7 +993,7 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters( VARIANT temp; V_VT(&temp) = VT_EMPTY; IPropertyBag_Read(pPropBag, wszFriendlyName, &temp, NULL); - TRACE("Considering filter %s\n", debugstr_w(V_UNION(&temp, bstrVal))); + TRACE("Considering filter %s\n", debugstr_w(V_BSTR(&temp))); VariantClear(&temp); } @@ -1003,13 +1003,13 @@ static HRESULT WINAPI FilterMapper3_EnumMatchingFilters( } if (SUCCEEDED(hrSub)) - hrSub = SafeArrayAccessData(V_UNION(&var, parray), (LPVOID*)&pData); + hrSub = SafeArrayAccessData(V_ARRAY(&var), (LPVOID*)&pData); if (SUCCEEDED(hrSub)) hrSub = FM2_ReadFilterData(pData, &rf2); if (pData) - SafeArrayUnaccessData(V_UNION(&var, parray)); + SafeArrayUnaccessData(V_ARRAY(&var)); VariantClear(&var); @@ -1221,7 +1221,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL); if (SUCCEEDED(hrSub)) - hrSub = CLSIDFromString(V_UNION(&var, bstrVal), &clsid); + hrSub = CLSIDFromString(V_BSTR(&var), &clsid); VariantClear(&var); @@ -1230,14 +1230,14 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( if (SUCCEEDED(hrSub)) { - len = (strlenW(V_UNION(&var, bstrVal))+1) * sizeof(WCHAR); + len = (strlenW(V_BSTR(&var))+1) * sizeof(WCHAR); if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2))) hr = E_OUTOFMEMORY; } if (SUCCEEDED(hrSub) && regfilters[idx].Name) { - memcpy(regfilters[idx].Name, V_UNION(&var, bstrVal), len); + memcpy(regfilters[idx].Name, V_BSTR(&var), len); regfilters[idx].Clsid = clsid; idx++; } diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c index d21509d23ae..bf1839aa5f3 100644 --- a/dlls/quartz/tests/filtermapper.c +++ b/dlls/quartz/tests/filtermapper.c @@ -62,7 +62,7 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum) { CHAR val1[512], val2[512]; - WideCharToMultiByte(CP_ACP, 0, V_UNION(&var, bstrVal), -1, val1, sizeof(val1), 0, 0); + WideCharToMultiByte(CP_ACP, 0, V_BSTR(&var), -1, val1, sizeof(val1), 0, 0); WideCharToMultiByte(CP_ACP, 0, wszFilterName, -1, val2, sizeof(val2), 0, 0); if (!lstrcmpA(val1, val2)) found = TRUE; }