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
60451f98
Commit
60451f98
authored
Aug 28, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Create interface stub only if it's not already created.
parent
f87491d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
50 deletions
+42
-50
marshal.c
dlls/ole32/marshal.c
+42
-50
No files found.
dlls/ole32/marshal.c
View file @
60451f98
...
...
@@ -122,9 +122,7 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
struct
stub_manager
*
manager
;
struct
ifstub
*
ifstub
;
BOOL
tablemarshal
;
IRpcStubBuffer
*
stub
=
NULL
;
HRESULT
hr
;
IUnknown
*
iobject
=
NULL
;
/* object of type riid */
hr
=
apartment_getoxid
(
apt
,
&
stdobjref
->
oxid
);
if
(
hr
!=
S_OK
)
...
...
@@ -134,39 +132,6 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
IUnknown_QueryInterface
(
object
,
riid
,
(
void
**
)
&
iobject
);
if
(
hr
!=
S_OK
)
{
ERR
(
"object doesn't expose interface %s, failing with error 0x%08x
\n
"
,
debugstr_guid
(
riid
),
hr
);
return
E_NOINTERFACE
;
}
/* IUnknown doesn't require a stub buffer, because it never goes out on
* the wire */
if
(
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
IPSFactoryBuffer
*
psfb
;
hr
=
get_facbuf_for_iid
(
riid
,
&
psfb
);
if
(
hr
!=
S_OK
)
{
ERR
(
"couldn't get IPSFactory buffer for interface %s
\n
"
,
debugstr_guid
(
riid
));
IUnknown_Release
(
iobject
);
return
hr
;
}
hr
=
IPSFactoryBuffer_CreateStub
(
psfb
,
riid
,
iobject
,
&
stub
);
IPSFactoryBuffer_Release
(
psfb
);
if
(
hr
!=
S_OK
)
{
ERR
(
"Failed to create an IRpcStubBuffer from IPSFactory for %s with error 0x%08x
\n
"
,
debugstr_guid
(
riid
),
hr
);
IUnknown_Release
(
iobject
);
return
hr
;
}
}
stdobjref
->
flags
=
SORF_NULL
;
if
(
mshlflags
&
MSHLFLAGS_TABLEWEAK
)
stdobjref
->
flags
|=
SORFP_TABLEWEAK
;
...
...
@@ -181,11 +146,7 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
manager
=
new_stub_manager
(
apt
,
object
);
if
(
!
manager
)
{
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
IUnknown_Release
(
iobject
);
return
E_OUTOFMEMORY
;
}
}
stdobjref
->
oid
=
manager
->
oid
;
...
...
@@ -193,19 +154,50 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
/* make sure ifstub that we are creating is unique */
ifstub
=
stub_manager_find_ifstub
(
manager
,
riid
,
mshlflags
);
if
(
!
ifstub
)
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
iobject
,
riid
,
dest_context
,
dest_context_data
,
mshlflags
);
if
(
!
ifstub
)
{
IRpcStubBuffer
*
stub
=
NULL
;
IUnknown
*
iobject
=
NULL
;
/* object of type riid */
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
IUnknown_Release
(
iobject
);
hr
=
IUnknown_QueryInterface
(
object
,
riid
,
(
void
**
)
&
iobject
);
if
(
hr
!=
S_OK
)
ERR
(
"object doesn't expose interface %s, failing with error 0x%08x
\n
"
,
debugstr_guid
(
riid
),
hr
);
if
(
!
ifstub
)
{
stub_manager_int_release
(
manager
);
/* destroy the stub manager if it has no ifstubs by releasing
* zero external references */
stub_manager_ext_release
(
manager
,
0
,
FALSE
,
TRUE
);
return
E_OUTOFMEMORY
;
/* IUnknown doesn't require a stub buffer, because it never goes out on
* the wire */
if
(
hr
==
S_OK
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
IPSFactoryBuffer
*
psfb
;
hr
=
get_facbuf_for_iid
(
riid
,
&
psfb
);
if
(
hr
==
S_OK
)
{
hr
=
IPSFactoryBuffer_CreateStub
(
psfb
,
riid
,
manager
->
object
,
&
stub
);
IPSFactoryBuffer_Release
(
psfb
);
if
(
hr
!=
S_OK
)
ERR
(
"Failed to create an IRpcStubBuffer from IPSFactory for %s with error 0x%08x
\n
"
,
debugstr_guid
(
riid
),
hr
);
}
else
{
ERR
(
"couldn't get IPSFactory buffer for interface %s
\n
"
,
debugstr_guid
(
riid
));
hr
=
E_NOINTERFACE
;
}
}
if
(
hr
==
S_OK
)
{
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
iobject
,
riid
,
dest_context
,
dest_context_data
,
mshlflags
);
if
(
!
ifstub
)
hr
=
E_OUTOFMEMORY
;
}
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
if
(
iobject
)
IUnknown_Release
(
iobject
);
if
(
hr
!=
S_OK
)
{
stub_manager_int_release
(
manager
);
/* destroy the stub manager if it has no ifstubs by releasing
* zero external references */
stub_manager_ext_release
(
manager
,
0
,
FALSE
,
TRUE
);
return
hr
;
}
}
if
(
!
tablemarshal
)
...
...
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