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
9bdb97e6
Commit
9bdb97e6
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: Use proper interface pointer in CreateStub call.
parent
e5edbc6f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
compobj_private.h
dlls/ole32/compobj_private.h
+1
-1
marshal.c
dlls/ole32/marshal.c
+2
-9
stubmanager.c
dlls/ole32/stubmanager.c
+10
-5
No files found.
dlls/ole32/compobj_private.h
View file @
9bdb97e6
...
@@ -187,7 +187,7 @@ HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
...
@@ -187,7 +187,7 @@ HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
ULONG
stub_manager_int_release
(
struct
stub_manager
*
This
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_int_release
(
struct
stub_manager
*
This
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_addref
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_addref
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_release
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
,
BOOL
last_unlock_releases
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_release
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
,
BOOL
last_unlock_releases
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
REFIID
iid
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_find_ifstub
(
struct
stub_manager
*
m
,
REFIID
iid
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_find_ifstub
(
struct
stub_manager
*
m
,
REFIID
iid
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager
(
APARTMENT
*
apt
,
OID
oid
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager
(
APARTMENT
*
apt
,
OID
oid
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/marshal.c
View file @
9bdb97e6
...
@@ -148,16 +148,10 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
...
@@ -148,16 +148,10 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
ifstub
=
stub_manager_find_ifstub
(
manager
,
riid
,
mshlflags
);
ifstub
=
stub_manager_find_ifstub
(
manager
,
riid
,
mshlflags
);
if
(
!
ifstub
)
{
if
(
!
ifstub
)
{
IRpcStubBuffer
*
stub
=
NULL
;
IRpcStubBuffer
*
stub
=
NULL
;
IUnknown
*
iobject
=
NULL
;
/* object of type riid */
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
);
/* IUnknown doesn't require a stub buffer, because it never goes out on
/* IUnknown doesn't require a stub buffer, because it never goes out on
* the wire */
* the wire */
if
(
hr
==
S_OK
&&
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
if
(
!
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
{
IPSFactoryBuffer
*
psfb
;
IPSFactoryBuffer
*
psfb
;
...
@@ -176,12 +170,11 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
...
@@ -176,12 +170,11 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
}
}
if
(
hr
==
S_OK
)
{
if
(
hr
==
S_OK
)
{
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
iobject
,
riid
,
dest_context
,
dest_context_data
,
mshlflags
);
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
riid
,
dest_context
,
dest_context_data
,
mshlflags
);
if
(
!
ifstub
)
if
(
!
ifstub
)
hr
=
E_OUTOFMEMORY
;
hr
=
E_OUTOFMEMORY
;
}
}
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
if
(
iobject
)
IUnknown_Release
(
iobject
);
if
(
hr
!=
S_OK
)
{
if
(
hr
!=
S_OK
)
{
stub_manager_int_release
(
manager
);
stub_manager_int_release
(
manager
);
...
...
dlls/ole32/stubmanager.c
View file @
9bdb97e6
...
@@ -65,21 +65,28 @@ static inline HRESULT generate_ipid(struct stub_manager *m, IPID *ipid)
...
@@ -65,21 +65,28 @@ static inline HRESULT generate_ipid(struct stub_manager *m, IPID *ipid)
}
}
/* registers a new interface stub COM object with the stub manager and returns registration record */
/* registers a new interface stub COM object with the stub manager and returns registration record */
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
DWORD
dest_context
,
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
REFIID
iid
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
flags
)
void
*
dest_context_data
,
MSHLFLAGS
flags
)
{
{
struct
ifstub
*
stub
;
struct
ifstub
*
stub
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"oid=%s, stubbuffer=%p, iptr=%p, iid=%s
\n
"
,
TRACE
(
"oid=%s, stubbuffer=%p, iid=%s
\n
"
,
wine_dbgstr_longlong
(
m
->
oid
),
sb
,
debugstr_guid
(
iid
));
wine_dbgstr_longlong
(
m
->
oid
),
sb
,
iptr
,
debugstr_guid
(
iid
));
stub
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
ifstub
));
stub
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
ifstub
));
if
(
!
stub
)
return
NULL
;
if
(
!
stub
)
return
NULL
;
hr
=
IUnknown_QueryInterface
(
m
->
object
,
iid
,
(
void
**
)
&
stub
->
iface
);
if
(
hr
!=
S_OK
)
{
HeapFree
(
GetProcessHeap
(),
0
,
stub
);
return
NULL
;
}
hr
=
RPC_CreateServerChannel
(
dest_context
,
dest_context_data
,
&
stub
->
chan
);
hr
=
RPC_CreateServerChannel
(
dest_context
,
dest_context_data
,
&
stub
->
chan
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
IUnknown_Release
(
stub
->
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
stub
);
HeapFree
(
GetProcessHeap
(),
0
,
stub
);
return
NULL
;
return
NULL
;
}
}
...
@@ -87,8 +94,6 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
...
@@ -87,8 +94,6 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
stub
->
stubbuffer
=
sb
;
stub
->
stubbuffer
=
sb
;
if
(
sb
)
IRpcStubBuffer_AddRef
(
sb
);
if
(
sb
)
IRpcStubBuffer_AddRef
(
sb
);
IUnknown_AddRef
(
iptr
);
stub
->
iface
=
iptr
;
stub
->
flags
=
flags
;
stub
->
flags
=
flags
;
stub
->
iid
=
*
iid
;
stub
->
iid
=
*
iid
;
...
...
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