56 win_skip(
"GetUserNameW is not implemented\n");
59 ok(rc,
"User Name Retrieved\n");
71 ok(pNetpGetComputerName(&
ws) ==
NERR_Success,
"Computer name is retrieved\n");
73 pNetApiBufferFree(
ws);
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);
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);
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);
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");
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
#define MAX_PREFERRED_LENGTH
#define NERR_WkstaNotStarted
enum _NETSETUP_JOIN_STATUS NETSETUP_JOIN_STATUS
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static LPWSTR PNETSETUP_JOIN_STATUS
static void run_wkstajoininfo_tests(void)
static BOOL init_wksta_tests(void)
static void run_wkstatransportenum_tests(void)
static void run_wkstausergetinfo_tests(void)
static WCHAR computer_name[MAX_COMPUTERNAME_LENGTH+1]
static void run_get_comp_name_tests(void)
static WCHAR user_name[UNLEN+1]
#define STATUS_ACCESS_VIOLATION
LPWSTR wkui1101_oth_domains
LPWSTR wkui1_logon_domain
LPWSTR wkui1_logon_server
DWORD WINAPI GetLastError(void)
#define MAX_COMPUTERNAME_LENGTH
#define ERROR_INVALID_LEVEL
#define ERROR_NETWORK_UNREACHABLE
#define RPC_X_NULL_REF_POINTER