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
cd4fcf9a
Commit
cd4fcf9a
authored
Mar 21, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a helper function to map a section.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8cdb593f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
env.c
dlls/ntdll/unix/env.c
+3
-4
loader.c
dlls/ntdll/unix/loader.c
+1
-5
unix_private.h
dlls/ntdll/unix/unix_private.h
+8
-0
No files found.
dlls/ntdll/unix/env.c
View file @
cd4fcf9a
...
...
@@ -2458,10 +2458,9 @@ NTSTATUS WINAPI NtGetNlsSectionPtr( ULONG type, ULONG id, void *unknown, void **
}
if
(
!
status
)
{
*
ptr
=
NULL
;
*
size
=
0
;
status
=
NtMapViewOfSection
(
handle
,
GetCurrentProcess
(),
ptr
,
0
,
0
,
NULL
,
size
,
ViewShare
,
0
,
PAGE_READONLY
);
status
=
map_section
(
handle
,
ptr
,
size
,
PAGE_READONLY
);
NtClose
(
handle
);
}
}
NtClose
(
handle
);
return
status
;
...
...
dlls/ntdll/unix/loader.c
View file @
cd4fcf9a
...
...
@@ -2032,11 +2032,7 @@ static void load_apiset_dll(void)
}
if
(
!
status
)
{
ptr
=
NULL
;
size
=
0
;
status
=
NtMapViewOfSection
(
mapping
,
NtCurrentProcess
(),
&
ptr
,
is_win64
&&
wow_peb
?
0x7fffffff
:
0
,
0
,
NULL
,
&
size
,
ViewShare
,
0
,
PAGE_READONLY
);
status
=
map_section
(
mapping
,
&
ptr
,
&
size
,
PAGE_READONLY
);
NtClose
(
mapping
);
}
if
(
!
status
)
...
...
dlls/ntdll/unix/unix_private.h
View file @
cd4fcf9a
...
...
@@ -450,4 +450,12 @@ static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data )
str
->
Buffer
=
(
WCHAR
*
)
data
;
}
static
inline
NTSTATUS
map_section
(
HANDLE
mapping
,
void
**
ptr
,
SIZE_T
*
size
,
ULONG
protect
)
{
*
ptr
=
NULL
;
*
size
=
0
;
return
NtMapViewOfSection
(
mapping
,
NtCurrentProcess
(),
ptr
,
is_win64
&&
wow_peb
?
0x7fffffff
:
0
,
0
,
NULL
,
size
,
ViewShare
,
0
,
protect
);
}
#endif
/* __NTDLL_UNIX_PRIVATE_H */
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