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
283db88d
Commit
283db88d
authored
May 02, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
May 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Return a BSTR from get_stringvalue.
parent
fb81961d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
reg.c
dlls/wbemprox/reg.c
+5
-5
No files found.
dlls/wbemprox/reg.c
View file @
283db88d
...
...
@@ -270,24 +270,24 @@ done:
static
HRESULT
get_stringvalue
(
HKEY
root
,
const
WCHAR
*
subkey
,
const
WCHAR
*
name
,
VARIANT
*
value
,
VARIANT
*
retval
)
{
HRESULT
hr
=
S_OK
;
WCHAR
*
buf
=
NULL
;
BSTR
str
=
NULL
;
DWORD
size
;
LONG
res
;
TRACE
(
"%p, %s, %s
\n
"
,
root
,
debugstr_w
(
subkey
),
debugstr_w
(
name
));
if
((
res
=
RegGetValueW
(
root
,
subkey
,
name
,
RRF_RT_REG_SZ
,
NULL
,
NULL
,
&
size
)))
goto
done
;
if
(
!
(
buf
=
heap_alloc
(
size
)))
if
(
!
(
str
=
SysAllocStringLen
(
NULL
,
size
/
sizeof
(
WCHAR
)
-
1
)))
{
hr
=
E_OUTOFMEMORY
;
goto
done
;
}
if
(
!
(
res
=
RegGetValueW
(
root
,
subkey
,
name
,
RRF_RT_REG_SZ
,
NULL
,
buf
,
&
size
)))
set_variant
(
VT_BSTR
,
0
,
buf
,
value
);
if
(
!
(
res
=
RegGetValueW
(
root
,
subkey
,
name
,
RRF_RT_REG_SZ
,
NULL
,
str
,
&
size
)))
set_variant
(
VT_BSTR
,
0
,
str
,
value
);
done:
set_variant
(
VT_UI4
,
res
,
NULL
,
retval
);
heap_free
(
buf
);
if
(
res
)
SysFreeString
(
str
);
return
hr
;
}
...
...
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