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
5e32397c
Commit
5e32397c
authored
Nov 11, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comsvcs: Implement BindToObject() for "new" moniker.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f90994b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
8 deletions
+37
-8
main.c
dlls/comsvcs/main.c
+35
-2
comsvcs.c
dlls/comsvcs/tests/comsvcs.c
+2
-6
No files found.
dlls/comsvcs/main.c
View file @
5e32397c
...
...
@@ -551,9 +551,42 @@ static HRESULT WINAPI new_moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *si
static
HRESULT
WINAPI
new_moniker_BindToObject
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
void
**
ret
)
{
FIXME
(
"%p, %p, %p, %s, %p.
\n
"
,
iface
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ret
);
struct
new_moniker
*
moniker
=
impl_from_IMoniker
(
iface
);
IClassActivator
*
activator
;
IClassFactory
*
factory
;
BIND_OPTS2
bindopts
;
MULTI_QI
qi
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p, %p, %s, %p.
\n
"
,
iface
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ret
);
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
if
(
FAILED
(
hr
=
IBindCtx_GetBindOptions
(
pbc
,
(
BIND_OPTS
*
)
&
bindopts
)))
return
hr
;
if
(
!
pmkToLeft
)
{
qi
.
pIID
=
riid
;
qi
.
pItf
=
NULL
;
qi
.
hr
=
S_OK
;
hr
=
CoCreateInstanceEx
(
&
moniker
->
clsid
,
NULL
,
bindopts
.
dwClassContext
,
bindopts
.
pServerInfo
,
1
,
&
qi
);
*
ret
=
qi
.
pItf
;
}
else
{
if
(
SUCCEEDED
(
hr
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IClassActivator
,
(
void
**
)
&
activator
)))
{
hr
=
IClassActivator_GetClassObject
(
activator
,
&
moniker
->
clsid
,
bindopts
.
dwClassContext
,
bindopts
.
locale
,
riid
,
ret
);
IClassActivator_Release
(
activator
);
}
else
if
(
SUCCEEDED
(
hr
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
factory
)))
{
hr
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
riid
,
ret
);
IClassFactory_Release
(
factory
);
}
}
return
hr
;
}
static
HRESULT
WINAPI
new_moniker_BindToStorage
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
...
...
dlls/comsvcs/tests/comsvcs.c
View file @
5e32397c
...
...
@@ -352,10 +352,8 @@ todo_wine
ok
(
hr
==
MK_E_UNAVAILABLE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
obj
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to bind to object, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
obj
);
IUnknown_Release
(
obj
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
obj
);
todo_wine
...
...
@@ -423,10 +421,8 @@ todo_wine
bind_opts
.
dwClassContext
=
CLSCTX_INPROC_SERVER
;
hr
=
CoGetObject
(
L"new:msxml2.domdocument"
,
(
BIND_OPTS
*
)
&
bind_opts
,
&
IID_IXMLDOMDocument
,
(
void
**
)
&
obj
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to create object, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
obj
);
IUnknown_Release
(
obj
);
IBindCtx_Release
(
bindctx
);
}
...
...
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