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
ae62ab03
Commit
ae62ab03
authored
May 08, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Implement several class moniker functions using the description provided on MSDN.
parent
b155f233
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
15 deletions
+46
-15
classmoniker.c
dlls/ole32/classmoniker.c
+46
-12
moniker.c
dlls/ole32/tests/moniker.c
+0
-3
No files found.
dlls/ole32/classmoniker.c
View file @
ae62ab03
...
...
@@ -242,8 +242,33 @@ static HRESULT WINAPI ClassMoniker_BindToObject(IMoniker* iface,
REFIID
riid
,
VOID
**
ppvResult
)
{
FIXME
(
"(%p,%p,%p,%p)
\n
"
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
return
E_NOTIMPL
;
ClassMoniker
*
This
=
(
ClassMoniker
*
)
iface
;
BIND_OPTS2
bindopts
;
IClassActivator
*
pActivator
;
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
IBindCtx_GetBindOptions
(
pbc
,
(
BIND_OPTS
*
)
&
bindopts
);
if
(
!
pmkToLeft
)
return
CoGetClassObject
(
&
This
->
clsid
,
bindopts
.
dwClassContext
,
NULL
,
riid
,
ppvResult
);
else
{
hr
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IClassActivator
,
(
void
**
)
&
pActivator
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IClassActivator_GetClassObject
(
pActivator
,
&
This
->
clsid
,
bindopts
.
dwClassContext
,
bindopts
.
locale
,
riid
,
ppvResult
);
IClassActivator_Release
(
pActivator
);
return
hr
;
}
}
/******************************************************************************
...
...
@@ -255,8 +280,8 @@ static HRESULT WINAPI ClassMoniker_BindToStorage(IMoniker* iface,
REFIID
riid
,
VOID
**
ppvResult
)
{
FIXM
E
(
"(%p,%p,%p,%p)
\n
"
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
return
E_NOTIMPL
;
TRAC
E
(
"(%p,%p,%p,%p)
\n
"
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
return
ClassMoniker_BindToObject
(
iface
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
)
;
}
/******************************************************************************
...
...
@@ -424,8 +449,9 @@ static HRESULT WINAPI ClassMoniker_IsRunning(IMoniker* iface,
IMoniker
*
pmkToLeft
,
IMoniker
*
pmkNewlyRunning
)
{
FIXM
E
(
"(%p, %p, %p)
\n
"
,
pbc
,
pmkToLeft
,
pmkNewlyRunning
);
TRAC
E
(
"(%p, %p, %p)
\n
"
,
pbc
,
pmkToLeft
,
pmkNewlyRunning
);
/* as in native */
return
E_NOTIMPL
;
}
...
...
@@ -437,8 +463,9 @@ static HRESULT WINAPI ClassMoniker_GetTimeOfLastChange(IMoniker* iface,
IMoniker
*
pmkToLeft
,
FILETIME
*
pItemTime
)
{
FIXME
(
"(%p, %p, %p)
\n
"
,
pbc
,
pmkToLeft
,
pItemTime
);
return
E_NOTIMPL
;
TRACE
(
"(%p, %p, %p)
\n
"
,
pbc
,
pmkToLeft
,
pItemTime
);
return
MK_E_UNAVAILABLE
;
}
/******************************************************************************
...
...
@@ -463,18 +490,25 @@ static HRESULT WINAPI ClassMoniker_CommonPrefixWith(IMoniker* iface,IMoniker* pm
TRACE
(
"(%p, %p)
\n
"
,
pmkOther
,
ppmkPrefix
);
*
ppmkPrefix
=
NULL
;
IMoniker_IsSystemMoniker
(
pmkOther
,
&
mkSys
);
/* If the other moniker is an class moniker that is equal to this moniker, this method sets *ppmkPrefix */
/* to this moniker and returns MK_S_US */
if
((
mkSys
==
MKSYS_CLASSMONIKER
)
&&
(
IMoniker_IsEqual
(
iface
,
pmkOther
)
==
S_OK
)
){
*
ppmkPrefix
=
iface
;
if
(
mkSys
==
MKSYS_CLASSMONIKER
)
{
if
(
IMoniker_IsEqual
(
iface
,
pmkOther
)
==
S_OK
)
{
*
ppmkPrefix
=
iface
;
IMoniker_AddRef
(
iface
);
IMoniker_AddRef
(
iface
);
return
MK_S_US
;
return
MK_S_US
;
}
else
return
MK_E_NOPREFIX
;
}
else
/* otherwise, the method calls the MonikerCommonPrefixWith function. This function correctly handles */
...
...
dlls/ole32/tests/moniker.c
View file @
ae62ab03
...
...
@@ -523,16 +523,13 @@ static void test_class_moniker(void)
ok
(
hr
==
E_NOTIMPL
,
"IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_GetTimeOfLastChange
(
moniker
,
bindctx
,
NULL
,
&
filetime
);
todo_wine
ok
(
hr
==
MK_E_UNAVAILABLE
,
"IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok_ole_success
(
hr
,
IMoniker_BindToStorage
);
IUnknown_Release
(
unknown
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok_ole_success
(
hr
,
IMoniker_BindToStorage
);
IUnknown_Release
(
unknown
);
...
...
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