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
548d8a2a
Commit
548d8a2a
authored
23 years ago
by
Bill Medland
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Basic implementation of IStream:Clone.
parent
0a64cc69
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ole32/stg_stream.c
+36
-2
36 additions, 2 deletions
dlls/ole32/stg_stream.c
with
36 additions
and
2 deletions
dlls/ole32/stg_stream.c
+
36
−
2
View file @
548d8a2a
...
...
@@ -826,10 +826,44 @@ HRESULT WINAPI StgStreamImpl_Stat(
return
E_FAIL
;
}
/***
* This method is part of the IStream interface.
*
* This method returns a clone of the interface that allows for
* another seek pointer
*
* See the documentation of IStream for more info.
*
* I am not totally sure what I am doing here but I presume that this
* should be basically as simple as creating a new stream with the same
* parent etc and positioning its seek cursor.
*/
HRESULT
WINAPI
StgStreamImpl_Clone
(
IStream
*
iface
,
IStream
**
ppstm
)
/* [out] */
{
FIXME
(
"not implemented!
\n
"
);
return
E_NOTIMPL
;
StgStreamImpl
*
const
This
=
(
StgStreamImpl
*
)
iface
;
HRESULT
hres
;
StgStreamImpl
*
new_stream
;
LARGE_INTEGER
seek_pos
;
/*
* Sanity check
*/
if
(
ppstm
==
0
)
return
STG_E_INVALIDPOINTER
;
new_stream
=
StgStreamImpl_Construct
(
This
->
parentStorage
,
This
->
grfMode
,
This
->
ownerProperty
);
if
(
!
new_stream
)
return
STG_E_INSUFFICIENTMEMORY
;
/* Currently the only reason for new_stream=0 */
*
ppstm
=
(
IStream
*
)
new_stream
;
seek_pos
.
QuadPart
=
This
->
currentPosition
.
QuadPart
;
hres
=
StgStreamImpl_Seek
(
*
ppstm
,
seek_pos
,
STREAM_SEEK_SET
,
NULL
);
assert
(
SUCCEEDED
(
hres
));
return
S_OK
;
}
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