2 * Copyright 2014 Sebastian Lackner
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include <wine/test.h>
30 static void test_SLGetWindowsInformationDWORD(void)
35 res
= SLGetWindowsInformationDWORD(L
"Nonexistent-License-Value", NULL
);
36 ok(res
== E_INVALIDARG
, "expected E_INVALIDARG, got %08x\n", res
);
38 res
= SLGetWindowsInformationDWORD(NULL
, &value
);
39 ok(res
== E_INVALIDARG
, "expected E_INVALIDARG, got %08x\n", res
);
42 res
= SLGetWindowsInformationDWORD(L
"Nonexistent-License-Value", &value
);
43 ok(res
== SL_E_VALUE_NOT_FOUND
, "expected SL_E_VALUE_NOT_FOUND, got %08x\n", res
);
44 ok(value
== 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value
);
47 res
= SLGetWindowsInformationDWORD(L
"", &value
);
48 ok(res
== SL_E_RIGHT_NOT_GRANTED
|| broken(res
== 0xd000000d) /* Win 8 */,
49 "expected SL_E_RIGHT_NOT_GRANTED, got %08x\n", res
);
50 ok(value
== 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value
);
53 res
= SLGetWindowsInformationDWORD(L
"Kernel-MUI-Language-Allowed", &value
);
54 ok(res
== SL_E_DATATYPE_MISMATCHED
, "expected SL_E_DATATYPE_MISMATCHED, got %08x\n", res
);
55 ok(value
== 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value
);
58 res
= SLGetWindowsInformationDWORD(L
"Kernel-MUI-Number-Allowed", &value
);
59 ok(res
== S_OK
, "expected S_OK, got %u\n", res
);
60 ok(value
!= 0xdeadbeef, "expected value != 0xdeadbeef\n");
66 test_SLGetWindowsInformationDWORD();