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
c998667b
Commit
c998667b
authored
Oct 24, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Also return the SECTION_IMAGE_INFORMATION data from RtlCreateUserProcess().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5cc8bcf0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
25 deletions
+37
-25
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+2
-0
process.c
dlls/ntdll/process.c
+1
-0
virtual.c
dlls/ntdll/virtual.c
+34
-25
No files found.
dlls/ntdll/ntdll_misc.h
View file @
c998667b
...
...
@@ -185,6 +185,8 @@ extern NTSTATUS virtual_uninterrupted_write_memory( void *addr, const void *buff
extern
void
VIRTUAL_SetForceExec
(
BOOL
enable
)
DECLSPEC_HIDDEN
;
extern
void
virtual_release_address_space
(
void
)
DECLSPEC_HIDDEN
;
extern
void
virtual_set_large_address_space
(
void
)
DECLSPEC_HIDDEN
;
extern
void
virtual_fill_image_information
(
const
pe_image_info_t
*
pe_info
,
SECTION_IMAGE_INFORMATION
*
info
)
DECLSPEC_HIDDEN
;
extern
struct
_KUSER_SHARED_DATA
*
user_shared_data
DECLSPEC_HIDDEN
;
/* completion */
...
...
dlls/ntdll/process.c
View file @
c998667b
...
...
@@ -1314,6 +1314,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
info
->
Thread
=
thread_handle
;
info
->
ClientId
.
UniqueProcess
=
ULongToHandle
(
process_id
);
info
->
ClientId
.
UniqueThread
=
ULongToHandle
(
thread_id
);
virtual_fill_image_information
(
&
pe_info
,
&
info
->
ImageInformation
);
process_handle
=
thread_handle
=
0
;
status
=
STATUS_SUCCESS
;
}
...
...
dlls/ntdll/virtual.c
View file @
c998667b
...
...
@@ -3176,6 +3176,39 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
/******************************************************************************
* virtual_fill_image_information
*
* Helper for NtQuerySection.
*/
void
virtual_fill_image_information
(
const
pe_image_info_t
*
pe_info
,
SECTION_IMAGE_INFORMATION
*
info
)
{
info
->
TransferAddress
=
wine_server_get_ptr
(
pe_info
->
entry_point
);
info
->
ZeroBits
=
pe_info
->
zerobits
;
info
->
MaximumStackSize
=
pe_info
->
stack_size
;
info
->
CommittedStackSize
=
pe_info
->
stack_commit
;
info
->
SubSystemType
=
pe_info
->
subsystem
;
info
->
SubsystemVersionLow
=
pe_info
->
subsystem_low
;
info
->
SubsystemVersionHigh
=
pe_info
->
subsystem_high
;
info
->
GpValue
=
pe_info
->
gp
;
info
->
ImageCharacteristics
=
pe_info
->
image_charact
;
info
->
DllCharacteristics
=
pe_info
->
dll_charact
;
info
->
Machine
=
pe_info
->
machine
;
info
->
ImageContainsCode
=
pe_info
->
contains_code
;
info
->
u
.
ImageFlags
=
pe_info
->
image_flags
;
info
->
LoaderFlags
=
pe_info
->
loader_flags
;
info
->
ImageFileSize
=
pe_info
->
file_size
;
info
->
CheckSum
=
pe_info
->
checksum
;
#ifndef _WIN64
/* don't return 64-bit values to 32-bit processes */
if
(
pe_info
->
machine
==
IMAGE_FILE_MACHINE_AMD64
||
pe_info
->
machine
==
IMAGE_FILE_MACHINE_ARM64
)
{
info
->
TransferAddress
=
(
void
*
)
0x81231234
;
/* sic */
info
->
MaximumStackSize
=
0x100000
;
info
->
CommittedStackSize
=
0x10000
;
}
#endif
}
/******************************************************************************
* NtQuerySection (NTDLL.@)
* ZwQuerySection (NTDLL.@)
*/
...
...
@@ -3217,32 +3250,8 @@ NTSTATUS WINAPI NtQuerySection( HANDLE handle, SECTION_INFORMATION_CLASS class,
else
if
(
reply
->
flags
&
SEC_IMAGE
)
{
SECTION_IMAGE_INFORMATION
*
info
=
ptr
;
info
->
TransferAddress
=
wine_server_get_ptr
(
image_info
.
entry_point
);
info
->
ZeroBits
=
image_info
.
zerobits
;
info
->
MaximumStackSize
=
image_info
.
stack_size
;
info
->
CommittedStackSize
=
image_info
.
stack_commit
;
info
->
SubSystemType
=
image_info
.
subsystem
;
info
->
SubsystemVersionLow
=
image_info
.
subsystem_low
;
info
->
SubsystemVersionHigh
=
image_info
.
subsystem_high
;
info
->
GpValue
=
image_info
.
gp
;
info
->
ImageCharacteristics
=
image_info
.
image_charact
;
info
->
DllCharacteristics
=
image_info
.
dll_charact
;
info
->
Machine
=
image_info
.
machine
;
info
->
ImageContainsCode
=
image_info
.
contains_code
;
info
->
u
.
ImageFlags
=
image_info
.
image_flags
;
info
->
LoaderFlags
=
image_info
.
loader_flags
;
info
->
ImageFileSize
=
image_info
.
file_size
;
info
->
CheckSum
=
image_info
.
checksum
;
virtual_fill_image_information
(
&
image_info
,
info
);
if
(
ret_size
)
*
ret_size
=
sizeof
(
*
info
);
#ifndef _WIN64
/* don't return 64-bit values to 32-bit processes */
if
(
image_info
.
machine
==
IMAGE_FILE_MACHINE_AMD64
||
image_info
.
machine
==
IMAGE_FILE_MACHINE_ARM64
)
{
info
->
TransferAddress
=
(
void
*
)
0x81231234
;
/* sic */
info
->
MaximumStackSize
=
0x100000
;
info
->
CommittedStackSize
=
0x10000
;
}
#endif
}
else
status
=
STATUS_SECTION_NOT_IMAGE
;
}
...
...
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