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
14b9a5af
Commit
14b9a5af
authored
Mar 23, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlQueryActivationContextApplicationSettings.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fc144429
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
actctx.c
dlls/ntdll/actctx.c
+53
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/ntdll/actctx.c
View file @
14b9a5af
...
...
@@ -4891,6 +4891,24 @@ static NTSTATUS find_guid(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
return
STATUS_SUCCESS
;
}
static
const
WCHAR
*
find_app_settings
(
ACTIVATION_CONTEXT
*
actctx
,
const
WCHAR
*
settings
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
;
i
<
actctx
->
num_assemblies
;
i
++
)
{
struct
assembly
*
assembly
=
&
actctx
->
assemblies
[
i
];
for
(
j
=
0
;
j
<
assembly
->
entities
.
num
;
j
++
)
{
struct
entity
*
entity
=
&
assembly
->
entities
.
base
[
j
];
if
(
entity
->
kind
==
ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS
&&
!
strcmpW
(
entity
->
u
.
settings
.
name
,
settings
))
return
entity
->
u
.
settings
.
value
;
}
}
return
NULL
;
}
/* initialize the activation context for the current process */
void
actctx_init
(
void
)
{
...
...
@@ -5524,3 +5542,38 @@ NTSTATUS WINAPI RtlFindActivationContextSectionGuid( ULONG flags, const GUID *ex
return
status
;
}
/***********************************************************************
* RtlQueryActivationContextApplicationSettings (NTDLL.@)
*/
NTSTATUS
WINAPI
RtlQueryActivationContextApplicationSettings
(
DWORD
flags
,
HANDLE
handle
,
const
WCHAR
*
ns
,
const
WCHAR
*
settings
,
WCHAR
*
buffer
,
SIZE_T
size
,
SIZE_T
*
written
)
{
static
const
WCHAR
namespaceW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
's'
,
'c'
,
'h'
,
'e'
,
'm'
,
'a'
,
's'
,
'.'
,
'm'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'.'
,
'c'
,
'o'
,
'm'
,
'/'
,
'S'
,
'M'
,
'I'
,
'/'
,
'2'
,
'0'
,
0
};
ACTIVATION_CONTEXT
*
actctx
=
check_actctx
(
handle
);
const
WCHAR
*
res
;
if
(
flags
)
{
WARN
(
"unknown flags %08x
\n
"
,
flags
);
return
STATUS_INVALID_PARAMETER
;
}
if
(
ns
&&
strncmpW
(
ns
,
namespaceW
,
strlenW
(
namespaceW
)
))
{
WARN
(
"unknown namespace %s
\n
"
,
debugstr_w
(
ns
)
);
return
STATUS_INVALID_PARAMETER
;
}
if
(
!
handle
)
handle
=
process_actctx
;
if
(
!
(
actctx
=
check_actctx
(
handle
)))
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
res
=
find_app_settings
(
actctx
,
settings
)))
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
written
)
*
written
=
strlenW
(
res
)
+
1
;
if
(
size
<
strlenW
(
res
))
return
STATUS_BUFFER_TOO_SMALL
;
strcpyW
(
buffer
,
res
);
return
STATUS_SUCCESS
;
}
dlls/ntdll/ntdll.spec
View file @
14b9a5af
...
...
@@ -803,6 +803,7 @@
@ stub RtlPropertySetNameToGuid
@ stub RtlProtectHeap
@ stdcall RtlPushFrame(ptr)
@ stdcall RtlQueryActivationContextApplicationSettings(long ptr wstr wstr ptr long ptr)
@ stdcall RtlQueryAtomInAtomTable(ptr long ptr ptr ptr ptr)
@ stdcall RtlQueryDepthSList(ptr)
@ stdcall RtlQueryDynamicTimeZoneInformation(ptr)
...
...
include/winternl.h
View file @
14b9a5af
...
...
@@ -2694,6 +2694,7 @@ NTSYSAPI void WINAPI RtlPopFrame(TEB_ACTIVE_FRAME*);
NTSYSAPI
BOOLEAN
WINAPI
RtlPrefixString
(
const
STRING
*
,
const
STRING
*
,
BOOLEAN
);
NTSYSAPI
BOOLEAN
WINAPI
RtlPrefixUnicodeString
(
const
UNICODE_STRING
*
,
const
UNICODE_STRING
*
,
BOOLEAN
);
NTSYSAPI
void
WINAPI
RtlPushFrame
(
TEB_ACTIVE_FRAME
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryActivationContextApplicationSettings
(
DWORD
,
HANDLE
,
const
WCHAR
*
,
const
WCHAR
*
,
WCHAR
*
,
SIZE_T
,
SIZE_T
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryAtomInAtomTable
(
RTL_ATOM_TABLE
,
RTL_ATOM
,
ULONG
*
,
ULONG
*
,
WCHAR
*
,
ULONG
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryDynamicTimeZoneInformation
(
RTL_DYNAMIC_TIME_ZONE_INFORMATION
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlQueryEnvironmentVariable_U
(
PWSTR
,
PUNICODE_STRING
,
PUNICODE_STRING
);
...
...
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