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
bbd73667
Commit
bbd73667
authored
Jan 24, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Split logic for MemoryBasicInformation into a separate function.
Signed-off-by:
Andrew Wesie
<
awesie@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a66eaea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
28 deletions
+37
-28
virtual.c
dlls/ntdll/virtual.c
+37
-28
No files found.
dlls/ntdll/virtual.c
View file @
bbd73667
...
...
@@ -3011,40 +3011,16 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg )
return
1
;
}
#define UNIMPLEMENTED_INFO_CLASS(c) \
case c: \
FIXME("(process=%p,addr=%p) Unimplemented information class: " #c "\n", process, addr); \
return STATUS_INVALID_INFO_CLASS
/***********************************************************************
* NtQueryVirtualMemory (NTDLL.@)
* ZwQueryVirtualMemory (NTDLL.@)
*/
NTSTATUS
WINAPI
NtQueryVirtualMemory
(
HANDLE
process
,
LPCVOID
addr
,
MEMORY_INFORMATION_CLASS
info_class
,
PVOID
buffer
,
SIZE_T
len
,
SIZE_T
*
res_len
)
/* get basic information about a memory block */
static
NTSTATUS
get_basic_memory_info
(
HANDLE
process
,
LPCVOID
addr
,
MEMORY_BASIC_INFORMATION
*
info
,
SIZE_T
len
,
SIZE_T
*
res_len
)
{
struct
file_view
*
view
;
char
*
base
,
*
alloc_base
=
0
,
*
alloc_end
=
working_set_limit
;
struct
wine_rb_entry
*
ptr
;
MEMORY_BASIC_INFORMATION
*
info
=
buffer
;
sigset_t
sigset
;
if
(
info_class
!=
MemoryBasicInformation
)
{
switch
(
info_class
)
{
UNIMPLEMENTED_INFO_CLASS
(
MemoryWorkingSetList
);
UNIMPLEMENTED_INFO_CLASS
(
MemorySectionName
);
UNIMPLEMENTED_INFO_CLASS
(
MemoryBasicVlmInformation
);
default:
FIXME
(
"(%p,%p,info_class=%d,%p,%ld,%p) Unknown information class
\n
"
,
process
,
addr
,
info_class
,
buffer
,
len
,
res_len
);
return
STATUS_INVALID_INFO_CLASS
;
}
}
if
(
len
<
sizeof
(
MEMORY_BASIC_INFORMATION
))
return
STATUS_INFO_LENGTH_MISMATCH
;
...
...
@@ -3159,6 +3135,39 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
}
#define UNIMPLEMENTED_INFO_CLASS(c) \
case c: \
FIXME("(process=%p,addr=%p) Unimplemented information class: " #c "\n", process, addr); \
return STATUS_INVALID_INFO_CLASS
/***********************************************************************
* NtQueryVirtualMemory (NTDLL.@)
* ZwQueryVirtualMemory (NTDLL.@)
*/
NTSTATUS
WINAPI
NtQueryVirtualMemory
(
HANDLE
process
,
LPCVOID
addr
,
MEMORY_INFORMATION_CLASS
info_class
,
PVOID
buffer
,
SIZE_T
len
,
SIZE_T
*
res_len
)
{
TRACE
(
"(%p, %p, info_class=%d, %p, %ld, %p)
\n
"
,
process
,
addr
,
info_class
,
buffer
,
len
,
res_len
);
switch
(
info_class
)
{
case
MemoryBasicInformation
:
return
get_basic_memory_info
(
process
,
addr
,
buffer
,
len
,
res_len
);
UNIMPLEMENTED_INFO_CLASS
(
MemoryWorkingSetList
);
UNIMPLEMENTED_INFO_CLASS
(
MemorySectionName
);
UNIMPLEMENTED_INFO_CLASS
(
MemoryBasicVlmInformation
);
default:
FIXME
(
"(%p,%p,info_class=%d,%p,%ld,%p) Unknown information class
\n
"
,
process
,
addr
,
info_class
,
buffer
,
len
,
res_len
);
return
STATUS_INVALID_INFO_CLASS
;
}
}
/***********************************************************************
* NtLockVirtualMemory (NTDLL.@)
* ZwLockVirtualMemory (NTDLL.@)
...
...
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