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
98505b40
Commit
98505b40
authored
Dec 23, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Simplify OleRegGetUserType() using existing helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1219abfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
32 deletions
+10
-32
ole2.c
dlls/ole32/ole2.c
+10
-32
No files found.
dlls/ole32/ole2.c
View file @
98505b40
...
...
@@ -677,47 +677,26 @@ HRESULT WINAPI OleRegGetUserType(
DWORD
dwFormOfType
,
LPOLESTR
*
pszUserType
)
{
WCHAR
keyName
[
60
];
DWORD
dwKeyType
;
DWORD
cbData
;
HKEY
clsidKey
;
LONG
hres
;
/*
* Initialize the out parameter.
*/
*
pszUserType
=
NULL
;
HRESULT
hres
;
LONG
ret
;
/*
* Build the key name we're looking for
*/
sprintfW
(
keyName
,
clsidfmtW
,
clsid
->
Data1
,
clsid
->
Data2
,
clsid
->
Data3
,
clsid
->
Data4
[
0
],
clsid
->
Data4
[
1
],
clsid
->
Data4
[
2
],
clsid
->
Data4
[
3
],
clsid
->
Data4
[
4
],
clsid
->
Data4
[
5
],
clsid
->
Data4
[
6
],
clsid
->
Data4
[
7
]
);
TRACE
(
"(%s, %d, %p)
\n
"
,
debugstr_guid
(
clsid
),
dwFormOfType
,
pszUserType
);
TRACE
(
"(%s, %d, %p)
\n
"
,
debugstr_w
(
keyName
),
dwFormOfType
,
pszUserType
)
;
*
pszUserType
=
NULL
;
/*
* Open the class id Key
*/
hres
=
open_classes_key
(
HKEY_CLASSES_ROOT
,
keyName
,
MAXIMUM_ALLOWED
,
&
clsidKey
);
if
(
hres
!=
ERROR_SUCCESS
)
return
REGDB_E_CLASSNOTREG
;
hres
=
COM_OpenKeyForCLSID
(
clsid
,
NULL
,
KEY_READ
,
&
clsidKey
);
if
(
FAILED
(
hres
))
return
hres
;
/*
* Retrieve the size of the name string.
*/
cbData
=
0
;
hres
=
RegQueryValueExW
(
clsidKey
,
emptyW
,
NULL
,
&
dwKeyType
,
NULL
,
&
cbData
);
if
(
hres
!=
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
clsidKey
,
emptyW
,
NULL
,
&
dwKeyType
,
NULL
,
&
cbData
))
{
RegCloseKey
(
clsidKey
);
return
REGDB_E_READREGDB
;
...
...
@@ -734,7 +713,7 @@ HRESULT WINAPI OleRegGetUserType(
return
E_OUTOFMEMORY
;
}
hres
=
RegQueryValueExW
(
clsidKey
,
ret
=
RegQueryValueExW
(
clsidKey
,
emptyW
,
NULL
,
&
dwKeyType
,
...
...
@@ -743,11 +722,10 @@ HRESULT WINAPI OleRegGetUserType(
RegCloseKey
(
clsidKey
);
if
(
hres
!=
ERROR_SUCCESS
)
if
(
ret
!=
ERROR_SUCCESS
)
{
CoTaskMemFree
(
*
pszUserType
);
*
pszUserType
=
NULL
;
return
REGDB_E_READREGDB
;
}
...
...
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