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
611220d5
Commit
611220d5
authored
Oct 08, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Win64 printf format warning fixes.
parent
54b1c5e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
24 deletions
+23
-24
Makefile.in
dlls/netapi32/tests/Makefile.in
+0
-1
access.c
dlls/netapi32/tests/access.c
+9
-9
apibuf.c
dlls/netapi32/tests/apibuf.c
+2
-2
ds.c
dlls/netapi32/tests/ds.c
+8
-8
wksta.c
dlls/netapi32/tests/wksta.c
+4
-4
No files found.
dlls/netapi32/tests/Makefile.in
View file @
611220d5
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
netapi32.dll
IMPORTS
=
netapi32 advapi32 kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
access.c
\
...
...
dlls/netapi32/tests/access.c
View file @
611220d5
...
...
@@ -79,7 +79,7 @@ static void run_usergetinfo_tests(void)
/* Level 0 */
rc
=
pNetUserGetInfo
(
NULL
,
sAdminUserName
,
0
,
(
LPBYTE
*
)
&
ui0
);
if
(
rc
!=
NERR_Success
)
{
trace
(
"Aborting usergetinfo_tests(). NetUserGetInfo: rc=%
l
d
\n
"
,
rc
);
trace
(
"Aborting usergetinfo_tests(). NetUserGetInfo: rc=%d
\n
"
,
rc
);
return
;
}
ok
(
!
lstrcmpW
(
sAdminUserName
,
ui0
->
usri0_name
),
"This is really user name
\n
"
);
...
...
@@ -90,7 +90,7 @@ static void run_usergetinfo_tests(void)
/* Level 10 */
rc
=
pNetUserGetInfo
(
NULL
,
sAdminUserName
,
10
,
(
LPBYTE
*
)
&
ui10
);
ok
(
rc
==
NERR_Success
,
"NetUserGetInfo: rc=%
l
d
\n
"
,
rc
);
ok
(
rc
==
NERR_Success
,
"NetUserGetInfo: rc=%d
\n
"
,
rc
);
ok
(
!
lstrcmpW
(
sAdminUserName
,
ui10
->
usri10_name
),
"This is really user name
\n
"
);
pNetApiBufferSize
(
ui10
,
&
dwSize
);
ok
(
dwSize
>=
(
sizeof
(
USER_INFO_10
)
+
...
...
@@ -105,22 +105,22 @@ static void run_usergetinfo_tests(void)
/* errors handling */
rc
=
pNetUserGetInfo
(
NULL
,
sAdminUserName
,
10000
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
ERROR_INVALID_LEVEL
,
"Invalid Level: rc=%
l
d
\n
"
,
rc
);
ok
(
rc
==
ERROR_INVALID_LEVEL
,
"Invalid Level: rc=%d
\n
"
,
rc
);
rc
=
pNetUserGetInfo
(
NULL
,
sNonexistentUser
,
0
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
NERR_UserNotFound
,
"Invalid User Name: rc=%
l
d
\n
"
,
rc
);
ok
(
rc
==
NERR_UserNotFound
,
"Invalid User Name: rc=%d
\n
"
,
rc
);
todo_wine
{
/* FIXME - Currently Wine can't verify whether the network path is good or bad */
rc
=
pNetUserGetInfo
(
sBadNetPath
,
sAdminUserName
,
0
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
ERROR_BAD_NETPATH
||
rc
==
ERROR_NETWORK_UNREACHABLE
,
"Bad Network Path: rc=%
l
d
\n
"
,
rc
);
"Bad Network Path: rc=%d
\n
"
,
rc
);
}
rc
=
pNetUserGetInfo
(
sEmptyStr
,
sAdminUserName
,
0
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
ERROR_BAD_NETPATH
||
rc
==
NERR_Success
,
"Bad Network Path: rc=%
l
d
\n
"
,
rc
);
"Bad Network Path: rc=%d
\n
"
,
rc
);
rc
=
pNetUserGetInfo
(
sInvalidName
,
sAdminUserName
,
0
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
ERROR_INVALID_NAME
,
"Invalid Server Name: rc=%
l
d
\n
"
,
rc
);
ok
(
rc
==
ERROR_INVALID_NAME
,
"Invalid Server Name: rc=%d
\n
"
,
rc
);
rc
=
pNetUserGetInfo
(
sInvalidName2
,
sAdminUserName
,
0
,
(
LPBYTE
*
)
&
ui0
);
ok
(
rc
==
ERROR_INVALID_NAME
,
"Invalid Server Name: rc=%
l
d
\n
"
,
rc
);
ok
(
rc
==
ERROR_INVALID_NAME
,
"Invalid Server Name: rc=%d
\n
"
,
rc
);
}
/* checks Level 1 of NetQueryDisplayInformation */
...
...
@@ -177,7 +177,7 @@ static void run_usermodalsget_tests(void)
USER_MODALS_INFO_2
*
umi2
=
NULL
;
rc
=
pNetUserModalsGet
(
NULL
,
2
,
(
LPBYTE
*
)
&
umi2
);
ok
(
rc
==
ERROR_SUCCESS
,
"NetUserModalsGet failed, rc = %
l
d
\n
"
,
rc
);
ok
(
rc
==
ERROR_SUCCESS
,
"NetUserModalsGet failed, rc = %d
\n
"
,
rc
);
if
(
umi2
)
pNetApiBufferFree
(
umi2
);
...
...
dlls/netapi32/tests/apibuf.c
View file @
611220d5
...
...
@@ -83,13 +83,13 @@ static void run_apibuf_tests(void)
SetLastError
(
0xdeadbeef
);
res
=
pNetApiBufferAllocate
(
0
,
(
LPVOID
*
)
NULL
);
ok
(
(
res
==
ERROR_INVALID_PARAMETER
)
&&
(
GetLastError
()
==
0xdeadbeef
),
"returned %
ld with 0x%l
x (expected ERROR_INVALID_PARAMETER with "
\
"returned %
d with 0x%
x (expected ERROR_INVALID_PARAMETER with "
\
"0xdeadbeef)
\n
"
,
res
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
res
=
pNetApiBufferAllocate
(
1024
,
(
LPVOID
*
)
NULL
);
ok
(
(
res
==
ERROR_INVALID_PARAMETER
)
&&
(
GetLastError
()
==
0xdeadbeef
),
"returned %
ld with 0x%l
x (expected ERROR_INVALID_PARAMETER with "
\
"returned %
d with 0x%
x (expected ERROR_INVALID_PARAMETER with "
\
"0xdeadbeef)
\n
"
,
res
,
GetLastError
());
}
...
...
dlls/netapi32/tests/ds.c
View file @
611220d5
...
...
@@ -36,18 +36,18 @@ static void test_params(void)
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
DsRolePrimaryDomainInfoBasic
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%
l
d)
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%d)
\n
"
,
ret
);
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
0
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%
l
d)
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%d)
\n
"
,
ret
);
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
4
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%
l
d)
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%d)
\n
"
,
ret
);
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
4
,
(
PBYTE
*
)
&
dpdi
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%
l
d)
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected error ERROR_INVALID_PARAMETER, got (%d)
\n
"
,
ret
);
}
static
void
test_get
(
void
)
...
...
@@ -59,17 +59,17 @@ static void test_get(void)
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
DsRolePrimaryDomainInfoBasic
,
(
PBYTE
*
)
&
dpdi
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%
l
d)
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%d)
\n
"
,
ret
);
pDsRoleFreeMemory
(
&
dpdi
);
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
DsRoleUpgradeStatus
,
(
PBYTE
*
)
&
dusi
);
todo_wine
{
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%
l
d)
\n
"
,
ret
);
}
todo_wine
{
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%d)
\n
"
,
ret
);
}
pDsRoleFreeMemory
(
&
dusi
);
SetLastError
(
0xdeadbeef
);
ret
=
pDsRoleGetPrimaryDomainInformation
(
NULL
,
DsRoleOperationState
,
(
PBYTE
*
)
&
dosi
);
todo_wine
{
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%
l
d)
\n
"
,
ret
);
}
todo_wine
{
ok
(
ret
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got (%d)
\n
"
,
ret
);
}
pDsRoleFreeMemory
(
&
dosi
);
}
...
...
@@ -86,7 +86,7 @@ START_TEST(ds)
pDsRoleGetPrimaryDomainInformation
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"DsRoleGetPrimaryDomainInformation"
);
if
(
!
pDsRoleGetPrimaryDomainInformation
)
{
trace
(
"DsRoleGetPrimaryDomainInformation not implemented : (%
l
d), stop testing
\n
"
,
GetLastError
());
trace
(
"DsRoleGetPrimaryDomainInformation not implemented : (%d), stop testing
\n
"
,
GetLastError
());
return
;
}
pDsRoleFreeMemory
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"DsRoleFreeMemory"
);
...
...
dlls/netapi32/tests/wksta.c
View file @
611220d5
...
...
@@ -135,7 +135,7 @@ static void run_wkstatransportenum_tests(void)
apiReturn
=
pNetWkstaTransportEnum
(
NULL
,
1
,
NULL
,
MAX_PREFERRED_LENGTH
,
NULL
,
&
totalEntries
,
NULL
);
ok
(
apiReturn
==
ERROR_INVALID_LEVEL
||
apiReturn
==
ERROR_INVALID_PARAMETER
,
"NetWkstaTransportEnum returned %
l
d
\n
"
,
apiReturn
);
"NetWkstaTransportEnum returned %d
\n
"
,
apiReturn
);
/* 2nd check: is param 5 passed? (only if level passes?) */
apiReturn
=
pNetWkstaTransportEnum
(
NULL
,
0
,
NULL
,
MAX_PREFERRED_LENGTH
,
...
...
@@ -146,13 +146,13 @@ static void run_wkstatransportenum_tests(void)
return
;
ok
(
apiReturn
==
STATUS_ACCESS_VIOLATION
||
apiReturn
==
ERROR_INVALID_PARAMETER
,
"NetWkstaTransportEnum returned %
l
d
\n
"
,
apiReturn
);
"NetWkstaTransportEnum returned %d
\n
"
,
apiReturn
);
/* 3rd check: is param 3 passed? */
apiReturn
=
pNetWkstaTransportEnum
(
NULL
,
0
,
NULL
,
MAX_PREFERRED_LENGTH
,
NULL
,
NULL
,
NULL
);
ok
(
apiReturn
==
STATUS_ACCESS_VIOLATION
||
apiReturn
==
RPC_X_NULL_REF_POINTER
||
apiReturn
==
ERROR_INVALID_PARAMETER
,
"NetWkstaTransportEnum returned %
l
d
\n
"
,
apiReturn
);
"NetWkstaTransportEnum returned %d
\n
"
,
apiReturn
);
/* 4th check: is param 6 passed? */
apiReturn
=
pNetWkstaTransportEnum
(
NULL
,
0
,
&
bufPtr
,
MAX_PREFERRED_LENGTH
,
...
...
@@ -163,7 +163,7 @@ static void run_wkstatransportenum_tests(void)
apiReturn
=
pNetWkstaTransportEnum
(
NULL
,
0
,
&
bufPtr
,
MAX_PREFERRED_LENGTH
,
&
entriesRead
,
&
totalEntries
,
NULL
);
ok
(
apiReturn
==
NERR_Success
||
apiReturn
==
ERROR_NETWORK_UNREACHABLE
,
"NetWkstaTransportEnum returned %
l
d
\n
"
,
apiReturn
);
"NetWkstaTransportEnum returned %d
\n
"
,
apiReturn
);
if
(
apiReturn
==
NERR_Success
)
{
/* WKSTA_TRANSPORT_INFO_0 *transports = (WKSTA_TRANSPORT_INFO_0 *)bufPtr; */
...
...
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