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
4d0b1e3d
Commit
4d0b1e3d
authored
Aug 29, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Delay the creation of the stub object for IDispatch until it is actually used.
parent
b7e88d8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
tmarshal.c
dlls/oleaut32/tmarshal.c
+18
-11
No files found.
dlls/oleaut32/tmarshal.c
View file @
4d0b1e3d
...
...
@@ -1630,6 +1630,7 @@ typedef struct _TMStubImpl {
ITypeInfo
*
tinfo
;
IID
iid
;
IRpcStubBuffer
*
dispatch_stub
;
BOOL
dispatch_derivative
;
}
TMStubImpl
;
static
HRESULT
WINAPI
...
...
@@ -1667,6 +1668,8 @@ TMStubImpl_Release(LPRPCSTUBBUFFER iface)
{
IRpcStubBuffer_Disconnect
(
iface
);
ITypeInfo_Release
(
This
->
tinfo
);
if
(
This
->
dispatch_stub
)
IRpcStubBuffer_Release
(
This
->
dispatch_stub
);
CoTaskMemFree
(
This
);
}
return
refCount
;
...
...
@@ -1727,8 +1730,20 @@ TMStubImpl_Invoke(
return
E_UNEXPECTED
;
}
if
(
This
->
dispatch_stub
&&
xmsg
->
iMethod
<
sizeof
(
IDispatchVtbl
)
/
sizeof
(
void
*
))
if
(
This
->
dispatch_derivative
&&
xmsg
->
iMethod
<
sizeof
(
IDispatchVtbl
)
/
sizeof
(
void
*
))
{
IPSFactoryBuffer
*
factory_buffer
;
hres
=
get_facbuf_for_iid
(
&
IID_IDispatch
,
&
factory_buffer
);
if
(
hres
==
S_OK
)
{
hres
=
IPSFactoryBuffer_CreateStub
(
factory_buffer
,
&
IID_IDispatch
,
This
->
pUnk
,
&
This
->
dispatch_stub
);
IPSFactoryBuffer_Release
(
factory_buffer
);
}
if
(
hres
!=
S_OK
)
return
hres
;
return
IRpcStubBuffer_Invoke
(
This
->
dispatch_stub
,
xmsg
,
rpcchanbuf
);
}
memset
(
&
buf
,
0
,
sizeof
(
buf
));
buf
.
size
=
xmsg
->
cbBuffer
;
...
...
@@ -1915,6 +1930,7 @@ PSFacBuf_CreateStub(
stub
->
ref
=
1
;
stub
->
tinfo
=
tinfo
;
stub
->
dispatch_stub
=
NULL
;
stub
->
dispatch_derivative
=
FALSE
;
memcpy
(
&
(
stub
->
iid
),
riid
,
sizeof
(
*
riid
));
hres
=
IRpcStubBuffer_Connect
((
LPRPCSTUBBUFFER
)
stub
,
pUnkServer
);
*
ppStub
=
(
LPRPCSTUBBUFFER
)
stub
;
...
...
@@ -1927,16 +1943,7 @@ PSFacBuf_CreateStub(
if
(
hres
==
S_OK
)
{
if
(
typeattr
->
wTypeFlags
&
TYPEFLAG_FDISPATCHABLE
)
{
IPSFactoryBuffer
*
factory_buffer
;
hres
=
get_facbuf_for_iid
(
&
IID_IDispatch
,
&
factory_buffer
);
if
(
hres
==
S_OK
)
{
hres
=
IPSFactoryBuffer_CreateStub
(
factory_buffer
,
&
IID_IDispatch
,
pUnkServer
,
&
stub
->
dispatch_stub
);
IPSFactoryBuffer_Release
(
factory_buffer
);
}
}
stub
->
dispatch_derivative
=
TRUE
;
ITypeInfo_ReleaseTypeAttr
(
tinfo
,
typeattr
);
}
...
...
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