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
06130248
Commit
06130248
authored
Dec 18, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Fix test failures on Win9x by using A-functions.
parent
a35a09b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
filtermapper.c
dlls/quartz/tests/filtermapper.c
+22
-10
No files found.
dlls/quartz/tests/filtermapper.c
View file @
06130248
...
@@ -57,7 +57,11 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum)
...
@@ -57,7 +57,11 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum)
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
if
(
!
lstrcmpW
((
WCHAR
*
)
V_UNION
(
&
var
,
bstrVal
),
wszFilterName
))
found
=
TRUE
;
CHAR
val1
[
512
],
val2
[
512
];
WideCharToMultiByte
(
CP_ACP
,
0
,
(
WCHAR
*
)
V_UNION
(
&
var
,
bstrVal
),
-
1
,
val1
,
sizeof
(
val1
),
0
,
0
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wszFilterName
,
-
1
,
val2
,
sizeof
(
val2
),
0
,
0
);
if
(
!
lstrcmpA
(
val1
,
val2
))
found
=
TRUE
;
}
}
IPropertyBag_Release
(
pPropBagCat
);
IPropertyBag_Release
(
pPropBagCat
);
...
@@ -179,10 +183,13 @@ static void test_legacy_filter_registration(void)
...
@@ -179,10 +183,13 @@ static void test_legacy_filter_registration(void)
IFilterMapper
*
pMapper
=
NULL
;
IFilterMapper
*
pMapper
=
NULL
;
HRESULT
hr
;
HRESULT
hr
;
static
const
WCHAR
wszFilterName
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
'f'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
wszFilterName
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
'f'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
0
};
static
const
CHAR
szFilterName
[]
=
"Testfilter"
;
static
const
WCHAR
wszPinName
[]
=
{
'P'
,
'i'
,
'n'
,
'1'
,
0
};
static
const
WCHAR
wszPinName
[]
=
{
'P'
,
'i'
,
'n'
,
'1'
,
0
};
CLSID
clsidFilter
;
CLSID
clsidFilter
;
WCHAR
wszRegKey
[
MAX_PATH
];
WCHAR
wszRegKey
[
MAX_PATH
];
CHAR
szRegKey
[
MAX_PATH
];
static
const
WCHAR
wszClsid
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
wszClsid
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
static
const
CHAR
szClsid
[]
=
"CLSID"
;
static
const
WCHAR
wszSlash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
wszSlash
[]
=
{
'\\'
,
0
};
LONG
lRet
;
LONG
lRet
;
HKEY
hKey
=
NULL
;
HKEY
hKey
=
NULL
;
...
@@ -211,15 +218,16 @@ static void test_legacy_filter_registration(void)
...
@@ -211,15 +218,16 @@ static void test_legacy_filter_registration(void)
lRet
=
StringFromGUID2
(
&
clsidFilter
,
wszRegKey
+
lstrlenW
(
wszRegKey
),
MAX_PATH
-
lstrlenW
(
wszRegKey
));
lRet
=
StringFromGUID2
(
&
clsidFilter
,
wszRegKey
+
lstrlenW
(
wszRegKey
),
MAX_PATH
-
lstrlenW
(
wszRegKey
));
ok
(
lRet
>
0
,
"StringFromGUID2 failed
\n
"
);
ok
(
lRet
>
0
,
"StringFromGUID2 failed
\n
"
);
if
(
!
lRet
)
goto
out
;
if
(
!
lRet
)
goto
out
;
WideCharToMultiByte
(
CP_ACP
,
0
,
wszRegKey
,
-
1
,
szRegKey
,
sizeof
(
szRegKey
),
0
,
0
);
/* Register---- functions need a filter class key to write pin and pin media type data to. Create a bogus
/* Register---- functions need a filter class key to write pin and pin media type data to. Create a bogus
* class key for it. */
* class key for it. */
lRet
=
RegCreateKeyEx
W
(
HKEY_CLASSES_ROOT
,
w
szRegKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_WRITE
,
NULL
,
&
hKey
,
NULL
);
lRet
=
RegCreateKeyEx
A
(
HKEY_CLASSES_ROOT
,
szRegKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_WRITE
,
NULL
,
&
hKey
,
NULL
);
ok
(
lRet
==
ERROR_SUCCESS
,
"RegCreateKeyEx
W
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
ok
(
lRet
==
ERROR_SUCCESS
,
"RegCreateKeyEx
A
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
/* Set default value - this is interpreted as "friendly name" later. */
/* Set default value - this is interpreted as "friendly name" later. */
lRet
=
RegSetValueEx
W
(
hKey
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
wszFilterName
,
(
lstrlenW
(
wszFilterName
)
+
1
)
*
2
);
lRet
=
RegSetValueEx
A
(
hKey
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
szFilterName
,
lstrlenA
(
szFilterName
)
+
1
);
ok
(
lRet
==
ERROR_SUCCESS
,
"RegSetValueEx
W
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
ok
(
lRet
==
ERROR_SUCCESS
,
"RegSetValueEx
A
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
if
(
hKey
)
RegCloseKey
(
hKey
);
if
(
hKey
)
RegCloseKey
(
hKey
);
hKey
=
NULL
;
hKey
=
NULL
;
...
@@ -256,7 +264,10 @@ static void test_legacy_filter_registration(void)
...
@@ -256,7 +264,10 @@ static void test_legacy_filter_registration(void)
while
(
!
found
&&
IEnumRegFilters_Next
(
pRegEnum
,
1
,
&
prgf
,
&
cFetched
)
==
S_OK
)
while
(
!
found
&&
IEnumRegFilters_Next
(
pRegEnum
,
1
,
&
prgf
,
&
cFetched
)
==
S_OK
)
{
{
if
(
!
lstrcmpW
(
prgf
->
Name
,
wszFilterName
))
found
=
TRUE
;
CHAR
val
[
512
];
WideCharToMultiByte
(
CP_ACP
,
0
,
prgf
->
Name
,
-
1
,
val
,
sizeof
(
val
),
0
,
0
);
if
(
!
lstrcmpA
(
val
,
szFilterName
))
found
=
TRUE
;
CoTaskMemFree
(
prgf
);
CoTaskMemFree
(
prgf
);
}
}
...
@@ -268,14 +279,15 @@ static void test_legacy_filter_registration(void)
...
@@ -268,14 +279,15 @@ static void test_legacy_filter_registration(void)
hr
=
IFilterMapper_UnregisterFilter
(
pMapper
,
clsidFilter
);
hr
=
IFilterMapper_UnregisterFilter
(
pMapper
,
clsidFilter
);
ok
(
hr
==
S_OK
,
"FilterMapper_UnregisterFilter failed with %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"FilterMapper_UnregisterFilter failed with %x
\n
"
,
hr
);
lRet
=
RegOpenKeyEx
W
(
HKEY_CLASSES_ROOT
,
w
szClsid
,
0
,
KEY_WRITE
|
DELETE
,
&
hKey
);
lRet
=
RegOpenKeyEx
A
(
HKEY_CLASSES_ROOT
,
szClsid
,
0
,
KEY_WRITE
|
DELETE
,
&
hKey
);
ok
(
lRet
==
ERROR_SUCCESS
,
"RegOpenKeyEx
W
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
ok
(
lRet
==
ERROR_SUCCESS
,
"RegOpenKeyEx
A
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
lRet
=
StringFromGUID2
(
&
clsidFilter
,
wszRegKey
,
MAX_PATH
);
lRet
=
StringFromGUID2
(
&
clsidFilter
,
wszRegKey
,
MAX_PATH
);
ok
(
lRet
>
0
,
"StringFromGUID2 failed
\n
"
);
ok
(
lRet
>
0
,
"StringFromGUID2 failed
\n
"
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wszRegKey
,
-
1
,
szRegKey
,
sizeof
(
szRegKey
),
0
,
0
);
lRet
=
RegDeleteKey
W
(
hKey
,
w
szRegKey
);
lRet
=
RegDeleteKey
A
(
hKey
,
szRegKey
);
ok
(
lRet
==
ERROR_SUCCESS
,
"RegDeleteKey
W
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
ok
(
lRet
==
ERROR_SUCCESS
,
"RegDeleteKey
A
failed with %x
\n
"
,
HRESULT_FROM_WIN32
(
lRet
));
if
(
hKey
)
RegCloseKey
(
hKey
);
if
(
hKey
)
RegCloseKey
(
hKey
);
hKey
=
NULL
;
hKey
=
NULL
;
...
...
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