#include <stdarg.h>
#include "wine/test.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winnls.h"
#include "winresrc.h"
#include "nb30.h"
#include "lmcons.h"
#include "lmerr.h"
#include "lmwksta.h"
#include "lmapibuf.h"
#include "lmjoin.h"
Go to the source code of this file.
◆ init_wksta_tests()
Definition at line 47 of file wksta.c.
56 win_skip(
"GetUserNameW is not implemented\n");
59 ok(rc,
"User Name Retrieved\n");
static WCHAR computer_name[MAX_COMPUTERNAME_LENGTH+1]
DWORD WINAPI GetLastError(VOID)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
#define ERROR_CALL_NOT_IMPLEMENTED
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static WCHAR user_name[UNLEN+1]
Referenced by START_TEST().
◆ NET_API_STATUS()
◆ run_get_comp_name_tests()
static void run_get_comp_name_tests |
( |
void |
| ) |
|
|
static |
Definition at line 67 of file wksta.c.
71 ok(pNetpGetComputerName(&
ws) ==
NERR_Success,
"Computer name is retrieved\n");
73 pNetApiBufferFree(
ws);
static WCHAR computer_name[MAX_COMPUTERNAME_LENGTH+1]
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Referenced by START_TEST().
◆ run_wkstajoininfo_tests()
static void run_wkstajoininfo_tests |
( |
void |
| ) |
|
|
static |
Definition at line 190 of file wksta.c.
196 if (!pNetGetJoinInformation) {
197 win_skip(
"NetGetJoinInformation not available\n");
203 ok(buffertype == 0xdada,
"buffertype set to unexpected value %d\n", buffertype);
207 ok(buffertype != 0xdada && buffertype !=
NetSetupUnknownStatus,
"buffertype set to unexpected value %d\n", buffertype);
209 pNetApiBufferFree(
buffer);
#define ERROR_INVALID_PARAMETER
char * wine_dbgstr_w(const wchar_t *wstr)
enum _NETSETUP_JOIN_STATUS NETSETUP_JOIN_STATUS
Referenced by START_TEST().
◆ run_wkstatransportenum_tests()
static void run_wkstatransportenum_tests |
( |
void |
| ) |
|
|
static |
Definition at line 139 of file wksta.c.
143 DWORD entriesRead, totalEntries;
149 "NetWkstaTransportEnum returned %d\n", apiReturn);
160 "NetWkstaTransportEnum returned %d\n", apiReturn);
166 "NetWkstaTransportEnum returned %d\n", apiReturn);
172 "NetWkstaTransportEnum returned %d\n", apiReturn);
176 &entriesRead, &totalEntries,
NULL);
178 "NetWkstaTransportEnum returned %d\n", apiReturn);
182 ok(bufPtr !=
NULL,
"got data back\n");
183 ok(entriesRead > 0,
"read at least one transport\n");
184 ok(totalEntries > 0 ||
broken(totalEntries == 0) ,
185 "at least one transport\n");
186 pNetApiBufferFree(bufPtr);
#define ERROR_INVALID_PARAMETER
#define MAX_PREFERRED_LENGTH
#define RPC_X_NULL_REF_POINTER
#define NERR_WkstaNotStarted
#define STATUS_ACCESS_VIOLATION
#define ERROR_NETWORK_UNREACHABLE
#define ERROR_INVALID_LEVEL
Referenced by START_TEST().
◆ run_wkstausergetinfo_tests()
static void run_wkstausergetinfo_tests |
( |
void |
| ) |
|
|
static |
Definition at line 76 of file wksta.c.
85 rc = pNetWkstaUserGetInfo(
NULL, 0, (
LPBYTE *)&ui0);
88 skip(
"Workstation service not running\n");
91 ok(!rc && ui0,
"got %d and %p (expected NERR_Success and != NULL\n", rc, ui0);
102 pNetApiBufferSize(ui0, &
dwSize);
105 "Is allocated with NetApiBufferAllocate\n");
109 "NetWkstaUserGetInfo is successful\n");
111 "the same name as returned for level 0\n");
112 pNetApiBufferSize(ui1, &
dwSize);
118 "Is allocated with NetApiBufferAllocate\n");
122 "NetWkstaUserGetInfo is successful\n");
124 "the same oth_domains as returned for level 1\n");
125 pNetApiBufferSize(ui1101, &
dwSize);
128 "Is allocated with NetApiBufferAllocate\n");
130 pNetApiBufferFree(ui0);
131 pNetApiBufferFree(ui1);
132 pNetApiBufferFree(ui1101);
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
#define NERR_WkstaNotStarted
LPWSTR wkui1101_oth_domains
LPWSTR wkui1_logon_server
#define ERROR_INVALID_LEVEL
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
LPWSTR wkui1_logon_domain
static WCHAR user_name[UNLEN+1]
Referenced by START_TEST().
◆ START_TEST()
Definition at line 212 of file wksta.c.
216 pNetApiBufferFree=(
void*)
GetProcAddress(hnetapi32,
"NetApiBufferFree");
217 pNetApiBufferSize=(
void*)
GetProcAddress(hnetapi32,
"NetApiBufferSize");
218 pNetpGetComputerName=(
void*)
GetProcAddress(hnetapi32,
"NetpGetComputerName");
219 pNetWkstaUserGetInfo=(
void*)
GetProcAddress(hnetapi32,
"NetWkstaUserGetInfo");
220 pNetWkstaTransportEnum=(
void*)
GetProcAddress(hnetapi32,
"NetWkstaTransportEnum");
221 pNetGetJoinInformation=(
void*)
GetProcAddress(hnetapi32,
"NetGetJoinInformation");
226 if (!pNetApiBufferFree) {
227 win_skip(
"Needed functions are not available\n");
233 if (pNetpGetComputerName)
236 win_skip(
"Function NetpGetComputerName not available\n");
static BOOL init_wksta_tests(void)
static void run_wkstatransportenum_tests(void)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
static void run_get_comp_name_tests(void)
static void run_wkstajoininfo_tests(void)
#define GetProcAddress(x, y)
static void run_wkstausergetinfo_tests(void)
◆ computer_name
◆ DWORD
◆ LPDWORD
◆ PNETSETUP_JOIN_STATUS
◆ user_name