Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
73100788
Commit
73100788
authored
Dec 22, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slc: Implement SLGetWindowsInformationDWORD.
parent
2daca626
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
slc.c
dlls/slc/slc.c
+22
-2
slc.c
dlls/slc/tests/slc.c
+0
-6
No files found.
dlls/slc/slc.c
View file @
73100788
...
...
@@ -19,8 +19,11 @@
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/debug.h"
#include "slpublic.h"
...
...
@@ -37,9 +40,26 @@ HRESULT WINAPI SLGetWindowsInformation(LPCWSTR name, SLDATATYPE *type, UINT *val
HRESULT
WINAPI
SLGetWindowsInformationDWORD
(
LPCWSTR
lpszValueName
,
LPDWORD
pdwValue
)
{
FIXME
(
"(%s) stub
\n
"
,
debugstr_w
(
lpszValueName
)
);
UNICODE_STRING
nameW
;
NTSTATUS
status
;
ULONG
type
,
len
;
return
SL_E_RIGHT_NOT_GRANTED
;
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
lpszValueName
)
);
if
(
!
lpszValueName
||
!
pdwValue
)
return
E_INVALIDARG
;
if
(
!
lpszValueName
[
0
])
return
SL_E_RIGHT_NOT_GRANTED
;
RtlInitUnicodeString
(
&
nameW
,
lpszValueName
);
status
=
NtQueryLicenseValue
(
&
nameW
,
&
type
,
pdwValue
,
sizeof
(
DWORD
),
&
len
);
if
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
)
return
SL_E_VALUE_NOT_FOUND
;
if
((
!
status
||
status
==
STATUS_BUFFER_TOO_SMALL
)
&&
(
type
!=
REG_DWORD
))
return
SL_E_DATATYPE_MISMATCHED
;
return
status
?
E_FAIL
:
S_OK
;
}
/***********************************************************************
...
...
dlls/slc/tests/slc.c
View file @
73100788
...
...
@@ -40,16 +40,13 @@ static void test_SLGetWindowsInformationDWORD(void)
HRESULT
res
;
res
=
SLGetWindowsInformationDWORD
(
NonexistentLicenseValueW
,
NULL
);
todo_wine
ok
(
res
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
res
);
res
=
SLGetWindowsInformationDWORD
(
NULL
,
&
value
);
todo_wine
ok
(
res
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %08x
\n
"
,
res
);
value
=
0xdeadbeef
;
res
=
SLGetWindowsInformationDWORD
(
NonexistentLicenseValueW
,
&
value
);
todo_wine
ok
(
res
==
SL_E_VALUE_NOT_FOUND
,
"expected SL_E_VALUE_NOT_FOUND, got %08x
\n
"
,
res
);
ok
(
value
==
0xdeadbeef
,
"expected value = 0xdeadbeef, got %u
\n
"
,
value
);
...
...
@@ -61,15 +58,12 @@ static void test_SLGetWindowsInformationDWORD(void)
value
=
0xdeadbeef
;
res
=
SLGetWindowsInformationDWORD
(
KernelMUILanguageAllowedW
,
&
value
);
todo_wine
ok
(
res
==
SL_E_DATATYPE_MISMATCHED
,
"expected SL_E_DATATYPE_MISMATCHED, got %08x
\n
"
,
res
);
ok
(
value
==
0xdeadbeef
,
"expected value = 0xdeadbeef, got %u
\n
"
,
value
);
value
=
0xdeadbeef
;
res
=
SLGetWindowsInformationDWORD
(
KernelMUINumberAllowedW
,
&
value
);
todo_wine
ok
(
res
==
S_OK
,
"expected S_OK, got %u
\n
"
,
res
);
todo_wine
ok
(
value
!=
0xdeadbeef
,
"expected value != 0xdeadbeef
\n
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment