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
6b418e82
Commit
6b418e82
authored
Aug 15, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Implement Write() for file streams.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
7ee17a15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
main.c
dlls/mfplat/main.c
+22
-3
No files found.
dlls/mfplat/main.c
View file @
6b418e82
...
...
@@ -4089,11 +4089,30 @@ static HRESULT WINAPI bytestream_EndRead(IMFByteStream *iface, IMFAsyncResult *r
return
bytestream_complete_io_request
(
stream
,
ASYNC_STREAM_OP_READ
,
result
,
byte_read
);
}
static
HRESULT
WINAPI
bytestream_file_Write
(
IMFByteStream
*
iface
,
const
BYTE
*
data
,
ULONG
count
,
ULONG
*
written
)
static
HRESULT
WINAPI
bytestream_file_Write
(
IMFByteStream
*
iface
,
const
BYTE
*
data
,
ULONG
size
,
ULONG
*
written
)
{
FIXME
(
"%p, %p, %lu, %p
\n
"
,
iface
,
data
,
count
,
written
);
struct
bytestream
*
stream
=
impl_from_IMFByteStream
(
iface
);
LARGE_INTEGER
position
;
HRESULT
hr
=
S_OK
;
BOOL
ret
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p, %lu, %p
\n
"
,
iface
,
data
,
size
,
written
);
EnterCriticalSection
(
&
stream
->
cs
);
position
.
QuadPart
=
stream
->
position
;
if
((
ret
=
SetFilePointerEx
(
stream
->
hfile
,
position
,
NULL
,
FILE_BEGIN
)))
{
if
((
ret
=
WriteFile
(
stream
->
hfile
,
data
,
size
,
written
,
NULL
)))
stream
->
position
+=
*
written
;
}
if
(
!
ret
)
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
LeaveCriticalSection
(
&
stream
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
bytestream_BeginWrite
(
IMFByteStream
*
iface
,
const
BYTE
*
data
,
ULONG
size
,
...
...
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