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
f230f63a
Commit
f230f63a
authored
Oct 03, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Win64 printf format warning fixes.
parent
8cb932ea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
Makefile.in
dlls/wintrust/tests/Makefile.in
+0
-1
register.c
dlls/wintrust/tests/register.c
+18
-18
No files found.
dlls/wintrust/tests/Makefile.in
View file @
f230f63a
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
wintrust.dll
IMPORTS
=
user32 advapi32 kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
register.c
...
...
dlls/wintrust/tests/register.c
View file @
f230f63a
...
...
@@ -75,7 +75,7 @@ static void test_AddRem_ActionID(void)
ok
(
!
ret
,
"Expected WintrustAddActionID to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* XP/W2K3 */
||
GetLastError
()
==
0xdeadbeef
/* Win98/NT4/W2K */
,
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %d.
\n
"
,
GetLastError
());
/* NULL functions */
SetLastError
(
0xdeadbeef
);
...
...
@@ -83,7 +83,7 @@ static void test_AddRem_ActionID(void)
ok
(
!
ret
,
"Expected WintrustAddActionID to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* XP/W2K3 */
||
GetLastError
()
==
0xdeadbeef
/* Win98/NT4/W2K */
,
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %d.
\n
"
,
GetLastError
());
/* All OK (although no functions defined), except cbStruct is not set in ActionIDFunctions */
SetLastError
(
0xdeadbeef
);
...
...
@@ -92,7 +92,7 @@ static void test_AddRem_ActionID(void)
ok
(
!
ret
,
"Expected WintrustAddActionID to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* XP/W2K3 */
||
GetLastError
()
==
0xdeadbeef
/* Win98/NT4/W2K */
,
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %d.
\n
"
,
GetLastError
());
/* All OK (although no functions defined) and cbStruct is set now */
SetLastError
(
0xdeadbeef
);
...
...
@@ -101,7 +101,7 @@ static void test_AddRem_ActionID(void)
ret
=
pWintrustAddActionID
(
&
ActionID
,
0
,
&
ActionIDFunctions
);
ok
(
ret
,
"Expected WintrustAddActionID to succeed.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* All OK and all (but 1) functions are correctly defined. The DLL and entrypoints
* are not present.
...
...
@@ -120,7 +120,7 @@ static void test_AddRem_ActionID(void)
ret
=
pWintrustAddActionID
(
&
ActionID
,
0
,
&
ActionIDFunctions
);
ok
(
ret
,
"Expected WintrustAddActionID to succeed.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* All OK and all functions are correctly defined. The DLL and entrypoints
* are not present.
...
...
@@ -139,26 +139,26 @@ static void test_AddRem_ActionID(void)
ret
=
pWintrustAddActionID
(
&
ActionID
,
0
,
&
ActionIDFunctions
);
ok
(
ret
,
"Expected WintrustAddActionID to succeed.
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d.
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %d.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pWintrustRemoveActionID
(
&
ActionID
);
ok
(
ret
,
"WintrustRemoveActionID failed : 0x%08
l
x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error should not have been changed: 0x%08
l
x
\n
"
,
GetLastError
());
ok
(
ret
,
"WintrustRemoveActionID failed : 0x%08x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error should not have been changed: 0x%08x
\n
"
,
GetLastError
());
/* NULL input */
SetLastError
(
0xdeadbeef
);
ret
=
pWintrustRemoveActionID
(
NULL
);
ok
(
ret
,
"Expected WintrustRemoveActionID to succeed.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* The passed GUID is removed by a previous call, so it's basically a test with a nonexistent Trust provider */
SetLastError
(
0xdeadbeef
);
ret
=
pWintrustRemoveActionID
(
&
ActionID
);
ok
(
ret
,
"Expected WintrustRemoveActionID to succeed.
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d.
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %d.
\n
"
,
GetLastError
());
}
static
void
test_AddDefaultForUsage
(
void
)
...
...
@@ -177,14 +177,14 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected WintrustAddDefaultForUsage to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* NULL defusage */
SetLastError
(
0xdeadbeef
);
ret
=
pWintrustAddDefaultForUsage
(
oid
,
NULL
);
ok
(
!
ret
,
"Expected WintrustAddDefaultForUsage to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* NULL oid and proper defusage */
memset
(
&
DefUsage
,
0
,
sizeof
(
CRYPT_PROVIDER_REGDEFUSAGE
));
...
...
@@ -197,7 +197,7 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
NULL
,
&
DefUsage
);
ok
(
!
ret
,
"Expected WintrustAddDefaultForUsage to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* Just the ActionID */
memset
(
&
DefUsage
,
0
,
sizeof
(
CRYPT_PROVIDER_REGDEFUSAGE
));
...
...
@@ -207,7 +207,7 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
oid
,
&
DefUsage
);
ok
(
ret
,
"Expected WintrustAddDefaultForUsage to succeed
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error should not have been changed: 0x%08
l
x
\n
"
,
GetLastError
());
"Last error should not have been changed: 0x%08x
\n
"
,
GetLastError
());
/* No ActionID */
memset
(
&
DefUsage
,
0
,
sizeof
(
CRYPT_PROVIDER_REGDEFUSAGE
));
...
...
@@ -218,7 +218,7 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
oid
,
&
DefUsage
);
ok
(
!
ret
,
"Expected WintrustAddDefaultForUsage to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* cbStruct set to 0 */
memset
(
&
DefUsage
,
0
,
sizeof
(
CRYPT_PROVIDER_REGDEFUSAGE
));
...
...
@@ -231,7 +231,7 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
oid
,
&
DefUsage
);
ok
(
!
ret
,
"Expected WintrustAddDefaultForUsage to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* All OK */
memset
(
&
DefUsage
,
0
,
sizeof
(
CRYPT_PROVIDER_REGDEFUSAGE
));
...
...
@@ -244,7 +244,7 @@ static void test_AddDefaultForUsage(void)
ret
=
pWintrustAddDefaultForUsage
(
oid
,
&
DefUsage
);
ok
(
ret
,
"Expected WintrustAddDefaultForUsage to succeed
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error should not have been changed: 0x%08
l
x
\n
"
,
GetLastError
());
"Last error should not have been changed: 0x%08x
\n
"
,
GetLastError
());
/* There is no corresponding remove for WintrustAddDefaultForUsage
* so we delete the registry key manually.
...
...
@@ -252,7 +252,7 @@ static void test_AddDefaultForUsage(void)
if
(
ret
)
{
res
=
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
Usages
);
ok
(
res
==
ERROR_SUCCESS
,
"Key delete failed : 0x%08
l
x
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"Key delete failed : 0x%08x
\n
"
,
res
);
}
}
...
...
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