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
e5590cbe
Commit
e5590cbe
authored
May 21, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
toolhelp: Avoid using libwine functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d7d0427
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
krnl386.exe16.spec
dlls/krnl386.exe16/krnl386.exe16.spec
+2
-0
toolhelp.c
dlls/toolhelp.dll16/toolhelp.c
+6
-13
No files found.
dlls/krnl386.exe16/krnl386.exe16.spec
View file @
e5590cbe
...
...
@@ -709,6 +709,8 @@
@ stdcall -arch=win32 GetExeVersion16()
@ stdcall -arch=win32 GetExpWinVer16(long)
@ stdcall -arch=win32 GetModuleHandle16(str)
@ stdcall -arch=win32 GetSelectorBase(long)
@ stdcall -arch=win32 GetSelectorLimit16(long)
@ stdcall -arch=win32 GlobalReAlloc16(long long long)
@ stdcall -arch=win32 InitTask16(ptr)
@ stdcall -arch=win32 IsBadReadPtr16(long long)
...
...
dlls/toolhelp.dll16/toolhelp.c
View file @
e5590cbe
...
...
@@ -36,7 +36,6 @@
#include "wine/winbase16.h"
#include "toolhelp.h"
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
toolhelp
);
...
...
@@ -639,15 +638,12 @@ void WINAPI TerminateApp16(HTASK16 hTask, WORD wFlags)
*/
DWORD
WINAPI
MemoryRead16
(
WORD
sel
,
DWORD
offset
,
void
*
buffer
,
DWORD
count
)
{
LDT_ENTRY
entry
;
DWORD
limit
;
char
*
base
=
(
char
*
)
GetSelectorBase
(
sel
)
;
DWORD
limit
=
GetSelectorLimit16
(
sel
)
;
wine_ldt_get_entry
(
sel
,
&
entry
);
if
(
wine_ldt_is_empty
(
&
entry
))
return
0
;
limit
=
wine_ldt_get_limit
(
&
entry
);
if
(
offset
>
limit
)
return
0
;
if
(
offset
+
count
>
limit
+
1
)
count
=
limit
+
1
-
offset
;
memcpy
(
buffer
,
(
char
*
)
wine_ldt_get_base
(
&
entry
)
+
offset
,
count
);
memcpy
(
buffer
,
base
+
offset
,
count
);
return
count
;
}
...
...
@@ -657,15 +653,12 @@ DWORD WINAPI MemoryRead16( WORD sel, DWORD offset, void *buffer, DWORD count )
*/
DWORD
WINAPI
MemoryWrite16
(
WORD
sel
,
DWORD
offset
,
void
*
buffer
,
DWORD
count
)
{
LDT_ENTRY
entry
;
DWORD
limit
;
char
*
base
=
(
char
*
)
GetSelectorBase
(
sel
)
;
DWORD
limit
=
GetSelectorLimit16
(
sel
)
;
wine_ldt_get_entry
(
sel
,
&
entry
);
if
(
wine_ldt_is_empty
(
&
entry
))
return
0
;
limit
=
wine_ldt_get_limit
(
&
entry
);
if
(
offset
>
limit
)
return
0
;
if
(
offset
+
count
>
limit
)
count
=
limit
+
1
-
offset
;
memcpy
(
(
char
*
)
wine_ldt_get_base
(
&
entry
)
+
offset
,
buffer
,
count
);
memcpy
(
base
+
offset
,
buffer
,
count
);
return
count
;
}
...
...
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