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
6f08c7e9
Commit
6f08c7e9
authored
Jun 10, 2011
by
Louis Lenders
Committed by
Alexandre Julliard
Jun 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32/tests: Add small conformance test for NetGetJoinInformation.
parent
ed28cab6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
wksta.c
dlls/netapi32/tests/wksta.c
+26
-0
No files found.
dlls/netapi32/tests/wksta.c
View file @
6f08c7e9
...
...
@@ -31,6 +31,7 @@
#include "lmerr.h"
#include "lmwksta.h"
#include "lmapibuf.h"
#include "lmjoin.h"
static
NET_API_STATUS
(
WINAPI
*
pNetApiBufferFree
)(
LPVOID
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetApiBufferSize
)(
LPVOID
,
LPDWORD
)
=
NULL
;
...
...
@@ -38,6 +39,7 @@ static NET_API_STATUS (WINAPI *pNetpGetComputerName)(LPWSTR*)=NULL;
static
NET_API_STATUS
(
WINAPI
*
pNetWkstaUserGetInfo
)(
LPWSTR
,
DWORD
,
PBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetWkstaTransportEnum
)(
LPWSTR
,
DWORD
,
LPBYTE
*
,
DWORD
,
LPDWORD
,
LPDWORD
,
LPDWORD
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetGetJoinInformation
)(
LPCWSTR
,
LPWSTR
*
,
PNETSETUP_JOIN_STATUS
);
static
WCHAR
user_name
[
UNLEN
+
1
];
static
WCHAR
computer_name
[
MAX_COMPUTERNAME_LENGTH
+
1
];
...
...
@@ -179,6 +181,28 @@ static void run_wkstatransportenum_tests(void)
}
}
static
void
run_wkstajoininfo_tests
(
void
)
{
NET_API_STATUS
ret
;
LPWSTR
buffer
=
NULL
;
NETSETUP_JOIN_STATUS
buffertype
=
0xdada
;
/* NT4 doesn't have this function */
if
(
!
pNetGetJoinInformation
)
{
win_skip
(
"NetGetJoinInformation not available
\n
"
);
return
;
}
ret
=
pNetGetJoinInformation
(
NULL
,
NULL
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"NetJoinGetInformation returned unexpected 0x%08x
\n
"
,
ret
);
ok
(
buffertype
==
0xdada
,
"buffertype set to unexpected value %d
\n
"
,
buffertype
);
ret
=
pNetGetJoinInformation
(
NULL
,
&
buffer
,
&
buffertype
);
ok
(
ret
==
NERR_Success
,
"NetJoinGetInformation returned unexpected 0x%08x
\n
"
,
ret
);
ok
(
buffertype
!=
0xdada
&&
buffertype
!=
NetSetupUnknownStatus
,
"buffertype set to unexpected value %d
\n
"
,
buffertype
);
trace
(
"workstation joined to %s with status %d
\n
"
,
wine_dbgstr_w
(
buffer
),
buffertype
);
pNetApiBufferFree
(
buffer
);
}
START_TEST
(
wksta
)
{
HMODULE
hnetapi32
=
LoadLibraryA
(
"netapi32.dll"
);
...
...
@@ -188,6 +212,7 @@ START_TEST(wksta)
pNetpGetComputerName
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetpGetComputerName"
);
pNetWkstaUserGetInfo
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetWkstaUserGetInfo"
);
pNetWkstaTransportEnum
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetWkstaTransportEnum"
);
pNetGetJoinInformation
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetGetJoinInformation"
);
/* These functions were introduced with NT. It's safe to assume that
* if one is not available, none are.
...
...
@@ -205,6 +230,7 @@ START_TEST(wksta)
win_skip
(
"Function NetpGetComputerName not available
\n
"
);
run_wkstausergetinfo_tests
();
run_wkstatransportenum_tests
();
run_wkstajoininfo_tests
();
}
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