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
001e0543
Commit
001e0543
authored
Oct 04, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Handle VT_I4 type in VariantToString().
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55708
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
2c752402
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
propvar.c
dlls/propsys/propvar.c
+8
-6
propsys.c
dlls/propsys/tests/propsys.c
+7
-0
No files found.
dlls/propsys/propvar.c
View file @
001e0543
...
...
@@ -436,7 +436,7 @@ PCWSTR WINAPI VariantToStringWithDefault(const VARIANT *pvar, const WCHAR *defau
*/
HRESULT
WINAPI
VariantToString
(
REFVARIANT
var
,
PWSTR
ret
,
UINT
cch
)
{
WCHAR
*
str
=
NULL
;
WCHAR
buffer
[
64
],
*
str
=
buffer
;
TRACE
(
"%p, %p, %u.
\n
"
,
var
,
ret
,
cch
);
...
...
@@ -445,14 +445,16 @@ HRESULT WINAPI VariantToString(REFVARIANT var, PWSTR ret, UINT cch)
if
(
!
cch
)
return
E_INVALIDARG
;
if
(
V_VT
(
var
)
==
VT_BSTR
)
switch
(
V_VT
(
var
)
)
{
case
VT_BSTR
:
str
=
V_BSTR
(
var
);
}
else
{
break
;
case
VT_I4
:
swprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
L"%d"
,
V_I4
(
var
));
break
;
default:
FIXME
(
"Unsupported type %d.
\n
"
,
V_VT
(
var
));
return
E_NOTIMPL
;
}
...
...
dlls/propsys/tests/propsys.c
View file @
001e0543
...
...
@@ -2290,6 +2290,13 @@ static void test_VariantToString(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
buff
[
0
],
"Unexpected buffer.
\n
"
);
buff
[
0
]
=
0
;
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
567
;
hr
=
VariantToString
(
&
v
,
buff
,
64
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
wcscmp
(
buff
,
L"567"
),
"Unexpected buffer %s.
\n
"
,
wine_dbgstr_w
(
buff
));
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
SysAllocString
(
L"test1"
);
...
...
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