mpr: Return correct error code for non network paths and REMOTE_NAME_INFO_LEVEL in WNetGetUniversalName.
Signed-off-by: Michael Müller <michael@fds-team.de> Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a35d4c77ca
commit
31e5b4e5ee
|
@ -101,25 +101,23 @@ static void test_WNetGetRemoteName(void)
|
||||||
info_size = sizeof(buffer);
|
info_size = sizeof(buffer);
|
||||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||||
buffer, &info_size);
|
buffer, &info_size);
|
||||||
todo_wine{
|
|
||||||
if(drive_type == DRIVE_REMOTE)
|
if(drive_type == DRIVE_REMOTE)
|
||||||
|
todo_wine
|
||||||
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret);
|
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||||
else
|
else
|
||||||
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
||||||
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||||
}
|
|
||||||
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
|
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
|
||||||
|
|
||||||
fail_size = 0;
|
fail_size = 0;
|
||||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||||
buffer, &fail_size);
|
buffer, &fail_size);
|
||||||
todo_wine{
|
|
||||||
if(drive_type == DRIVE_REMOTE)
|
if(drive_type == DRIVE_REMOTE)
|
||||||
|
todo_wine
|
||||||
ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
|
ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||||
else
|
else
|
||||||
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
||||||
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||||
}
|
|
||||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||||
buffer, NULL);
|
buffer, NULL);
|
||||||
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
|
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||||
|
@ -127,13 +125,12 @@ static void test_WNetGetRemoteName(void)
|
||||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||||
NULL, &info_size);
|
NULL, &info_size);
|
||||||
|
|
||||||
todo_wine {
|
|
||||||
if(drive_type == DRIVE_REMOTE)
|
if(drive_type == DRIVE_REMOTE)
|
||||||
|
todo_wine
|
||||||
ok(ret == WN_BAD_POINTER || ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
|
ok(ret == WN_BAD_POINTER || ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||||
else
|
else
|
||||||
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
|
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
|
||||||
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||||
}
|
|
||||||
|
|
||||||
fail_size = sizeof(driveA) / sizeof(char) - 1;
|
fail_size = sizeof(driveA) / sizeof(char) - 1;
|
||||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||||
|
|
|
@ -2348,7 +2348,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case REMOTE_NAME_INFO_LEVEL:
|
case REMOTE_NAME_INFO_LEVEL:
|
||||||
err = WN_NO_NETWORK;
|
err = WN_NOT_CONNECTED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue