Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b5cd4775
Commit
b5cd4775
authored
Sep 02, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use V_* macros to access variant members.
parent
3c716499
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
filtergraph.c
dlls/quartz/filtergraph.c
+5
-5
filtermapper.c
dlls/quartz/filtermapper.c
+12
-12
filtermapper.c
dlls/quartz/tests/filtermapper.c
+1
-1
No files found.
dlls/quartz/filtergraph.c
View file @
b5cd4775
...
...
@@ -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
);
...
...
dlls/quartz/filtermapper.c
View file @
b5cd4775
...
...
@@ -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_U
NION
(
&
var
,
ulVal
)
>=
dwMerit
))
if
(
SUCCEEDED
(
hrSub
)
&&
(
V_U
I4
(
&
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
++
;
}
...
...
dlls/quartz/tests/filtermapper.c
View file @
b5cd4775
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment