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
bd516247
Commit
bd516247
authored
Sep 19, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add support for VT_LPWSTR property ids to MetadataHandler_GetValue.
parent
1481d11f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
+38
-7
metadatahandler.c
dlls/windowscodecs/metadatahandler.c
+5
-0
metadata.c
dlls/windowscodecs/tests/metadata.c
+33
-7
No files found.
dlls/windowscodecs/metadatahandler.c
View file @
bd516247
...
...
@@ -260,6 +260,11 @@ static int propvar_cmp(const PROPVARIANT *v1, const PROPVARIANT *v2)
return
lstrcmpA
(
v1
->
u
.
pszVal
,
v2
->
u
.
pszVal
);
}
if
(
v1
->
vt
==
VT_LPWSTR
&&
v2
->
vt
==
VT_LPWSTR
)
{
return
lstrcmpiW
(
v1
->
u
.
pwszVal
,
v2
->
u
.
pwszVal
);
}
if
(
!
get_int_value
(
v1
,
&
value1
))
return
-
1
;
if
(
!
get_int_value
(
v2
,
&
value2
))
return
-
1
;
...
...
dlls/windowscodecs/tests/metadata.c
View file @
bd516247
...
...
@@ -1636,15 +1636,17 @@ static void test_metadata_APE(void)
{
VT_UI1
|
VT_VECTOR
,
0
,
11
,
{
'H'
,
'e'
,
'l'
,
'l'
,
'o'
,
' '
,
'W'
,
'o'
,
'r'
,
'l'
,
'd'
},
NULL
,
{
'A'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
}
},
{
VT_UI1
|
VT_VECTOR
,
0
,
10
,
{
1
,
0x11
,
2
,
0x22
,
0x33
,
4
,
0x44
,
0x55
,
0x66
,
0x77
},
NULL
,
{
'D'
,
'a'
,
't'
,
'a'
,
0
}
}
};
WCHAR
dataW
[]
=
{
'd'
,
'a'
,
't'
,
'a'
,
0
};
HRESULT
hr
;
IStream
*
stream
;
IWICPersistStream
*
persist
;
IWICMetadataReader
*
reader
;
IWICMetadataHandlerInfo
*
info
;
WCHAR
name
[
64
];
UINT
count
,
dummy
;
UINT
count
,
dummy
,
i
;
GUID
format
;
CLSID
id
;
CLSID
clsid
;
PROPVARIANT
id
,
value
;
hr
=
CoCreateInstance
(
&
CLSID_WICAPEMetadataReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICMetadataReader
,
(
void
**
)
&
reader
);
...
...
@@ -1676,12 +1678,24 @@ static void test_metadata_APE(void)
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatAPE
),
"wrong format %s
\n
"
,
debugstr_guid
(
&
format
));
PropVariantInit
(
&
value
);
id
.
vt
=
VT_LPWSTR
;
U
(
id
).
pwszVal
=
dataW
;
hr
=
IWICMetadataReader_GetValue
(
reader
,
NULL
,
&
id
,
&
value
);
ok
(
hr
==
S_OK
,
"GetValue error %#x
\n
"
,
hr
);
ok
(
value
.
vt
==
(
VT_UI1
|
VT_VECTOR
),
"unexpected vt: %i
\n
"
,
id
.
vt
);
ok
(
td
[
1
].
count
==
U
(
value
).
caub
.
cElems
,
"expected cElems %d, got %d
\n
"
,
td
[
1
].
count
,
U
(
value
).
caub
.
cElems
);
for
(
i
=
0
;
i
<
U
(
value
).
caub
.
cElems
;
i
++
)
ok
(
td
[
1
].
value
[
i
]
==
U
(
value
).
caub
.
pElems
[
i
],
"%u: expected value %#x/%#x, got %#x
\n
"
,
i
,
(
ULONG
)
td
[
1
].
value
[
i
],
(
ULONG
)(
td
[
1
].
value
[
i
]
>>
32
),
U
(
value
).
caub
.
pElems
[
i
]);
PropVariantClear
(
&
value
);
hr
=
IWICMetadataReader_GetMetadataHandlerInfo
(
reader
,
&
info
);
ok
(
hr
==
S_OK
,
"GetMetadataHandlerInfo error %#x
\n
"
,
hr
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
id
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
cls
id
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICAPEMetadataReader
),
"wrong CLSID %s
\n
"
,
debugstr_guid
(
&
id
));
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICAPEMetadataReader
),
"wrong CLSID %s
\n
"
,
debugstr_guid
(
&
cls
id
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
@@ -1706,6 +1720,7 @@ static void test_metadata_GIF_comment(void)
{
{
VT_LPSTR
,
0
,
12
,
{
0
},
"Hello World!"
,
{
'T'
,
'e'
,
'x'
,
't'
,
'E'
,
'n'
,
't'
,
'r'
,
'y'
,
0
}
}
};
WCHAR
text_entryW
[]
=
{
'T'
,
'E'
,
'X'
,
'T'
,
'E'
,
'N'
,
'T'
,
'R'
,
'Y'
,
0
};
HRESULT
hr
;
IStream
*
stream
;
IWICPersistStream
*
persist
;
...
...
@@ -1714,7 +1729,8 @@ static void test_metadata_GIF_comment(void)
WCHAR
name
[
64
];
UINT
count
,
dummy
;
GUID
format
;
CLSID
id
;
CLSID
clsid
;
PROPVARIANT
id
,
value
;
hr
=
CoCreateInstance
(
&
CLSID_WICGifCommentMetadataReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICMetadataReader
,
(
void
**
)
&
reader
);
...
...
@@ -1746,12 +1762,22 @@ static void test_metadata_GIF_comment(void)
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGifComment
),
"wrong format %s
\n
"
,
debugstr_guid
(
&
format
));
PropVariantInit
(
&
value
);
id
.
vt
=
VT_LPWSTR
;
U
(
id
).
pwszVal
=
text_entryW
;
hr
=
IWICMetadataReader_GetValue
(
reader
,
NULL
,
&
id
,
&
value
);
ok
(
hr
==
S_OK
,
"GetValue error %#x
\n
"
,
hr
);
ok
(
value
.
vt
==
VT_LPSTR
,
"unexpected vt: %i
\n
"
,
id
.
vt
);
ok
(
!
strcmp
(
U
(
value
).
pszVal
,
"Hello World!"
),
"unexpected value: %s
\n
"
,
U
(
value
).
pszVal
);
PropVariantClear
(
&
value
);
hr
=
IWICMetadataReader_GetMetadataHandlerInfo
(
reader
,
&
info
);
ok
(
hr
==
S_OK
,
"GetMetadataHandlerInfo error %#x
\n
"
,
hr
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
id
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
cls
id
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICGifCommentMetadataReader
),
"wrong CLSID %s
\n
"
,
debugstr_guid
(
&
id
));
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICGifCommentMetadataReader
),
"wrong CLSID %s
\n
"
,
debugstr_guid
(
&
cls
id
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
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