Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
52475287
Commit
52475287
authored
24 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed OleLoadFromStream: Dereference ppvObj and get IPersistStream
instead of accessing IUnknown.
parent
f9b6d7bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ole32/storage32.c
+20
-12
20 additions, 12 deletions
dlls/ole32/storage32.c
with
20 additions
and
12 deletions
dlls/ole32/storage32.c
+
20
−
12
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment