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
5e1a8ada
Commit
5e1a8ada
authored
Sep 14, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Simplify CreateClassMoniker().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39070fd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
33 deletions
+11
-33
classmoniker.c
dlls/ole32/classmoniker.c
+11
-33
No files found.
dlls/ole32/classmoniker.c
View file @
5e1a8ada
...
...
@@ -657,47 +657,25 @@ static const IROTDataVtbl ROTDataVtbl =
};
/******************************************************************************
* ClassMoniker_Construct (local function)
*******************************************************************************/
static
HRESULT
ClassMoniker_Construct
(
ClassMoniker
*
This
,
REFCLSID
rclsid
)
{
TRACE
(
"(%p,%s)
\n
"
,
This
,
debugstr_guid
(
rclsid
));
/* Initialize the virtual function table. */
This
->
IMoniker_iface
.
lpVtbl
=
&
ClassMonikerVtbl
;
This
->
IROTData_iface
.
lpVtbl
=
&
ROTDataVtbl
;
This
->
ref
=
0
;
This
->
clsid
=
*
rclsid
;
This
->
pMarshal
=
NULL
;
return
S_OK
;
}
/******************************************************************************
* CreateClassMoniker [OLE32.@]
******************************************************************************/
HRESULT
WINAPI
CreateClassMoniker
(
REFCLSID
rclsid
,
IMoniker
**
ppmk
)
HRESULT
WINAPI
CreateClassMoniker
(
REFCLSID
rclsid
,
IMoniker
**
moniker
)
{
ClassMoniker
*
newClassMoniker
;
HRESULT
hr
;
ClassMoniker
*
object
;
TRACE
(
"
(%s,%p)
\n
"
,
debugstr_guid
(
rclsid
),
ppmk
);
TRACE
(
"
%s, %p
\n
"
,
debugstr_guid
(
rclsid
),
moniker
);
newClassMoniker
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ClassMoniker
));
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
!
newClassMoniker
)
return
STG_E_INSUFFICIENTMEMORY
;
object
->
IMoniker_iface
.
lpVtbl
=
&
ClassMonikerVtbl
;
object
->
IROTData_iface
.
lpVtbl
=
&
ROTDataVtbl
;
object
->
ref
=
1
;
object
->
clsid
=
*
rclsid
;
hr
=
ClassMoniker_Construct
(
newClassMoniker
,
rclsid
)
;
*
moniker
=
&
object
->
IMoniker_iface
;
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
newClassMoniker
);
return
hr
;
}
return
ClassMoniker_QueryInterface
(
&
newClassMoniker
->
IMoniker_iface
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
return
S_OK
;
}
HRESULT
ClassMoniker_CreateFromDisplayName
(
LPBC
pbc
,
LPCOLESTR
szDisplayName
,
LPDWORD
pchEaten
,
...
...
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