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
2f41a3ad
Commit
2f41a3ad
authored
Apr 27, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICStream_InitializeFromFilename.
parent
d57247ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
Makefile.in
dlls/windowscodecs/Makefile.in
+1
-1
stream.c
dlls/windowscodecs/stream.c
+30
-2
No files found.
dlls/windowscodecs/Makefile.in
View file @
2f41a3ad
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
windowscodecs.dll
IMPORTLIB
=
windowscodecs
IMPORTS
=
uuid ole32 advapi32 kernel32
IMPORTS
=
uuid ole32
shlwapi
advapi32 kernel32
EXTRAINCL
=
@PNGINCL@
C_SRCS
=
\
...
...
dlls/windowscodecs/stream.c
View file @
2f41a3ad
...
...
@@ -23,6 +23,7 @@
#include "winbase.h"
#include "winreg.h"
#include "objbase.h"
#include "shlwapi.h"
#include "wincodec.h"
#include "wincodecs_private.h"
...
...
@@ -434,8 +435,35 @@ static HRESULT WINAPI IWICStreamImpl_InitializeFromIStream(IWICStream *iface,
static
HRESULT
WINAPI
IWICStreamImpl_InitializeFromFilename
(
IWICStream
*
iface
,
LPCWSTR
wzFileName
,
DWORD
dwDesiredAccess
)
{
FIXME
(
"(%p): stub
\n
"
,
iface
);
return
E_NOTIMPL
;
IWICStreamImpl
*
This
=
(
IWICStreamImpl
*
)
iface
;
HRESULT
hr
;
DWORD
dwMode
;
IStream
*
stream
;
TRACE
(
"(%p, %s, %u)
\n
"
,
iface
,
debugstr_w
(
wzFileName
),
dwDesiredAccess
);
if
(
This
->
pStream
)
return
WINCODEC_ERR_WRONGSTATE
;
if
(
dwDesiredAccess
&
GENERIC_WRITE
)
dwMode
=
STGM_SHARE_DENY_WRITE
|
STGM_WRITE
|
STGM_CREATE
;
else
if
(
dwDesiredAccess
&
GENERIC_READ
)
dwMode
=
STGM_SHARE_DENY_WRITE
|
STGM_READ
|
STGM_FAILIFTHERE
;
else
return
E_INVALIDARG
;
hr
=
SHCreateStreamOnFileW
(
wzFileName
,
dwMode
,
&
stream
);
if
(
SUCCEEDED
(
hr
))
{
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
This
->
pStream
,
stream
,
NULL
))
{
/* Some other thread set the stream first. */
IStream_Release
(
stream
);
hr
=
WINCODEC_ERR_WRONGSTATE
;
}
}
return
hr
;
}
/******************************************
...
...
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