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
cb2fb8c2
Commit
cb2fb8c2
authored
Feb 22, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement ApiSetQueryApiSetPresence/Ex().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b233f30
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
15 deletions
+48
-15
module.c
dlls/kernel32/tests/module.c
+0
-3
loader.c
dlls/ntdll/loader.c
+45
-0
misc.c
dlls/ntdll/misc.c
+0
-12
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
winternl.h
include/winternl.h
+2
-0
No files found.
dlls/kernel32/tests/module.c
View file @
cb2fb8c2
...
...
@@ -1468,7 +1468,6 @@ static void test_apisets(void)
win_skip
(
"ApiSetQueryApiSetPresence not implemented
\n
"
);
return
;
}
todo_wine
if
(
!
pApiSetQueryApiSetPresenceEx
)
win_skip
(
"ApiSetQueryApiSetPresenceEx not implemented
\n
"
);
todo_wine
if
(
!
pIsApiSetImplemented
)
win_skip
(
"IsApiSetImplemented not implemented
\n
"
);
...
...
@@ -1480,9 +1479,7 @@ static void test_apisets(void)
winetest_push_context
(
"%u:%s"
,
i
,
tests
[
i
].
name
);
present
=
0xff
;
status
=
pApiSetQueryApiSetPresence
(
&
name
,
&
present
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"wrong ret %x
\n
"
,
status
);
todo_wine_if
(
!
tests
[
i
].
present
)
ok
(
present
==
tests
[
i
].
present
||
broken
(
!
present
&&
tests
[
i
].
broken
)
/* win8 */
,
"wrong present %u
\n
"
,
present
);
if
(
pApiSetQueryApiSetPresenceEx
)
...
...
dlls/ntdll/loader.c
View file @
cb2fb8c2
...
...
@@ -4526,6 +4526,51 @@ void WINAPI RtlReleasePath( PWSTR path )
}
/*********************************************************************
* ApiSetQueryApiSetPresence (NTDLL.@)
*/
NTSTATUS
WINAPI
ApiSetQueryApiSetPresence
(
const
UNICODE_STRING
*
name
,
BOOLEAN
*
present
)
{
const
API_SET_NAMESPACE
*
map
=
NtCurrentTeb
()
->
Peb
->
ApiSetMap
;
const
API_SET_NAMESPACE_ENTRY
*
entry
;
UNICODE_STRING
str
;
*
present
=
(
!
get_apiset_entry
(
map
,
name
->
Buffer
,
name
->
Length
/
sizeof
(
WCHAR
),
&
entry
)
&&
!
get_apiset_target
(
map
,
entry
,
NULL
,
&
str
));
return
STATUS_SUCCESS
;
}
/*********************************************************************
* ApiSetQueryApiSetPresenceEx (NTDLL.@)
*/
NTSTATUS
WINAPI
ApiSetQueryApiSetPresenceEx
(
const
UNICODE_STRING
*
name
,
BOOLEAN
*
in_schema
,
BOOLEAN
*
present
)
{
const
API_SET_NAMESPACE
*
map
=
NtCurrentTeb
()
->
Peb
->
ApiSetMap
;
const
API_SET_NAMESPACE_ENTRY
*
entry
;
NTSTATUS
status
;
UNICODE_STRING
str
;
ULONG
i
,
len
=
name
->
Length
/
sizeof
(
WCHAR
);
/* extension not allowed */
for
(
i
=
0
;
i
<
len
;
i
++
)
if
(
name
->
Buffer
[
i
]
==
'.'
)
return
STATUS_INVALID_PARAMETER
;
status
=
get_apiset_entry
(
map
,
name
->
Buffer
,
len
,
&
entry
);
if
(
status
==
STATUS_APISET_NOT_PRESENT
)
{
*
in_schema
=
*
present
=
FALSE
;
return
STATUS_SUCCESS
;
}
if
(
status
)
return
status
;
/* the name must match exactly */
*
in_schema
=
(
entry
->
NameLength
==
name
->
Length
&&
!
wcsnicmp
(
(
WCHAR
*
)((
char
*
)
map
+
entry
->
NameOffset
),
name
->
Buffer
,
len
));
*
present
=
*
in_schema
&&
!
get_apiset_target
(
map
,
entry
,
NULL
,
&
str
);
return
STATUS_SUCCESS
;
}
/******************************************************************
* DllMain (NTDLL.@)
*/
...
...
dlls/ntdll/misc.c
View file @
cb2fb8c2
...
...
@@ -381,15 +381,3 @@ ULONG WINAPIV EtwTraceMessage( TRACEHANDLE handle, ULONG flags, LPGUID guid, /*U
va_end
(
valist
);
return
ret
;
}
/*********************************************************************
* ApiSetQueryApiSetPresence (NTDLL.@)
*/
BOOL
WINAPI
ApiSetQueryApiSetPresence
(
const
UNICODE_STRING
*
namespace
,
BOOLEAN
*
present
)
{
FIXME
(
"(%s, %p) stub!
\n
"
,
debugstr_us
(
namespace
),
present
);
if
(
present
)
*
present
=
TRUE
;
return
TRUE
;
}
dlls/ntdll/ntdll.spec
View file @
cb2fb8c2
...
...
@@ -7,6 +7,7 @@
@ stdcall A_SHAInit(ptr)
@ stdcall A_SHAUpdate(ptr ptr long)
@ stdcall ApiSetQueryApiSetPresence(ptr ptr)
@ stdcall ApiSetQueryApiSetPresenceEx(ptr ptr ptr)
@ stub CsrAllocateCaptureBuffer
@ stub CsrAllocateCapturePointer
@ stub CsrAllocateMessagePointer
...
...
include/winternl.h
View file @
cb2fb8c2
...
...
@@ -3866,6 +3866,8 @@ typedef struct _API_SET_VALUE_ENTRY
* Function declarations
*/
NTSYSAPI
NTSTATUS
WINAPI
ApiSetQueryApiSetPresence
(
const
UNICODE_STRING
*
,
BOOLEAN
*
);
NTSYSAPI
NTSTATUS
WINAPI
ApiSetQueryApiSetPresenceEx
(
const
UNICODE_STRING
*
,
BOOLEAN
*
,
BOOLEAN
*
);
NTSYSAPI
void
WINAPI
DbgBreakPoint
(
void
);
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrint
(
LPCSTR
fmt
,
...);
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrintEx
(
ULONG
iComponentId
,
ULONG
Level
,
LPCSTR
fmt
,
...);
...
...
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