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
52475287
Commit
52475287
authored
Oct 28, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed OleLoadFromStream: Dereference ppvObj and get IPersistStream
instead of accessing IUnknown.
parent
f9b6d7bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
storage32.c
dlls/ole32/storage32.c
+20
-12
No files found.
dlls/ole32/storage32.c
View file @
52475287
...
...
@@ -5686,22 +5686,30 @@ HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid){
*/
HRESULT
WINAPI
OleLoadFromStream
(
IStream
*
pStm
,
REFIID
iidInterface
,
void
**
ppvObj
)
{
CLSID
clsid
;
HRESULT
res
;
CLSID
clsid
;
HRESULT
res
;
LPPERSISTSTREAM
xstm
;
FIXME
(
"(),stub!
\n
"
);
TRACE
(
"(%p,%s,%p)
\n
"
,
pStm
,
debugstr_guid
(
iidInterface
),
ppvObj
);
res
=
ReadClassStm
(
pStm
,
&
clsid
);
if
(
SUCCEEDED
(
res
)){
res
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
iidInterface
,
ppvObj
);
if
(
SUCCEEDED
(
res
))
res
=
IPersistStream_Load
((
IPersistStream
*
)
ppvObj
,
pStm
);
if
(
!
SUCCEEDED
(
res
))
return
res
;
res
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
iidInterface
,
ppvObj
);
if
(
!
SUCCEEDED
(
res
))
return
res
;
res
=
IUnknown_QueryInterface
((
IUnknown
*
)
*
ppvObj
,
&
IID_IPersistStream
,(
LPVOID
*
)
&
xstm
);
if
(
!
SUCCEEDED
(
res
))
{
IUnknown_Release
((
IUnknown
*
)
*
ppvObj
);
return
res
;
}
res
=
IPersistStream_Load
(
xstm
,
pStm
);
IPersistStream_Release
(
xstm
);
/* FIXME: all refcounts ok at this point? I think they should be:
* pStm : unchanged
* ppvObj : 1
* xstm : 0 (released)
*/
return
res
;
}
...
...
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