Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
bffeff38
Commit
bffeff38
authored
May 30, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlGetUserValueHeap.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
28c7a4d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
heap.c
dlls/kernel32/tests/heap.c
+0
-2
heap.c
dlls/ntdll/heap.c
+25
-4
No files found.
dlls/kernel32/tests/heap.c
View file @
bffeff38
...
...
@@ -2320,7 +2320,6 @@ static void test_block_layout( HANDLE heap, DWORD global_flags, DWORD heap_flags
tmp_flags
=
0
;
ret
=
pRtlGetUserInfoHeap
(
heap
,
0
,
ptr0
,
(
void
**
)
&
tmp_ptr
,
&
tmp_flags
);
ok
(
ret
,
"RtlGetUserInfoHeap failed, error %lu
\n
"
,
GetLastError
()
);
todo_wine
ok
(
tmp_ptr
==
(
void
*
)
0xdeadbeef
,
"got ptr %p
\n
"
,
tmp_ptr
);
todo_wine
ok
(
tmp_flags
==
0xa00
||
broken
(
tmp_flags
==
0xc00
)
/* w1064v1507 */
,
...
...
@@ -2335,7 +2334,6 @@ static void test_block_layout( HANDLE heap, DWORD global_flags, DWORD heap_flags
tmp_flags
=
0
;
ret
=
pRtlGetUserInfoHeap
(
heap
,
0
,
ptr0
,
(
void
**
)
&
tmp_ptr
,
&
tmp_flags
);
ok
(
ret
,
"RtlGetUserInfoHeap failed, error %lu
\n
"
,
GetLastError
()
);
todo_wine
ok
(
tmp_ptr
==
(
void
*
)
0xdeadbee0
,
"got ptr %p
\n
"
,
tmp_ptr
);
todo_wine
ok
(
tmp_flags
==
0xa00
||
broken
(
tmp_flags
==
0xc00
)
/* w1064v1507 */
,
...
...
dlls/ntdll/heap.c
View file @
bffeff38
...
...
@@ -1996,12 +1996,33 @@ NTSTATUS WINAPI RtlSetHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS info_
/***********************************************************************
* RtlGetUserInfoHeap (NTDLL.@)
*/
BOOLEAN
WINAPI
RtlGetUserInfoHeap
(
HANDLE
h
eap
,
ULONG
flags
,
void
*
ptr
,
void
**
user_value
,
ULONG
*
user_flags
)
BOOLEAN
WINAPI
RtlGetUserInfoHeap
(
HANDLE
h
andle
,
ULONG
flags
,
void
*
ptr
,
void
**
user_value
,
ULONG
*
user_flags
)
{
FIXME
(
"heap %p, flags %#x, ptr %p, user_value %p, user_flags %p semi-stub!
\n
"
,
heap
,
flags
,
ptr
,
user_value
,
user_flags
);
*
user_value
=
NULL
;
ARENA_LARGE
*
large
=
(
ARENA_LARGE
*
)
ptr
-
1
;
struct
block
*
block
;
SUBHEAP
*
subheap
;
HEAP
*
heap
;
char
*
tmp
;
TRACE
(
"handle %p, flags %#x, ptr %p, user_value %p, user_flags %p semi-stub!
\n
"
,
handle
,
flags
,
ptr
,
user_value
,
user_flags
);
*
user_value
=
0
;
*
user_flags
=
0
;
if
(
!
(
heap
=
HEAP_GetPtr
(
handle
)))
return
TRUE
;
heap_lock
(
heap
,
flags
);
if
((
block
=
unsafe_block_from_ptr
(
heap
,
ptr
,
&
subheap
))
&&
!
subheap
)
*
user_value
=
large
->
user_value
;
else
if
(
block
)
{
tmp
=
(
char
*
)
block
+
block_get_size
(
block
)
-
block
->
tail_size
+
sizeof
(
void
*
);
if
((
heap_get_flags
(
heap
,
flags
)
&
HEAP_TAIL_CHECKING_ENABLED
)
||
RUNNING_ON_VALGRIND
)
tmp
+=
ALIGNMENT
;
*
user_value
=
*
(
void
**
)
tmp
;
}
heap_unlock
(
heap
,
flags
);
return
TRUE
;
}
...
...
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