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
c6373abc
Commit
c6373abc
authored
Aug 03, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Update the MEMORY_INFORMATION_CLASS enumeration.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
669d1cce
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
26 deletions
+30
-26
loader.c
dlls/kernel32/tests/loader.c
+1
-1
debug.c
dlls/kernelbase/debug.c
+4
-2
info.c
dlls/ntdll/tests/info.c
+9
-9
virtual.c
dlls/ntdll/unix/virtual.c
+3
-8
psapi_main.c
dlls/psapi/tests/psapi_main.c
+1
-1
virtual.c
dlls/wow64/virtual.c
+1
-1
winternl.h
include/winternl.h
+11
-4
No files found.
dlls/kernel32/tests/loader.c
View file @
c6373abc
...
...
@@ -4028,7 +4028,7 @@ static void test_Wow64Transition(void)
}
status
=
NtQueryVirtualMemory
(
GetCurrentProcess
(),
*
pWow64Transition
,
MemorySectionName
,
name
,
sizeof
(
buffer
),
NULL
);
MemoryMappedFilenameInformation
,
name
,
sizeof
(
buffer
),
NULL
);
ok
(
!
status
,
"got %#x
\n
"
,
status
);
filepart
=
name
->
SectionFileName
.
Buffer
+
name
->
SectionFileName
.
Length
/
sizeof
(
WCHAR
);
while
(
*
filepart
!=
'\\'
)
--
filepart
;
...
...
dlls/kernelbase/debug.c
View file @
c6373abc
...
...
@@ -1133,7 +1133,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetMappedFileNameW( HANDLE process, void *addr, W
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
!
set_ntstatus
(
NtQueryVirtualMemory
(
process
,
addr
,
MemorySectionName
,
mem
,
sizeof
(
buffer
),
NULL
)))
if
(
!
set_ntstatus
(
NtQueryVirtualMemory
(
process
,
addr
,
MemoryMappedFilenameInformation
,
mem
,
sizeof
(
buffer
),
NULL
)))
return
0
;
len
=
mem
->
SectionFileName
.
Length
/
sizeof
(
WCHAR
);
...
...
@@ -1504,7 +1505,8 @@ BOOL WINAPI /* DECLSPEC_HOTPATCH */ InitializeProcessForWsWatch( HANDLE process
BOOL
WINAPI
DECLSPEC_HOTPATCH
QueryWorkingSet
(
HANDLE
process
,
void
*
buffer
,
DWORD
size
)
{
TRACE
(
"(%p, %p, %d)
\n
"
,
process
,
buffer
,
size
);
return
set_ntstatus
(
NtQueryVirtualMemory
(
process
,
NULL
,
MemoryWorkingSetList
,
buffer
,
size
,
NULL
));
return
set_ntstatus
(
NtQueryVirtualMemory
(
process
,
NULL
,
MemoryWorkingSetInformation
,
buffer
,
size
,
NULL
));
}
...
...
dlls/ntdll/tests/info.c
View file @
c6373abc
...
...
@@ -2649,7 +2649,7 @@ static void test_queryvirtualmemory(void)
module
=
GetModuleHandleA
(
"ntdll.dll"
);
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
module
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
module
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
*
name
)
+
16
,
&
readcount
);
ok
(
status
==
STATUS_BUFFER_OVERFLOW
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Length
==
0xcccc
||
broken
(
!
name
->
SectionFileName
.
Length
),
/* vista64 */
...
...
@@ -2658,7 +2658,7 @@ static void test_queryvirtualmemory(void)
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
buffer
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Buffer
==
(
WCHAR
*
)(
name
+
1
),
"Wrong ptr %p/%p
\n
"
,
...
...
@@ -2672,18 +2672,18 @@ static void test_queryvirtualmemory(void)
"buffer not null-terminated
\n
"
);
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
buffer
),
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"got %08x
\n
"
,
status
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
1234
,
Memory
MappedFilenameInformation
,
NULL
,
sizeof
(
buffer
),
NULL
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"got %08x
\n
"
,
status
);
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
prev
=
readcount
;
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
321
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
char
*
)
module
+
321
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
*
name
)
-
1
,
&
readcount
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Length
==
0xcccc
,
"Wrong len %u
\n
"
,
name
->
SectionFileName
.
Length
);
...
...
@@ -2691,7 +2691,7 @@ static void test_queryvirtualmemory(void)
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
((
HANDLE
)
0xdead
,
(
char
*
)
module
+
1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
((
HANDLE
)
0xdead
,
(
char
*
)
module
+
1234
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
buffer
),
&
readcount
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"got %08x
\n
"
,
status
);
ok
(
readcount
==
0xdeadbeef
||
broken
(
readcount
==
1024
+
sizeof
(
*
name
)),
/* wow64 */
...
...
@@ -2699,7 +2699,7 @@ static void test_queryvirtualmemory(void)
memset
(
buffer
,
0xcc
,
sizeof
(
buffer
));
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
buffer
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
buffer
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
buffer
),
&
readcount
);
ok
(
status
==
STATUS_INVALID_ADDRESS
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Length
==
0xcccc
,
"Wrong len %u
\n
"
,
name
->
SectionFileName
.
Length
);
...
...
@@ -2707,7 +2707,7 @@ static void test_queryvirtualmemory(void)
"Wrong count %lu
\n
"
,
readcount
);
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
void
*
)
0x1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
void
*
)
0x1234
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
buffer
),
&
readcount
);
ok
(
status
==
STATUS_INVALID_ADDRESS
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Length
==
0xcccc
,
"Wrong len %u
\n
"
,
name
->
SectionFileName
.
Length
);
...
...
@@ -2715,7 +2715,7 @@ static void test_queryvirtualmemory(void)
"Wrong count %lu
\n
"
,
readcount
);
readcount
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
void
*
)
0x1234
,
Memory
SectionName
,
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
(
void
*
)
0x1234
,
Memory
MappedFilenameInformation
,
name
,
sizeof
(
*
name
)
-
1
,
&
readcount
);
ok
(
status
==
STATUS_INVALID_ADDRESS
,
"got %08x
\n
"
,
status
);
ok
(
name
->
SectionFileName
.
Length
==
0xcccc
,
"Wrong len %u
\n
"
,
name
->
SectionFileName
.
Length
);
...
...
dlls/ntdll/unix/virtual.c
View file @
c6373abc
...
...
@@ -4258,10 +4258,6 @@ static NTSTATUS get_memory_section_name( HANDLE process, LPCVOID addr,
return
status
;
}
#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.@)
...
...
@@ -4278,13 +4274,12 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
{
case
MemoryBasicInformation
:
return
get_basic_memory_info
(
process
,
addr
,
buffer
,
len
,
res_len
);
case
MemoryWorkingSetExInformation
:
return
get_working_set_ex
(
process
,
addr
,
buffer
,
len
,
res_len
);
case
MemorySectionName
:
return
get_memory_section_name
(
process
,
addr
,
buffer
,
len
,
res_len
);
UNIMPLEMENTED_INFO_CLASS
(
MemoryWorkingSetList
);
UNIMPLEMENTED_INFO_CLASS
(
MemoryBasicVlmInformation
);
case
MemoryMappedFilenameInformation
:
return
get_memory_section_name
(
process
,
addr
,
buffer
,
len
,
res_len
);
default:
FIXME
(
"(%p,%p,info_class=%d,%p,%ld,%p) Unknown information class
\n
"
,
...
...
dlls/psapi/tests/psapi_main.c
View file @
c6373abc
...
...
@@ -370,7 +370,7 @@ static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DW
buf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
buf_len
);
ret_len
=
0xdeadbeef
;
status
=
pNtQueryVirtualMemory
(
process
,
addr
,
Memory
SectionName
,
buf
,
buf_len
,
&
ret_len
);
status
=
pNtQueryVirtualMemory
(
process
,
addr
,
Memory
MappedFilenameInformation
,
buf
,
buf_len
,
&
ret_len
);
ok
(
!
status
,
"NtQueryVirtualMemory error %x
\n
"
,
status
);
section_name
=
(
MEMORY_SECTION_NAME
*
)
buf
;
...
...
dlls/wow64/virtual.c
View file @
c6373abc
...
...
@@ -328,7 +328,7 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args )
res_len
=
sizeof
(
MEMORY_BASIC_INFORMATION32
);
break
;
case
Memory
SectionName
:
/* MEMORY_SECTION_NAME */
case
Memory
MappedFilenameInformation
:
/* MEMORY_SECTION_NAME */
{
MEMORY_SECTION_NAME
*
info
;
MEMORY_SECTION_NAME32
*
info32
=
ptr
;
...
...
include/winternl.h
View file @
c6373abc
...
...
@@ -1907,10 +1907,17 @@ typedef enum _WINSTATIONINFOCLASS {
typedef
enum
_MEMORY_INFORMATION_CLASS
{
MemoryBasicInformation
,
MemoryWorkingSetList
,
MemorySectionName
,
MemoryBasicVlmInformation
,
MemoryWorkingSetExInformation
MemoryWorkingSetInformation
,
MemoryMappedFilenameInformation
,
MemoryRegionInformation
,
MemoryWorkingSetExInformation
,
MemorySharedCommitInformation
,
MemoryImageInformation
,
MemoryRegionInformationEx
,
MemoryPrivilegedBasicInformation
,
MemoryEnclaveImageInformation
,
MemoryBasicInformationCapped
,
MemoryPhysicalContiguityInformation
,
}
MEMORY_INFORMATION_CLASS
;
typedef
struct
_MEMORY_SECTION_NAME
...
...
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