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
d4b755a8
Commit
d4b755a8
authored
Dec 28, 2006
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use the reduced forms of monikers for comparison in the running object table.
parent
3bcea639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
moniker.c
dlls/ole32/moniker.c
+39
-2
No files found.
dlls/ole32/moniker.c
View file @
d4b755a8
...
...
@@ -159,6 +159,19 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MInterfacePointer
return
S_OK
;
}
static
HRESULT
reduce_moniker
(
IMoniker
*
pmk
,
IMoniker
**
pmkReduced
)
{
IBindCtx
*
pbc
;
HRESULT
hr
=
CreateBindCtx
(
0
,
&
pbc
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IMoniker_Reduce
(
pmk
,
pbc
,
MKRREDUCE_ALL
,
NULL
,
pmkReduced
);
if
(
FAILED
(
hr
))
ERR
(
"reducing moniker failed with error 0x%08x
\n
"
,
hr
);
IBindCtx_Release
(
pbc
);
return
hr
;
}
/***********************************************************************
* RunningObjectTable_QueryInterface
*/
...
...
@@ -329,10 +342,19 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
return
hr
;
}
hr
=
get_moniker_comparison_data
(
pmkObjectName
,
&
rot_entry
->
moniker_data
);
hr
=
reduce_moniker
(
pmkObjectName
,
&
pmkObjectName
);
if
(
FAILED
(
hr
))
{
rot_entry_delete
(
rot_entry
);
return
hr
;
}
hr
=
get_moniker_comparison_data
(
pmkObjectName
,
&
rot_entry
->
moniker_data
);
if
(
hr
!=
S_OK
)
{
rot_entry_delete
(
rot_entry
);
IMoniker_Release
(
pmkObjectName
);
return
hr
;
}
...
...
@@ -340,10 +362,12 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
if
(
hr
!=
S_OK
)
{
rot_entry_delete
(
rot_entry
);
IMoniker_Release
(
pmkObjectName
);
return
hr
;
}
/* marshal moniker */
hr
=
CoMarshalInterface
(
pStream
,
&
IID_IMoniker
,
(
IUnknown
*
)
pmkObjectName
,
MSHCTX_LOCAL
|
MSHCTX_NOSHAREDMEM
,
NULL
,
MSHLFLAGS_TABLESTRONG
);
hr
=
CoMarshalInterface
(
pStream
,
&
IID_IMoniker
,
(
IUnknown
*
)
pmkObjectName
,
MSHCTX_LOCAL
|
MSHCTX_NOSHAREDMEM
,
NULL
,
MSHLFLAGS_TABLESTRONG
);
/* FIXME: a cleaner way would be to create an IStream class that writes
* directly to an MInterfacePointer */
if
(
hr
==
S_OK
)
...
...
@@ -361,6 +385,7 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,
}
}
IStream_Release
(
pStream
);
IMoniker_Release
(
pmkObjectName
);
if
(
hr
!=
S_OK
)
{
rot_entry_delete
(
rot_entry
);
...
...
@@ -433,7 +458,11 @@ RunningObjectTableImpl_IsRunning( IRunningObjectTable* iface, IMoniker *pmkObjec
TRACE
(
"(%p,%p)
\n
"
,
This
,
pmkObjectName
);
hr
=
reduce_moniker
(
pmkObjectName
,
&
pmkObjectName
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
get_moniker_comparison_data
(
pmkObjectName
,
&
moniker_data
);
IMoniker_Release
(
pmkObjectName
);
if
(
hr
!=
S_OK
)
return
hr
;
...
...
@@ -480,7 +509,11 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
*
ppunkObject
=
NULL
;
hr
=
reduce_moniker
(
pmkObjectName
,
&
pmkObjectName
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
get_moniker_comparison_data
(
pmkObjectName
,
&
moniker_data
);
IMoniker_Release
(
pmkObjectName
);
if
(
hr
!=
S_OK
)
return
hr
;
...
...
@@ -569,7 +602,11 @@ RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface,
if
(
pmkObjectName
==
NULL
||
pfiletime
==
NULL
)
return
E_INVALIDARG
;
hr
=
reduce_moniker
(
pmkObjectName
,
&
pmkObjectName
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
get_moniker_comparison_data
(
pmkObjectName
,
&
moniker_data
);
IMoniker_Release
(
pmkObjectName
);
if
(
hr
!=
S_OK
)
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