[6/6]user32/tests: Test for OpenInputDesktop
shanmukha sainath addepalli
sainath.addepalli at gmail.com
Sat Dec 12 05:06:29 CST 2009
Hi,
The test for OpenInputDesktop has not submitted earlier. This
test Opens a desktop with specified access rights using
OpenInputDesktop API.
--
Regards
Sainath A
-------------- next part --------------
From 7b02b55bff0a8856aaa0b99906a1a7917862a002 Mon Sep 17 00:00:00 2001
From: Sainath Addepalli <sainath.addepalli at gmail.com>
Date: Fri, 11 Dec 2009 19:34:35 +0530
Subject: Test for OpenInputDesktop
---
dlls/user32/tests/winstation.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c
index 596e9ff..3d44a7f 100644
--- a/dlls/user32/tests/winstation.c
+++ b/dlls/user32/tests/winstation.c
@@ -354,6 +354,24 @@ static void test_enumdesktops(void)
ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError());
}
+static void test_inputdesktop(void)
+{
+ HDESK ret, d1;
+
+ d1 = GetThreadDesktop(GetCurrentThreadId());
+ ok(d1 != 0, "Getting thread desktop failed\n");
+
+ SetLastError( 0xdeadbeef );
+ ret = OpenInputDesktop( 0, FALSE, DESKTOP_ALL_ACCESS );
+ trace( "opened input desktop %p\n", ret );
+ ok(ret !=0, "OpenInputDesktop failed\n");
+ ok( GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError());
+
+ ok( CloseDesktop( ret ), "Closing input desktop failed\n");
+ CloseDesktop( d1 );
+}
+
+
START_TEST(winstation)
{
/* Check whether this platform supports WindowStation calls */
@@ -368,5 +386,6 @@ START_TEST(winstation)
test_enumstations();
test_enumdesktops();
+ test_inputdesktop();
test_handles();
}
--
1.6.0.4
More information about the wine-patches
mailing list