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
0a508e49
Commit
0a508e49
authored
Mar 15, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Add support for VT_CLSID in PropVariantCompareEx().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63e03de9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
propvar.c
dlls/propsys/propvar.c
+8
-1
propsys.c
dlls/propsys/tests/propsys.c
+35
-0
No files found.
dlls/propsys/propvar.c
View file @
0a508e49
...
...
@@ -807,6 +807,9 @@ static BOOL isemptyornull(const PROPVARIANT *propvar)
}
return
i
==
propvar
->
u
.
parray
->
cDims
;
}
if
(
propvar
->
vt
==
VT_CLSID
)
return
!
propvar
->
u
.
puuid
;
/* FIXME: vectors, byrefs, errors? */
return
FALSE
;
}
...
...
@@ -893,8 +896,12 @@ INT WINAPI PropVariantCompareEx(REFPROPVARIANT propvar1, REFPROPVARIANT propvar2
else
res
=
lstrcmpA
(
propvar1
->
u
.
pszVal
,
propvar2_converted
->
u
.
pszVal
);
break
;
case
VT_CLSID
:
res
=
memcmp
(
propvar1
->
u
.
puuid
,
propvar2
->
u
.
puuid
,
sizeof
(
*
propvar1
->
u
.
puuid
));
if
(
res
)
res
=
res
>
0
?
1
:
-
1
;
break
;
default:
FIXME
(
"vartype %
d
not handled
\n
"
,
propvar1
->
vt
);
FIXME
(
"vartype %
#x
not handled
\n
"
,
propvar1
->
vt
);
res
=
-
1
;
break
;
}
...
...
dlls/propsys/tests/propsys.c
View file @
0a508e49
...
...
@@ -660,6 +660,7 @@ static void test_PropVariantToStringAlloc(void)
static
void
test_PropVariantCompare
(
void
)
{
PROPVARIANT
empty
,
null
,
emptyarray
,
i2_0
,
i2_2
,
i4_large
,
i4_largeneg
,
i4_2
,
str_2
,
str_02
,
str_b
;
PROPVARIANT
clsid_null
,
clsid
,
clsid2
;
INT
res
;
static
const
WCHAR
str_2W
[]
=
{
'2'
,
0
};
static
const
WCHAR
str_02W
[]
=
{
'0'
,
'2'
,
0
};
...
...
@@ -704,6 +705,12 @@ static void test_PropVariantCompare(void)
str_02
.
u
.
bstrVal
=
SysAllocString
(
str_02W
);
str_b
.
vt
=
VT_BSTR
;
str_b
.
u
.
bstrVal
=
SysAllocString
(
str_bW
);
clsid_null
.
vt
=
VT_CLSID
;
clsid_null
.
u
.
puuid
=
NULL
;
clsid
.
vt
=
VT_CLSID
;
clsid
.
u
.
puuid
=
(
GUID
*
)
&
dummy_guid
;
clsid2
.
vt
=
VT_CLSID
;
clsid2
.
u
.
puuid
=
(
GUID
*
)
&
GUID_NULL
;
res
=
PropVariantCompareEx
(
&
empty
,
&
empty
,
0
,
0
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
...
...
@@ -772,6 +779,34 @@ static void test_PropVariantCompare(void)
res
=
PropVariantCompareEx
(
&
i4_large
,
&
str_b
,
0
,
0
);
todo_wine
ok
(
res
==
-
5
/* ??? */
,
"res=%i
\n
"
,
res
);
/* VT_CLSID */
res
=
PropVariantCompareEx
(
&
clsid_null
,
&
clsid_null
,
0
,
0
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid_null
,
&
clsid_null
,
0
,
PVCF_TREATEMPTYASGREATERTHAN
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid
,
&
clsid
,
0
,
0
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid
,
&
clsid2
,
0
,
0
);
ok
(
res
==
1
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid2
,
&
clsid
,
0
,
0
);
ok
(
res
==
-
1
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid_null
,
&
clsid
,
0
,
0
);
ok
(
res
==
-
1
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid
,
&
clsid_null
,
0
,
0
);
ok
(
res
==
1
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid_null
,
&
clsid
,
0
,
PVCF_TREATEMPTYASGREATERTHAN
);
ok
(
res
==
1
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
clsid
,
&
clsid_null
,
0
,
PVCF_TREATEMPTYASGREATERTHAN
);
ok
(
res
==
-
1
,
"res=%i
\n
"
,
res
);
SysFreeString
(
str_2
.
u
.
bstrVal
);
SysFreeString
(
str_02
.
u
.
bstrVal
);
SysFreeString
(
str_b
.
u
.
bstrVal
);
...
...
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