From 38a541186a6dd8e6a5721526416cdca0ffd7546e Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 6 Mar 2008 15:01:48 +0000 Subject: [PATCH] user32: Add test for calling CreateDesktop on already created desktop name. --- dlls/user32/tests/winstation.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index ac49d4a584b..16a1c93f4f7 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -220,6 +220,12 @@ static void test_handles(void) ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + d3 = CreateDesktop( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); + ok( d3 != 0, "create foobar desktop again failed\n" ); + ok( GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError() ); + ok( CloseDesktop( d3 ), "CloseDesktop failed\n" ); + d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS ); ok( d3 != 0, "open foobar desktop failed\n" ); ok( d3 != d2, "open foobar desktop returned same handle\n" ); -- 2.11.4.GIT