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
de2c4015
Commit
de2c4015
authored
Jun 05, 2011
by
Louis Lenders
Committed by
Alexandre Julliard
Jun 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32/tests: Add small conformance test for NetLocalGroupGetInfo and LocalGroupGetMembers.
parent
4680f639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
access.c
dlls/netapi32/tests/access.c
+30
-0
No files found.
dlls/netapi32/tests/access.c
View file @
de2c4015
...
@@ -63,6 +63,8 @@ static NET_API_STATUS (WINAPI *pNetUserGetInfo)(LPCWSTR,LPCWSTR,DWORD,LPBYTE*)=N
...
@@ -63,6 +63,8 @@ static NET_API_STATUS (WINAPI *pNetUserGetInfo)(LPCWSTR,LPCWSTR,DWORD,LPBYTE*)=N
static
NET_API_STATUS
(
WINAPI
*
pNetUserModalsGet
)(
LPCWSTR
,
DWORD
,
LPBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserModalsGet
)(
LPCWSTR
,
DWORD
,
LPBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserAdd
)(
LPCWSTR
,
DWORD
,
LPBYTE
,
LPDWORD
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserAdd
)(
LPCWSTR
,
DWORD
,
LPBYTE
,
LPDWORD
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserDel
)(
LPCWSTR
,
LPCWSTR
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserDel
)(
LPCWSTR
,
LPCWSTR
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetLocalGroupGetInfo
)(
LPCWSTR
,
LPCWSTR
,
DWORD
,
LPBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetLocalGroupGetMembers
)(
LPCWSTR
,
LPCWSTR
,
DWORD
,
LPBYTE
*
,
DWORD
,
LPDWORD
,
LPDWORD
,
PDWORD_PTR
)
=
NULL
;
static
int
init_access_tests
(
void
)
static
int
init_access_tests
(
void
)
{
{
...
@@ -320,6 +322,31 @@ static void run_userhandling_tests(void)
...
@@ -320,6 +322,31 @@ static void run_userhandling_tests(void)
ok
(
ret
==
NERR_UserNotFound
,
"Deleting a nonexistent user returned 0x%08x
\n
"
,
ret
);
ok
(
ret
==
NERR_UserNotFound
,
"Deleting a nonexistent user returned 0x%08x
\n
"
,
ret
);
}
}
static
void
run_localgroupgetinfo_tests
(
void
)
{
NET_API_STATUS
status
;
static
const
WCHAR
admins
[]
=
{
'A'
,
'd'
,
'm'
,
'i'
,
'n'
,
'i'
,
's'
,
't'
,
'r'
,
'a'
,
't'
,
'o'
,
'r'
,
's'
,
0
};
PLOCALGROUP_INFO_1
lgi
=
NULL
;
PLOCALGROUP_MEMBERS_INFO_3
buffer
=
NULL
;
DWORD
entries_read
=
0
,
total_entries
=
0
;
int
i
;
status
=
pNetLocalGroupGetInfo
(
NULL
,
admins
,
1
,
(
LPBYTE
*
)
&
lgi
);
ok
(
status
==
NERR_Success
,
"NetLocalGroupGetInfo unexpectedly returned %d
\n
"
,
status
);
trace
(
"Local groupname:%s
\n
"
,
wine_dbgstr_w
(
lgi
->
lgrpi1_name
));
trace
(
"Comment: %s
\n
"
,
wine_dbgstr_w
(
lgi
->
lgrpi1_comment
));
pNetApiBufferFree
(
lgi
);
status
=
pNetLocalGroupGetMembers
(
NULL
,
admins
,
3
,
(
LPBYTE
*
)
&
buffer
,
MAX_PREFERRED_LENGTH
,
&
entries_read
,
&
total_entries
,
NULL
);
ok
(
status
==
NERR_Success
,
"NetLocalGroupGetMembers unexpectedly returned %d
\n
"
,
status
);
ok
(
entries_read
>
0
&&
total_entries
>
0
,
"Amount of entries is unexpectedly 0
\n
"
);
for
(
i
=
0
;
i
<
entries_read
;
i
++
)
trace
(
"domain and name: %s
\n
"
,
wine_dbgstr_w
(
buffer
[
i
].
lgrmi3_domainandname
));
}
START_TEST
(
access
)
START_TEST
(
access
)
{
{
HMODULE
hnetapi32
=
LoadLibraryA
(
"netapi32.dll"
);
HMODULE
hnetapi32
=
LoadLibraryA
(
"netapi32.dll"
);
...
@@ -331,6 +358,8 @@ START_TEST(access)
...
@@ -331,6 +358,8 @@ START_TEST(access)
pNetUserModalsGet
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserModalsGet"
);
pNetUserModalsGet
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserModalsGet"
);
pNetUserAdd
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserAdd"
);
pNetUserAdd
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserAdd"
);
pNetUserDel
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserDel"
);
pNetUserDel
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserDel"
);
pNetLocalGroupGetInfo
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetLocalGroupGetInfo"
);
pNetLocalGroupGetMembers
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetLocalGroupGetMembers"
);
/* These functions were introduced with NT. It's safe to assume that
/* These functions were introduced with NT. It's safe to assume that
* if one is not available, none are.
* if one is not available, none are.
...
@@ -346,6 +375,7 @@ START_TEST(access)
...
@@ -346,6 +375,7 @@ START_TEST(access)
run_usergetinfo_tests
();
run_usergetinfo_tests
();
run_querydisplayinformation1_tests
();
run_querydisplayinformation1_tests
();
run_usermodalsget_tests
();
run_usermodalsget_tests
();
run_localgroupgetinfo_tests
();
}
}
FreeLibrary
(
hnetapi32
);
FreeLibrary
(
hnetapi32
);
...
...
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