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
dd5c5b82
Commit
dd5c5b82
authored
Aug 20, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement Initialize for the ICO decoder.
parent
2ca8b9fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
icoformat.c
dlls/windowscodecs/icoformat.c
+29
-2
No files found.
dlls/windowscodecs/icoformat.c
View file @
dd5c5b82
...
...
@@ -58,6 +58,9 @@ typedef struct
typedef
struct
{
const
IWICBitmapDecoderVtbl
*
lpVtbl
;
LONG
ref
;
BOOL
initialized
;
IStream
*
stream
;
ICONHEADER
header
;
}
IcoDecoder
;
static
HRESULT
WINAPI
IcoDecoder_QueryInterface
(
IWICBitmapDecoder
*
iface
,
REFIID
iid
,
...
...
@@ -101,6 +104,7 @@ static ULONG WINAPI IcoDecoder_Release(IWICBitmapDecoder *iface)
if
(
ref
==
0
)
{
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -117,8 +121,29 @@ static HRESULT WINAPI IcoDecoder_QueryCapability(IWICBitmapDecoder *iface, IStre
static
HRESULT
WINAPI
IcoDecoder_Initialize
(
IWICBitmapDecoder
*
iface
,
IStream
*
pIStream
,
WICDecodeOptions
cacheOptions
)
{
FIXME
(
"(%p,%p,%x): stub
\n
"
,
iface
,
pIStream
,
cacheOptions
);
return
E_NOTIMPL
;
IcoDecoder
*
This
=
(
IcoDecoder
*
)
iface
;
LARGE_INTEGER
seek
;
HRESULT
hr
;
ULONG
bytesread
;
TRACE
(
"(%p,%p,%x)
\n
"
,
iface
,
pIStream
,
cacheOptions
);
if
(
This
->
initialized
)
return
WINCODEC_ERR_WRONGSTATE
;
seek
.
QuadPart
=
0
;
hr
=
IStream_Seek
(
pIStream
,
seek
,
STREAM_SEEK_SET
,
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IStream_Read
(
pIStream
,
&
This
->
header
,
sizeof
(
ICONHEADER
),
&
bytesread
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
bytesread
!=
sizeof
(
ICONHEADER
)
||
This
->
header
.
idReserved
!=
0
||
This
->
header
.
idType
!=
1
)
return
E_FAIL
;
This
->
initialized
=
TRUE
;
This
->
stream
=
pIStream
;
IStream_AddRef
(
pIStream
);
return
S_OK
;
}
static
HRESULT
WINAPI
IcoDecoder_GetContainerFormat
(
IWICBitmapDecoder
*
iface
,
...
...
@@ -217,6 +242,8 @@ HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
lpVtbl
=
&
IcoDecoder_Vtbl
;
This
->
ref
=
1
;
This
->
stream
=
NULL
;
This
->
initialized
=
FALSE
;
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
IUnknown_Release
((
IUnknown
*
)
This
);
...
...
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