Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ff960114
Commit
ff960114
authored
Jun 22, 2017
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Add support for VT_LPSTR and VT_LPWSTR to PropVariantCompareEx.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5cbc84e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
propvar.c
dlls/propsys/propvar.c
+36
-2
propsys.c
dlls/propsys/tests/propsys.c
+2
-2
No files found.
dlls/propsys/propvar.c
View file @
ff960114
...
...
@@ -18,8 +18,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#define NONAMELESSUNION
...
...
@@ -112,6 +116,25 @@ static HRESULT PROPVAR_ConvertNumber(REFPROPVARIANT pv, int dest_bits,
src_signed
=
FALSE
;
*
res
=
0
;
break
;
case
VT_LPSTR
:
{
char
*
end
;
*
res
=
strtoll
(
pv
->
u
.
pszVal
,
&
end
,
0
);
if
(
pv
->
u
.
pszVal
==
end
)
return
DISP_E_TYPEMISMATCH
;
src_signed
=
*
res
<
0
;
break
;
}
case
VT_LPWSTR
:
case
VT_BSTR
:
{
WCHAR
*
end
;
*
res
=
strtolW
(
pv
->
u
.
pwszVal
,
&
end
,
0
);
if
(
pv
->
u
.
pwszVal
==
end
)
return
DISP_E_TYPEMISMATCH
;
src_signed
=
*
res
<
0
;
break
;
}
default:
FIXME
(
"unhandled vt %d
\n
"
,
pv
->
vt
);
return
E_NOTIMPL
;
...
...
@@ -698,8 +721,19 @@ INT WINAPI PropVariantCompareEx(REFPROPVARIANT propvar1, REFPROPVARIANT propvar2
CMP_INT_VALUE
(
uhVal
.
QuadPart
);
break
;
case
VT_BSTR
:
/* FIXME: Use string flags. */
res
=
lstrcmpW
(
propvar1
->
u
.
bstrVal
,
propvar2
->
u
.
bstrVal
);
case
VT_LPWSTR
:
/* FIXME: Use other string flags. */
if
(
flags
&
(
PVCF_USESTRCMPI
|
PVCF_USESTRCMPIC
))
res
=
lstrcmpiW
(
propvar1
->
u
.
bstrVal
,
propvar2_converted
->
u
.
bstrVal
);
else
res
=
lstrcmpW
(
propvar1
->
u
.
bstrVal
,
propvar2_converted
->
u
.
bstrVal
);
break
;
case
VT_LPSTR
:
/* FIXME: Use other string flags. */
if
(
flags
&
(
PVCF_USESTRCMPI
|
PVCF_USESTRCMPIC
))
res
=
lstrcmpiA
(
propvar1
->
u
.
pszVal
,
propvar2_converted
->
u
.
pszVal
);
else
res
=
lstrcmpA
(
propvar1
->
u
.
pszVal
,
propvar2_converted
->
u
.
pszVal
);
break
;
default:
FIXME
(
"vartype %d not handled
\n
"
,
propvar1
->
vt
);
...
...
dlls/propsys/tests/propsys.c
View file @
ff960114
...
...
@@ -735,10 +735,10 @@ static void test_PropVariantCompare(void)
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
i2_2
,
&
str_2
,
0
,
0
);
todo_wine
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
i2_2
,
&
str_02
,
0
,
0
);
todo_wine
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
res
=
PropVariantCompareEx
(
&
str_2
,
&
i2_2
,
0
,
0
);
todo_wine
ok
(
res
==
0
,
"res=%i
\n
"
,
res
);
...
...
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