Commit f2e5b807 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Use the Get/SetComputerName functions from kernelbase.

parent 7822b854
......@@ -576,7 +576,7 @@
@ stdcall -import GetCompressedFileSizeW(long ptr)
@ stdcall GetComputerNameA(ptr ptr)
@ stdcall GetComputerNameExA(long ptr ptr)
@ stdcall GetComputerNameExW(long ptr ptr)
@ stdcall -import GetComputerNameExW(long ptr ptr)
@ stdcall GetComputerNameW(ptr ptr)
@ stub GetConsoleAliasA
@ stub GetConsoleAliasExesA
......@@ -1338,10 +1338,10 @@
@ stdcall -import SetCommMask(long long)
@ stdcall -import SetCommState(long ptr)
@ stdcall -import SetCommTimeouts(long ptr)
@ stdcall SetComputerNameA(str)
@ stdcall SetComputerNameExA(long str)
@ stdcall SetComputerNameExW(long wstr)
@ stdcall SetComputerNameW(wstr)
@ stdcall -import SetComputerNameA(str)
@ stdcall -import SetComputerNameExA(long str)
@ stdcall -import SetComputerNameExW(long wstr)
@ stdcall -import SetComputerNameW(wstr)
@ stdcall -import SetConsoleActiveScreenBuffer(long)
@ stdcall -import SetConsoleCP(long)
# @ stub SetConsoleHistoryInfo
......
......@@ -489,6 +489,12 @@ static void test_GetComputerNameExA(void)
ok(ret == 0, "Expected 0, got %d\n", ret);
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
size = 0;
ret = pGetComputerNameExA(ComputerNameNetBIOS, NULL, &size);
error = GetLastError();
ok(ret == 0, "Expected 0, got %d\n", ret);
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
/* size is not set in win2k */
if (size == 0)
size = MAX_COMP_NAME;
......@@ -552,6 +558,11 @@ static void test_GetComputerNameExW(void)
ret = pGetComputerNameExW(ComputerNameNetBIOS, nameW, &size);
ok(ret, "GetComputerNameExW(ComputerNameNetBIOS) failed with error %d\n", GetLastError());
HeapFree(GetProcessHeap(), 0, nameW);
size = 0;
ret = pGetComputerNameExW(ComputerNameNetBIOS, NULL, &size);
error = GetLastError();
ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error);
}
static void test_GetEnvironmentStringsW(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment