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
ae0bddeb
Commit
ae0bddeb
authored
Nov 06, 2008
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Nov 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Run a test on more platforms.
parent
f714cf4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
crypt.c
dlls/advapi32/tests/crypt.c
+31
-21
No files found.
dlls/advapi32/tests/crypt.c
View file @
ae0bddeb
...
@@ -560,7 +560,7 @@ static void test_enum_providers(void)
...
@@ -560,7 +560,7 @@ static void test_enum_providers(void)
LocalFree
(
provider
);
LocalFree
(
provider
);
}
}
static
BOOL
FindProvTypesRegVals
(
DWORD
dwIndex
,
DWORD
*
pdwProvType
,
LPSTR
*
pszTypeName
,
static
BOOL
FindProvTypesRegVals
(
DWORD
*
pdwIndex
,
DWORD
*
pdwProvType
,
LPSTR
*
pszTypeName
,
DWORD
*
pcbTypeName
,
DWORD
*
pdwTypeCount
)
DWORD
*
pcbTypeName
,
DWORD
*
pdwTypeCount
)
{
{
HKEY
hKey
;
HKEY
hKey
;
...
@@ -581,33 +581,43 @@ static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTy
...
@@ -581,33 +581,43 @@ static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTy
if
(
!
(
szName
=
LocalAlloc
(
LMEM_ZEROINIT
,
cbName
)))
if
(
!
(
szName
=
LocalAlloc
(
LMEM_ZEROINIT
,
cbName
)))
goto
cleanup
;
goto
cleanup
;
if
(
RegEnumKeyEx
(
hKey
,
dwIndex
,
szName
,
&
cbName
,
NULL
,
NULL
,
NULL
,
NULL
))
while
(
!
RegEnumKeyEx
(
hKey
,
*
p
dwIndex
,
szName
,
&
cbName
,
NULL
,
NULL
,
NULL
,
NULL
))
goto
cleanup
;
{
cbName
++
;
cbName
++
;
ch
=
szName
+
strlen
(
szName
);
ch
=
szName
+
strlen
(
szName
);
/* Convert "Type 000" to 0, etc/ */
/* Convert "Type 000" to 0, etc/ */
*
pdwProvType
=
*
(
--
ch
)
-
'0'
;
*
pdwProvType
=
*
(
--
ch
)
-
'0'
;
*
pdwProvType
+=
(
*
(
--
ch
)
-
'0'
)
*
10
;
*
pdwProvType
+=
(
*
(
--
ch
)
-
'0'
)
*
10
;
*
pdwProvType
+=
(
*
(
--
ch
)
-
'0'
)
*
100
;
*
pdwProvType
+=
(
*
(
--
ch
)
-
'0'
)
*
100
;
if
(
RegOpenKey
(
hKey
,
szName
,
&
hSubKey
))
if
(
RegOpenKey
(
hKey
,
szName
,
&
hSubKey
))
goto
cleanup
;
break
;
if
(
RegQueryValueEx
(
hSubKey
,
"TypeName"
,
NULL
,
NULL
,
NULL
,
pcbTypeName
))
if
(
!
RegQueryValueEx
(
hSubKey
,
"TypeName"
,
NULL
,
NULL
,
NULL
,
pcbTypeName
))
goto
cleanup
;
{
if
(
!
(
*
pszTypeName
=
LocalAlloc
(
LMEM_ZEROINIT
,
*
pcbTypeName
)))
break
;
if
(
!
(
*
pszTypeName
=
LocalAlloc
(
LMEM_ZEROINIT
,
*
pcbTypeName
)))
if
(
!
RegQueryValueEx
(
hSubKey
,
"TypeName"
,
NULL
,
NULL
,
(
LPBYTE
)
*
pszTypeName
,
pcbTypeName
))
goto
cleanup
;
{
ret
=
TRUE
;
break
;
}
if
(
!
RegQueryValueEx
(
hSubKey
,
"TypeName"
,
NULL
,
NULL
,
(
LPBYTE
)
*
pszTypeName
,
pcbTypeName
))
LocalFree
(
*
pszTypeName
);
ret
=
TRUE
;
}
RegCloseKey
(
hSubKey
);
(
*
pdwIndex
)
++
;
}
cleanup:
if
(
!
ret
)
if
(
!
ret
)
LocalFree
(
*
pszTypeName
);
LocalFree
(
*
pszTypeName
);
RegCloseKey
(
hSubKey
);
LocalFree
(
szName
);
LocalFree
(
szName
);
RegCloseKey
(
hSubKey
);
cleanup:
RegCloseKey
(
hKey
);
RegCloseKey
(
hKey
);
return
ret
;
return
ret
;
...
@@ -616,7 +626,7 @@ cleanup:
...
@@ -616,7 +626,7 @@ cleanup:
static
void
test_enum_provider_types
(
void
)
static
void
test_enum_provider_types
(
void
)
{
{
/* expected values */
/* expected values */
DWORD
dwProvType
;
DWORD
dwProvType
=
0
;
LPSTR
pszTypeName
=
NULL
;
LPSTR
pszTypeName
=
NULL
;
DWORD
cbTypeName
;
DWORD
cbTypeName
;
DWORD
dwTypeCount
;
DWORD
dwTypeCount
;
...
@@ -637,7 +647,7 @@ static void test_enum_provider_types(void)
...
@@ -637,7 +647,7 @@ static void test_enum_provider_types(void)
return
;
return
;
}
}
if
(
!
FindProvTypesRegVals
(
index
,
&
dwProvType
,
&
pszTypeName
,
&
cbTypeName
,
&
dwTypeCount
))
if
(
!
FindProvTypesRegVals
(
&
index
,
&
dwProvType
,
&
pszTypeName
,
&
cbTypeName
,
&
dwTypeCount
))
{
{
skip
(
"Could not find provider types in registry
\n
"
);
skip
(
"Could not find provider types in registry
\n
"
);
return
;
return
;
...
...
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