Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
853273c9
Commit
853273c9
authored
Nov 13, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICBitmapDecoderInfo::GetFileExtensions.
parent
641a6e6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
info.c
dlls/windowscodecs/info.c
+7
-2
info.c
dlls/windowscodecs/tests/info.c
+30
-0
No files found.
dlls/windowscodecs/info.c
View file @
853273c9
...
...
@@ -55,6 +55,7 @@ static const WCHAR numericrepresentation_valuename[] = {'N','u','m','e','r','i',
static
const
WCHAR
supportstransparency_valuename
[]
=
{
'S'
,
'u'
,
'p'
,
'p'
,
'o'
,
'r'
,
't'
,
's'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'p'
,
'a'
,
'r'
,
'e'
,
'n'
,
'c'
,
'y'
,
0
};
static
const
WCHAR
requiresfullstream_valuename
[]
=
{
'R'
,
'e'
,
'q'
,
'u'
,
'i'
,
'r'
,
'e'
,
's'
,
'F'
,
'u'
,
'l'
,
'l'
,
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
0
};
static
const
WCHAR
supportspadding_valuename
[]
=
{
'S'
,
'u'
,
'p'
,
'p'
,
'o'
,
'r'
,
't'
,
's'
,
'P'
,
'a'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
fileextensions_valuename
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
static
HRESULT
ComponentInfo_GetStringValue
(
HKEY
classkey
,
LPCWSTR
value
,
UINT
buffer_size
,
WCHAR
*
buffer
,
UINT
*
actual_size
)
...
...
@@ -393,8 +394,12 @@ static HRESULT WINAPI BitmapDecoderInfo_GetMimeTypes(IWICBitmapDecoderInfo *ifac
static
HRESULT
WINAPI
BitmapDecoderInfo_GetFileExtensions
(
IWICBitmapDecoderInfo
*
iface
,
UINT
cchFileExtensions
,
WCHAR
*
wzFileExtensions
,
UINT
*
pcchActual
)
{
FIXME
(
"(%p,%u,%p,%p): stub
\n
"
,
iface
,
cchFileExtensions
,
wzFileExtensions
,
pcchActual
);
return
E_NOTIMPL
;
BitmapDecoderInfo
*
This
=
impl_from_IWICBitmapDecoderInfo
(
iface
);
TRACE
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cchFileExtensions
,
wzFileExtensions
,
pcchActual
);
return
ComponentInfo_GetStringValue
(
This
->
classkey
,
fileextensions_valuename
,
cchFileExtensions
,
wzFileExtensions
,
pcchActual
);
}
static
HRESULT
WINAPI
BitmapDecoderInfo_DoesSupportAnimation
(
IWICBitmapDecoderInfo
*
iface
,
...
...
dlls/windowscodecs/tests/info.c
View file @
853273c9
...
...
@@ -88,6 +88,7 @@ static void test_decoder_info(void)
ULONG
len
;
WCHAR
value
[
256
];
const
WCHAR
expected_mimetype
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'b'
,
'm'
,
'p'
,
0
};
const
WCHAR
expected_extensions
[]
=
{
'.'
,
'b'
,
'm'
,
'p'
,
','
,
'.'
,
'd'
,
'i'
,
'b'
,
','
,
'.'
,
'r'
,
'l'
,
'e'
,
0
};
CLSID
clsid
;
GUID
pixelformats
[
20
];
UINT
num_formats
,
count
;
...
...
@@ -168,6 +169,35 @@ static void test_decoder_info(void)
ok
(
hr
==
S_OK
,
"GetPixelFormats failed, hr=%x
\n
"
,
hr
);
ok
(
count
==
num_formats
,
"got %d formats, expected %d
\n
"
,
count
,
num_formats
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
1
,
NULL
,
&
len
);
ok
(
hr
==
E_INVALIDARG
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
ok
(
len
==
lstrlenW
(
expected_extensions
)
+
1
,
"GetFileExtensions returned wrong len %i
\n
"
,
len
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
len
,
value
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
0
,
NULL
,
&
len
);
ok
(
hr
==
S_OK
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
ok
(
len
==
lstrlenW
(
expected_extensions
)
+
1
,
"GetFileExtensions returned wrong len %i
\n
"
,
len
);
value
[
0
]
=
0
;
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
len
,
value
,
&
len
);
ok
(
hr
==
S_OK
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
ok
(
lstrcmpW
(
value
,
expected_extensions
)
==
0
,
"GetFileExtensions returned wrong value %s
\n
"
,
wine_dbgstr_w
(
value
));
ok
(
len
==
lstrlenW
(
expected_extensions
)
+
1
,
"GetFileExtensions returned wrong len %i
\n
"
,
len
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
1
,
value
,
&
len
);
ok
(
hr
==
WINCODEC_ERR_INSUFFICIENTBUFFER
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
ok
(
len
==
lstrlenW
(
expected_extensions
)
+
1
,
"GetFileExtensions returned wrong len %i
\n
"
,
len
);
hr
=
IWICBitmapDecoderInfo_GetFileExtensions
(
decoder_info
,
256
,
value
,
&
len
);
ok
(
hr
==
S_OK
,
"GetFileExtensions failed, hr=%x
\n
"
,
hr
);
ok
(
lstrcmpW
(
value
,
expected_extensions
)
==
0
,
"GetFileExtensions returned wrong value %s
\n
"
,
wine_dbgstr_w
(
value
));
ok
(
len
==
lstrlenW
(
expected_extensions
)
+
1
,
"GetFileExtensions returned wrong len %i
\n
"
,
len
);
IWICBitmapDecoderInfo_Release
(
decoder_info
);
IWICComponentInfo_Release
(
info
);
...
...
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