Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c090bdbe
Commit
c090bdbe
authored
Nov 15, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldp: Improve the WldpGetLockdownPolicy() stub.
parent
59485f00
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
2 deletions
+100
-2
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/wldp/tests/Makefile.in
+4
-0
wldp.c
dlls/wldp/tests/wldp.c
+82
-0
wldp.c
dlls/wldp/wldp.c
+3
-2
wldp.h
include/wldp.h
+9
-0
No files found.
configure
View file @
c090bdbe
...
...
@@ -22205,6 +22205,7 @@ wine_fn_config_makefile dlls/wlanui enable_wlanui
wine_fn_config_makefile dlls/wldap32 enable_wldap32
wine_fn_config_makefile dlls/wldap32/tests enable_tests
wine_fn_config_makefile dlls/wldp enable_wldp
wine_fn_config_makefile dlls/wldp/tests enable_tests
wine_fn_config_makefile dlls/wmasf enable_wmasf
wine_fn_config_makefile dlls/wmi enable_wmi
wine_fn_config_makefile dlls/wmiutils enable_wmiutils
...
...
configure.ac
View file @
c090bdbe
...
...
@@ -3247,6 +3247,7 @@ WINE_CONFIG_MAKEFILE(dlls/wlanui)
WINE_CONFIG_MAKEFILE(dlls/wldap32)
WINE_CONFIG_MAKEFILE(dlls/wldap32/tests)
WINE_CONFIG_MAKEFILE(dlls/wldp)
WINE_CONFIG_MAKEFILE(dlls/wldp/tests)
WINE_CONFIG_MAKEFILE(dlls/wmasf)
WINE_CONFIG_MAKEFILE(dlls/wmi)
WINE_CONFIG_MAKEFILE(dlls/wmiutils)
...
...
dlls/wldp/tests/Makefile.in
0 → 100644
View file @
c090bdbe
TESTDLL
=
wldp.dll
SOURCES
=
\
wldp.c
dlls/wldp/tests/wldp.c
0 → 100644
View file @
c090bdbe
/*
* Copyright 2023 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wldp.h"
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
pWldpGetLockdownPolicy
)(
WLDP_HOST_INFORMATION
*
,
DWORD
*
,
DWORD
);
static
HRESULT
(
WINAPI
*
pWldpQueryWindowsLockdownMode
)(
WLDP_WINDOWS_LOCKDOWN_MODE
*
);
static
void
test_WldpGetLockdownPolicy
(
void
)
{
WLDP_HOST_INFORMATION
info
;
DWORD
state
;
HRESULT
hr
;
if
(
!
pWldpGetLockdownPolicy
)
{
win_skip
(
"WldpGetLockdownPolicy not available
\n
"
);
return
;
}
state
=
0xdeadbeef
;
hr
=
pWldpGetLockdownPolicy
(
NULL
,
&
state
,
0
);
ok
(
hr
==
0x10000000
,
"got %#lx
\n
"
,
hr
);
ok
(
state
==
WLDP_LOCKDOWN_DEFINED_FLAG
,
"got %#lx
\n
"
,
state
);
memset
(
&
info
,
0
,
sizeof
(
info
)
);
info
.
dwRevision
=
1
;
info
.
dwHostId
=
WLDP_HOST_ID_GLOBAL
;
state
=
0xdeadbeef
;
hr
=
pWldpGetLockdownPolicy
(
&
info
,
&
state
,
0
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
state
==
WLDP_LOCKDOWN_DEFINED_FLAG
,
"got %#lx
\n
"
,
state
);
}
static
void
test_WldpQueryWindowsLockdownMode
(
void
)
{
WLDP_WINDOWS_LOCKDOWN_MODE
mode
;
HRESULT
hr
;
if
(
!
pWldpQueryWindowsLockdownMode
)
{
win_skip
(
"WldpQueryWindowsLockdownMode not available
\n
"
);
return
;
}
mode
=
0xdeadbeef
;
hr
=
pWldpQueryWindowsLockdownMode
(
&
mode
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
mode
==
WLDP_WINDOWS_LOCKDOWN_MODE_UNLOCKED
,
"got %u
\n
"
,
mode
);
}
START_TEST
(
wldp
)
{
HMODULE
hwldp
=
LoadLibraryW
(
L"wldp"
);
pWldpGetLockdownPolicy
=
(
void
*
)
GetProcAddress
(
hwldp
,
"WldpGetLockdownPolicy"
);
pWldpQueryWindowsLockdownMode
=
(
void
*
)
GetProcAddress
(
hwldp
,
"WldpQueryWindowsLockdownMode"
);
test_WldpGetLockdownPolicy
();
test_WldpQueryWindowsLockdownMode
();
}
dlls/wldp/wldp.c
View file @
c090bdbe
...
...
@@ -44,9 +44,10 @@ HRESULT WINAPI WldpIsDynamicCodePolicyEnabled(BOOL *is_enabled)
*/
HRESULT
WINAPI
WldpGetLockdownPolicy
(
WLDP_HOST_INFORMATION
*
info
,
DWORD
*
state
,
DWORD
flags
)
{
FIXME
(
"%p %p %l
u
\n
"
,
info
,
state
,
flags
);
FIXME
(
"%p %p %l
x
\n
"
,
info
,
state
,
flags
);
*
state
=
0
;
*
state
=
WLDP_LOCKDOWN_DEFINED_FLAG
;
if
(
!
info
)
return
HRESULT_FROM_NT
(
0
);
return
S_OK
;
}
...
...
include/wldp.h
View file @
c090bdbe
...
...
@@ -19,6 +19,14 @@
#ifndef WLDP_H
#define WLDP_H
#define WLDP_LOCKDOWN_UNDEFINED 0x00000000
#define WLDP_LOCKDOWN_DEFINED_FLAG 0x80000000
#define WLDP_LOCKDOWN_CONFIG_CI_FLAG 0x00000001
#define WLDP_LOCKDOWN_CONFIG_CI_AUDIT_FLAG 0x00000002
#define WLDP_LOCKDOWN_UMCIENFORCE_FLAG 0x00000004
#define WLDP_LOCKDOWN_AUDIT_FLAG 0x00000008
#define WLDP_LOCKDOWN_EXCLUSION_FLAG 0x00000010
typedef
enum
WLDP_HOST_ID
{
WLDP_HOST_ID_UNKNOWN
,
...
...
@@ -50,5 +58,6 @@ typedef struct WLDP_HOST_INFORMATION
HRESULT
WINAPI
WldpGetLockdownPolicy
(
WLDP_HOST_INFORMATION
*
,
DWORD
*
,
DWORD
);
HRESULT
WINAPI
WldpIsDynamicCodePolicyEnabled
(
BOOL
*
);
HRESULT
WINAPI
WldpQueryWindowsLockdownMode
(
WLDP_WINDOWS_LOCKDOWN_MODE
*
);
#endif
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