2 * Copyright 2002 Andriy Palamarchuk
4 * Conformance test of the access functions.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/test.h"
32 static WCHAR user_name
[UNLEN
+ 1];
33 static WCHAR computer_name
[MAX_COMPUTERNAME_LENGTH
+ 1];
35 static WCHAR sTooLongName
[] = L
"This is a bad username";
36 static WCHAR sTooLongPassword
[] = L
"abcdefghabcdefghabcdefghabcdefghabcdefgh"
37 "abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh"
38 "abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh"
39 "abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgha";
41 static WCHAR sTestUserOldPass
[] = L
"OldPassW0rdSet!~";
43 static DWORD (WINAPI
*pDavGetHTTPFromUNCPath
)(LPCWSTR
,LPWSTR
,LPDWORD
);
44 static DWORD (WINAPI
*pDavGetUNCFromHTTPPath
)(LPCWSTR
,LPWSTR
,LPDWORD
);
46 static NET_API_STATUS
create_test_user(void)
50 usri
.usri1_name
= (WCHAR
*)L
"testuser";
51 usri
.usri1_password
= sTestUserOldPass
;
52 usri
.usri1_priv
= USER_PRIV_USER
;
53 usri
.usri1_home_dir
= NULL
;
54 usri
.usri1_comment
= NULL
;
55 usri
.usri1_flags
= UF_SCRIPT
;
56 usri
.usri1_script_path
= NULL
;
58 return NetUserAdd(NULL
, 1, (BYTE
*)&usri
, NULL
);
61 static NET_API_STATUS
delete_test_user(void)
63 return NetUserDel(NULL
, L
"testuser");
66 static void run_usergetinfo_tests(void)
69 PUSER_INFO_0 ui0
= NULL
;
70 PUSER_INFO_10 ui10
= NULL
;
73 if((rc
= create_test_user()) != NERR_Success
)
75 skip("Skipping usergetinfo_tests, create_test_user failed: 0x%08lx\n", rc
);
80 rc
= NetUserGetInfo(NULL
, L
"testuser", 0, (BYTE
**)&ui0
);
81 ok(rc
== NERR_Success
, "NetUserGetInfo level 0 failed: 0x%08lx.\n", rc
);
82 ok(!wcscmp(L
"testuser", ui0
->usri0_name
), "Got level 0 name %s.\n", debugstr_w(ui0
->usri0_name
));
83 NetApiBufferSize(ui0
, &dwSize
);
84 ok(dwSize
>= (sizeof(USER_INFO_0
) + (wcslen(ui0
->usri0_name
) + 1) * sizeof(WCHAR
)),
85 "Is allocated with NetApiBufferAllocate\n");
88 rc
= NetUserGetInfo(NULL
, L
"testuser", 10, (BYTE
**)&ui10
);
89 ok(rc
== NERR_Success
, "NetUserGetInfo level 10 failed: 0x%08lx.\n", rc
);
90 ok(!wcscmp(L
"testuser", ui10
->usri10_name
), "Got level 10 name %s.\n", debugstr_w(ui10
->usri10_name
));
91 NetApiBufferSize(ui10
, &dwSize
);
92 ok(dwSize
>= (sizeof(USER_INFO_10
) +
93 (wcslen(ui10
->usri10_name
) + 1 +
94 wcslen(ui10
->usri10_comment
) + 1 +
95 wcslen(ui10
->usri10_usr_comment
) + 1 +
96 wcslen(ui10
->usri10_full_name
) + 1) * sizeof(WCHAR
)),
97 "Is allocated with NetApiBufferAllocate\n");
99 NetApiBufferFree(ui0
);
100 NetApiBufferFree(ui10
);
102 /* NetUserGetInfo should always work for the current user. */
103 rc
= NetUserGetInfo(NULL
, user_name
, 0, (BYTE
**)&ui0
);
104 ok(rc
== NERR_Success
, "NetUsetGetInfo for current user failed: 0x%08lx.\n", rc
);
105 NetApiBufferFree(ui0
);
107 /* errors handling */
108 rc
= NetUserGetInfo(NULL
, L
"testuser", 10000, (BYTE
**)&ui0
);
109 ok(rc
== ERROR_INVALID_LEVEL
,"Invalid Level: rc=%ld\n",rc
);
110 rc
= NetUserGetInfo(NULL
, L
"Nonexistent User", 0, (BYTE
**)&ui0
);
111 ok(rc
== NERR_UserNotFound
,"Invalid User Name: rc=%ld\n",rc
);
113 /* FIXME - Currently Wine can't verify whether the network path is good or bad */
114 rc
= NetUserGetInfo(L
"\\\\Ba path", L
"testuser", 0, (BYTE
**)&ui0
);
115 ok(rc
== ERROR_BAD_NETPATH
||
116 rc
== ERROR_NETWORK_UNREACHABLE
||
117 rc
== RPC_S_SERVER_UNAVAILABLE
||
118 rc
== NERR_WkstaNotStarted
|| /* workstation service not running */
119 rc
== RPC_S_INVALID_NET_ADDR
, /* Some Win7 */
120 "Bad Network Path: rc=%ld\n",rc
);
122 rc
= NetUserGetInfo(L
"", L
"testuser", 0, (BYTE
**)&ui0
);
123 ok(rc
== ERROR_BAD_NETPATH
|| rc
== NERR_Success
,
124 "Bad Network Path: rc=%ld\n",rc
);
125 rc
= NetUserGetInfo(L
"\\", L
"testuser", 0, (BYTE
**)&ui0
);
126 ok(rc
== ERROR_INVALID_NAME
|| rc
== ERROR_INVALID_HANDLE
,"Invalid Server Name: rc=%ld\n",rc
);
127 rc
= NetUserGetInfo(L
"\\\\", L
"testuser", 0, (BYTE
**)&ui0
);
128 ok(rc
== ERROR_INVALID_NAME
|| rc
== ERROR_INVALID_HANDLE
,"Invalid Server Name: rc=%ld\n",rc
);
130 if(delete_test_user() != NERR_Success
)
131 trace("Deleting the test user failed. You might have to manually delete it.\n");
134 /* Checks Level 1 of NetQueryDisplayInformation */
135 static void run_querydisplayinformation1_tests(void)
137 PNET_DISPLAY_USER Buffer
, rec
;
138 DWORD Result
, EntryCount
;
140 BOOL hasAdmin
= FALSE
;
141 BOOL hasGuest
= FALSE
;
145 Result
= NetQueryDisplayInformation(
146 NULL
, 1, i
, 1000, MAX_PREFERRED_LENGTH
, &EntryCount
,
149 ok((Result
== ERROR_SUCCESS
) || (Result
== ERROR_MORE_DATA
),
150 "Information Retrieved\n");
152 for(; EntryCount
> 0; EntryCount
--)
154 if (rec
->usri1_user_id
== DOMAIN_USER_RID_ADMIN
)
156 ok(!hasAdmin
, "One admin user\n");
157 ok(rec
->usri1_flags
& UF_SCRIPT
, "UF_SCRIPT flag is set\n");
158 ok(rec
->usri1_flags
& UF_NORMAL_ACCOUNT
, "UF_NORMAL_ACCOUNT flag is set\n");
161 else if (rec
->usri1_user_id
== DOMAIN_USER_RID_GUEST
)
163 ok(!hasGuest
, "One guest record\n");
164 ok(rec
->usri1_flags
& UF_SCRIPT
, "UF_SCRIPT flag is set\n");
165 ok(rec
->usri1_flags
& UF_NORMAL_ACCOUNT
, "UF_NORMAL_ACCOUNT flag is set\n");
169 i
= rec
->usri1_next_index
;
173 NetApiBufferFree(Buffer
);
174 } while (Result
== ERROR_MORE_DATA
);
176 ok(hasAdmin
, "Doesn't have 'Administrator' account\n");
179 static void run_usermodalsget_tests(void)
182 USER_MODALS_INFO_2
* umi2
= NULL
;
184 rc
= NetUserModalsGet(NULL
, 2, (BYTE
**)&umi2
);
185 ok(rc
== ERROR_SUCCESS
, "NetUserModalsGet failed, rc = %ld\n", rc
);
188 NetApiBufferFree(umi2
);
191 static void run_userhandling_tests(void)
196 usri
.usri1_priv
= USER_PRIV_USER
;
197 usri
.usri1_home_dir
= NULL
;
198 usri
.usri1_comment
= NULL
;
199 usri
.usri1_flags
= UF_SCRIPT
;
200 usri
.usri1_script_path
= NULL
;
202 usri
.usri1_name
= sTooLongName
;
203 usri
.usri1_password
= sTestUserOldPass
;
205 ret
= NetUserAdd(NULL
, 1, (BYTE
*)&usri
, NULL
);
206 if (ret
== ERROR_ACCESS_DENIED
)
208 skip("not enough permissions to add a user\n");
212 ok(ret
== NERR_BadUsername
, "Got %lu.\n", ret
);
214 usri
.usri1_name
= (WCHAR
*)L
"testuser";
215 usri
.usri1_password
= sTooLongPassword
;
217 ret
= NetUserAdd(NULL
, 1, (BYTE
*)&usri
, NULL
);
218 ok(ret
== NERR_PasswordTooShort
|| ret
== ERROR_ACCESS_DENIED
/* Win2003 */,
219 "Adding user with too long password returned 0x%08lx\n", ret
);
221 usri
.usri1_name
= sTooLongName
;
222 usri
.usri1_password
= sTooLongPassword
;
224 ret
= NetUserAdd(NULL
, 1, (BYTE
*)&usri
, NULL
);
225 /* NT4 doesn't have a problem with the username so it will report the too long password
226 * as the error. NERR_PasswordTooShort is reported for all kind of password related errors.
228 ok(ret
== NERR_BadUsername
|| ret
== NERR_PasswordTooShort
,
229 "Adding user with too long username/password returned 0x%08lx\n", ret
);
231 usri
.usri1_name
= (WCHAR
*)L
"testuser";
232 usri
.usri1_password
= sTestUserOldPass
;
234 ret
= NetUserAdd(NULL
, 5, (BYTE
*)&usri
, NULL
);
235 ok(ret
== ERROR_INVALID_LEVEL
, "Adding user with level 5 returned 0x%08lx\n", ret
);
237 ret
= NetUserAdd(NULL
, 1, (BYTE
*)&usri
, NULL
);
238 if(ret
== ERROR_ACCESS_DENIED
)
240 skip("Insufficient permissions to add users. Skipping test.\n");
243 if(ret
== NERR_UserExists
)
245 skip("User already exists, skipping test to not mess up the system\n");
249 ok(!ret
, "Got %lu.\n", ret
);
251 /* On Windows XP (and newer), calling NetUserChangePassword with a NULL
252 * domainname parameter creates a user home directory, iff the machine is
253 * not member of a domain.
254 * Using \\127.0.0.1 as domain name does not work on standalone machines
255 * either, unless the ForceGuest option in the registry is turned off.
256 * So let's not test NetUserChangePassword for now.
259 ret
= NetUserDel(NULL
, L
"testuser");
260 ok(ret
== NERR_Success
, "Deleting the user failed.\n");
262 ret
= NetUserDel(NULL
, L
"testuser");
263 ok(ret
== NERR_UserNotFound
, "Deleting a nonexistent user returned 0x%08lx\n",ret
);
266 static void run_localgroupgetinfo_tests(void)
268 NET_API_STATUS status
;
269 PLOCALGROUP_INFO_1 lgi
= NULL
;
270 PLOCALGROUP_MEMBERS_INFO_3 buffer
= NULL
;
271 DWORD entries_read
= 0, total_entries
=0;
274 status
= NetLocalGroupGetInfo(NULL
, L
"Administrators", 1, (BYTE
**)&lgi
);
275 ok(status
== NERR_Success
|| broken(status
== NERR_GroupNotFound
),
276 "NetLocalGroupGetInfo unexpectedly returned %ld\n", status
);
277 if (status
!= NERR_Success
) return;
279 trace("Local groupname:%s\n", wine_dbgstr_w( lgi
->lgrpi1_name
));
280 trace("Comment: %s\n", wine_dbgstr_w( lgi
->lgrpi1_comment
));
282 NetApiBufferFree(lgi
);
284 status
= NetLocalGroupGetMembers(NULL
, L
"Administrators", 3, (BYTE
**)&buffer
,
285 MAX_PREFERRED_LENGTH
, &entries_read
, &total_entries
, NULL
);
286 ok(status
== NERR_Success
, "NetLocalGroupGetMembers unexpectedly returned %ld\n", status
);
287 ok(entries_read
> 0 && total_entries
> 0, "Amount of entries is unexpectedly 0\n");
289 for(i
=0;i
<entries_read
;i
++)
290 trace("domain and name: %s\n", wine_dbgstr_w(buffer
[i
].lgrmi3_domainandname
));
292 NetApiBufferFree(buffer
);
295 static void test_DavGetHTTPFromUNCPath(void)
301 const WCHAR
*ret_path
;
302 DWORD broken_ret
; /* < Win10 1709 */
307 {L
"", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
308 {L
"c:\\", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
309 {L
"\\\\", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
310 {L
"\\a\\b", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
311 {L
"\\\\a", ERROR_SUCCESS
, L
"http://a"},
312 {L
"\\\\a\\", ERROR_SUCCESS
, L
"http://a"},
313 {L
"\\\\a\\b", ERROR_SUCCESS
, L
"http://a/b"},
314 {L
"\\\\a\\b\\", ERROR_SUCCESS
, L
"http://a/b"},
315 {L
"\\\\a\\b\\c", ERROR_SUCCESS
, L
"http://a/b/c"},
316 {L
"\\\\a@SSL\\b", ERROR_SUCCESS
, L
"https://a/b"},
317 {L
"\\\\a@ssl\\b", ERROR_SUCCESS
, L
"https://a/b"},
318 {L
"\\\\a@tls\\b", ERROR_INVALID_PARAMETER
},
319 {L
"\\\\a@SSL@443\\b", ERROR_SUCCESS
, L
"https://a/b"},
320 {L
"\\\\a@SSL@80\\b", ERROR_SUCCESS
, L
"https://a:80/b"},
321 {L
"\\\\a@80@SSL\\b", ERROR_INVALID_PARAMETER
},
322 {L
"\\\\a@80\\b", ERROR_SUCCESS
, L
"http://a/b"},
323 {L
"\\\\a@8080\\b", ERROR_SUCCESS
, L
"http://a:8080/b"},
324 {L
"\\\\a\\b/", ERROR_SUCCESS
, L
"http://a/b"},
325 {L
"\\\\a/b", ERROR_SUCCESS
, L
"http://a/b"},
326 {L
"\\\\a.\\b", ERROR_SUCCESS
, L
"http://a./b"},
327 {L
"\\\\.a\\b", ERROR_SUCCESS
, L
"http://.a/b"},
328 {L
"//a/b", ERROR_SUCCESS
, L
"http://a/b", ERROR_INVALID_PARAMETER
, TRUE
},
329 {L
"\\\\a\\\\", ERROR_BAD_NET_NAME
, NULL
, ERROR_SUCCESS
, TRUE
},
330 {L
"\\\\\\a\\", ERROR_BAD_NET_NAME
, NULL
, ERROR_SUCCESS
, TRUE
},
331 {L
"\\\\a\\b\\\\", ERROR_BAD_NET_NAME
, NULL
, ERROR_SUCCESS
, TRUE
},
332 {L
"\\\\.\\a", ERROR_BAD_NET_NAME
, NULL
, ERROR_SUCCESS
, TRUE
},
333 {L
"\\\\a\\b:", ERROR_BAD_NET_NAME
, NULL
, ERROR_SUCCESS
, TRUE
},
338 if (!pDavGetHTTPFromUNCPath
)
340 win_skip( "DavGetHTTPFromUNCPath is missing\n" );
344 if (0) /* crashes on Windows */
346 ret
= pDavGetHTTPFromUNCPath(NULL
, NULL
, NULL
);
347 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
350 ret
= pDavGetHTTPFromUNCPath(L
"", buf
, &size
);
351 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
353 ret
= pDavGetHTTPFromUNCPath(L
"\\\\a\\b", buf
, NULL
);
354 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
357 ret
= pDavGetHTTPFromUNCPath(L
"", buf
, NULL
);
358 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
361 ret
= pDavGetHTTPFromUNCPath(L
"", NULL
, &size
);
362 ok(ret
== ERROR_INVALID_PARAMETER
|| ret
== ERROR_BAD_NET_NAME
/* Win10 1709+ */, "got %lu\n", ret
);
365 ret
= pDavGetHTTPFromUNCPath(L
"\\\\a\\b", NULL
, &size
);
366 ok(ret
== ERROR_INSUFFICIENT_BUFFER
, "got %lu\n", ret
);
370 ret
= pDavGetHTTPFromUNCPath(L
"\\\\a\\b", buf
, &size
);
371 ok(ret
== ERROR_INSUFFICIENT_BUFFER
, "got %lu\n", ret
);
372 ok(size
== 11, "got %lu\n", size
);
374 for (i
= 0; i
< ARRAY_SIZE(tests
); i
++)
377 size
= ARRAY_SIZE(buf
);
378 ret
= pDavGetHTTPFromUNCPath( tests
[i
].path
, buf
, &size
);
379 todo_wine_if (tests
[i
].todo
)
380 ok(ret
== tests
[i
].ret
|| broken(ret
== tests
[i
].broken_ret
),
381 "%lu: expected %lu got %lu\n", i
, tests
[i
].ret
, ret
);
384 if (tests
[i
].ret_path
)
385 ok(!wcscmp(buf
, tests
[i
].ret_path
), "%lu: expected %s got %s\n",
386 i
, wine_dbgstr_w(tests
[i
].ret_path
), wine_dbgstr_w(buf
));
387 ok(size
== wcslen(buf
) + 1, "%lu: got %lu\n", i
, size
);
390 ok(size
== ARRAY_SIZE(buf
), "%lu: wrong size %lu\n", i
, size
);
395 static void test_DavGetUNCFromHTTPPath(void)
401 const WCHAR
*ret_path
;
402 DWORD broken_ret
; /* < Win10 1709 */
407 {L
"", ERROR_INVALID_PARAMETER
},
408 {L
"http://server/path", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot\\path"},
409 {L
"https://host/path", ERROR_SUCCESS
, L
"\\\\host@SSL\\DavWWWRoot\\path"},
410 {L
"\\\\server", ERROR_INVALID_PARAMETER
},
411 {L
"\\\\server\\path", ERROR_INVALID_PARAMETER
},
412 {L
"\\\\http://server/path", ERROR_INVALID_PARAMETER
},
413 {L
"http://", ERROR_BAD_NETPATH
, NULL
, ERROR_BAD_NET_NAME
, TRUE
},
414 {L
"http:", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
415 {L
"http", ERROR_INVALID_PARAMETER
},
416 {L
"http:server", ERROR_BAD_NET_NAME
, NULL
, ERROR_INVALID_PARAMETER
, TRUE
},
417 {L
"http://server:80", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot"},
418 {L
"http://server:81", ERROR_SUCCESS
, L
"\\\\server@81\\DavWWWRoot"},
419 {L
"https://server:80", ERROR_SUCCESS
, L
"\\\\server@SSL@80\\DavWWWRoot"},
420 {L
"HTTP://server/path", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot\\path"},
421 {L
"http://server:65537", ERROR_BAD_NETPATH
, NULL
, ERROR_SUCCESS
, TRUE
},
422 {L
"http://server/path/", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot\\path"},
423 {L
"http://server/path//", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot\\path", ERROR_BAD_NET_NAME
, TRUE
},
424 {L
"http://server:/path", ERROR_BAD_NETPATH
, NULL
, ERROR_SUCCESS
, TRUE
},
425 {L
"http://server", ERROR_SUCCESS
, L
"\\\\server\\DavWWWRoot"},
426 {L
"https://server:443", ERROR_SUCCESS
, L
"\\\\server@SSL\\DavWWWRoot"},
431 if (!pDavGetUNCFromHTTPPath
)
433 win_skip( "DavGetUNCFromHTTPPath is missing\n" );
437 if (0) /* crashes on Windows */
439 ret
= pDavGetUNCFromHTTPPath(NULL
, NULL
, NULL
);
440 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
442 ret
= pDavGetUNCFromHTTPPath(L
"http://server/path", buf
, NULL
);
443 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
446 ret
= pDavGetUNCFromHTTPPath(L
"", buf
, NULL
);
447 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
450 ret
= pDavGetUNCFromHTTPPath(L
"", NULL
, &size
);
451 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
455 ret
= pDavGetUNCFromHTTPPath(L
"", buf
, &size
);
456 ok(ret
== ERROR_INVALID_PARAMETER
, "got %lu\n", ret
);
459 ret
= pDavGetUNCFromHTTPPath(L
"http://server/path", NULL
, &size
);
460 ok( ret
== ERROR_INSUFFICIENT_BUFFER
, "got %lu\n", ret
);
464 ret
= pDavGetUNCFromHTTPPath(L
"http://server/path", buf
, &size
);
465 ok(ret
== ERROR_INSUFFICIENT_BUFFER
, "got %lu\n", ret
);
466 ok(size
== 25, "got %lu\n", size
);
468 for (i
= 0; i
< ARRAY_SIZE(tests
); i
++)
471 size
= ARRAY_SIZE(buf
);
472 ret
= pDavGetUNCFromHTTPPath( tests
[i
].path
, buf
, &size
);
473 todo_wine_if (tests
[i
].todo
)
474 ok(ret
== tests
[i
].ret
|| broken(ret
== tests
[i
].broken_ret
),
475 "%lu: expected %lu got %lu\n", i
, tests
[i
].ret
, ret
);
478 if (tests
[i
].ret_path
)
479 ok(!wcscmp(buf
, tests
[i
].ret_path
), "%lu: expected %s got %s\n",
480 i
, wine_dbgstr_w(tests
[i
].ret_path
), wine_dbgstr_w(buf
));
481 ok(size
== wcslen(buf
) + 1, "%lu: got %lu\n", i
, size
);
484 ok(size
== ARRAY_SIZE(buf
), "%lu: wrong size %lu\n", i
, size
);
490 HMODULE hnetapi32
= GetModuleHandleA("netapi32.dll");
494 pDavGetHTTPFromUNCPath
= (void*)GetProcAddress(hnetapi32
, "DavGetHTTPFromUNCPath");
495 pDavGetUNCFromHTTPPath
= (void*)GetProcAddress(hnetapi32
, "DavGetUNCFromHTTPPath");
497 size
= ARRAY_SIZE(user_name
);
498 ret
= GetUserNameW(user_name
, &size
);
499 ok(ret
, "Failed to get user name, error %lu.\n", GetLastError());
500 size
= ARRAY_SIZE(computer_name
);
501 ret
= GetComputerNameW(computer_name
, &size
);
502 ok(ret
, "Failed to get computer name, error %lu.\n", GetLastError());
504 run_userhandling_tests();
505 run_usergetinfo_tests();
506 run_querydisplayinformation1_tests();
507 run_usermodalsget_tests();
508 run_localgroupgetinfo_tests();
510 test_DavGetHTTPFromUNCPath();
511 test_DavGetUNCFromHTTPPath();