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
796346f8
Commit
796346f8
authored
Oct 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Get rid of the 16-bit heap support.
parent
db79a9f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
57 deletions
+17
-57
user.exe.spec
dlls/user32/user.exe.spec
+1
-1
user16.c
dlls/user32/user16.c
+15
-0
user_main.c
dlls/user32/user_main.c
+1
-10
user_private.h
dlls/user32/user_private.h
+0
-46
No files found.
dlls/user32/user.exe.spec
View file @
796346f8
...
@@ -351,7 +351,7 @@
...
@@ -351,7 +351,7 @@
371 pascal -ret16 SetWindowPlacement(word ptr) SetWindowPlacement16
371 pascal -ret16 SetWindowPlacement(word ptr) SetWindowPlacement16
372 stub GetInternalIconHeader
372 stub GetInternalIconHeader
373 pascal -ret16 SubtractRect(ptr ptr ptr) SubtractRect16
373 pascal -ret16 SubtractRect(ptr ptr ptr) SubtractRect16
#374 DllEntryPoint
374 pascal -ret16 DllEntryPoint(long word word word long word)
375 stub DrawTextEx
375 stub DrawTextEx
376 stub SetMessageExtraInfo
376 stub SetMessageExtraInfo
378 stub SetPropEx
378 stub SetPropEx
...
...
dlls/user32/user16.c
View file @
796346f8
...
@@ -56,6 +56,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
...
@@ -56,6 +56,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
WORD
USER_HeapSel
=
0
;
/* USER heap selector */
struct
gray_string_info
struct
gray_string_info
{
{
...
@@ -1206,6 +1207,20 @@ BOOL16 WINAPI SubtractRect16( LPRECT16 dest, const RECT16 *src1,
...
@@ -1206,6 +1207,20 @@ BOOL16 WINAPI SubtractRect16( LPRECT16 dest, const RECT16 *src1,
/**********************************************************************
/**********************************************************************
* DllEntryPoint (USER.374)
*/
BOOL
WINAPI
DllEntryPoint
(
DWORD
reason
,
HINSTANCE16
inst
,
WORD
ds
,
WORD
heap
,
DWORD
reserved1
,
WORD
reserved2
)
{
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
TRUE
;
if
(
USER_HeapSel
)
return
TRUE
;
/* already called */
USER_HeapSel
=
ds
;
return
TRUE
;
}
/**********************************************************************
* SetMenuContextHelpId (USER.384)
* SetMenuContextHelpId (USER.384)
*/
*/
BOOL16
WINAPI
SetMenuContextHelpId16
(
HMENU16
hMenu
,
DWORD
dwContextHelpID
)
BOOL16
WINAPI
SetMenuContextHelpId16
(
HMENU16
hMenu
,
DWORD
dwContextHelpID
)
...
...
dlls/user32/user_main.c
View file @
796346f8
...
@@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics);
...
@@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics);
#define DESKTOP_ALL_ACCESS 0x01ff
#define DESKTOP_ALL_ACCESS 0x01ff
WORD
USER_HeapSel
=
0
;
/* USER heap selector */
HMODULE
user32_module
=
0
;
HMODULE
user32_module
=
0
;
static
SYSLEVEL
USER_SysLevel
;
static
SYSLEVEL
USER_SysLevel
;
...
@@ -267,15 +266,7 @@ static void winstation_init(void)
...
@@ -267,15 +266,7 @@ static void winstation_init(void)
*/
*/
static
BOOL
process_attach
(
void
)
static
BOOL
process_attach
(
void
)
{
{
HINSTANCE16
instance
;
LoadLibrary16
(
"user.exe"
);
/* Create USER heap */
if
((
instance
=
LoadLibrary16
(
"USER.EXE"
))
>=
32
)
USER_HeapSel
=
instance
|
7
;
else
{
USER_HeapSel
=
GlobalAlloc16
(
GMEM_FIXED
,
65536
);
LocalInit16
(
USER_HeapSel
,
32
,
65534
);
}
/* some Win9x dlls expect keyboard to be loaded */
/* some Win9x dlls expect keyboard to be loaded */
if
(
GetVersion
()
&
0x80000000
)
LoadLibrary16
(
"keyboard.drv"
);
if
(
GetVersion
()
&
0x80000000
)
LoadLibrary16
(
"keyboard.drv"
);
...
...
dlls/user32/user_private.h
View file @
796346f8
...
@@ -29,55 +29,9 @@
...
@@ -29,55 +29,9 @@
#include "winreg.h"
#include "winreg.h"
#include "winternl.h"
#include "winternl.h"
#include "wine/windef16.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
extern
WORD
USER_HeapSel
DECLSPEC_HIDDEN
;
extern
WORD
USER_HeapSel
DECLSPEC_HIDDEN
;
static
inline
HLOCAL16
LOCAL_Alloc
(
HANDLE16
ds
,
UINT16
flags
,
WORD
size
)
{
STACK16FRAME
*
stack16
=
MapSL
(
PtrToUlong
(
NtCurrentTeb
()
->
WOW32Reserved
));
HANDLE16
oldDS
=
stack16
->
ds
;
HLOCAL16
ret
;
stack16
->
ds
=
ds
;
ret
=
LocalAlloc16
(
flags
,
size
);
stack16
->
ds
=
oldDS
;
return
ret
;
}
static
inline
HLOCAL16
LOCAL_ReAlloc
(
HANDLE16
ds
,
HLOCAL16
handle
,
WORD
size
,
UINT16
flags
)
{
STACK16FRAME
*
stack16
=
MapSL
(
PtrToUlong
(
NtCurrentTeb
()
->
WOW32Reserved
));
HANDLE16
oldDS
=
stack16
->
ds
;
HLOCAL16
ret
;
stack16
->
ds
=
ds
;
ret
=
LocalReAlloc16
(
handle
,
size
,
flags
);
stack16
->
ds
=
oldDS
;
return
ret
;
}
static
inline
HLOCAL16
LOCAL_Free
(
HANDLE16
ds
,
HLOCAL16
handle
)
{
STACK16FRAME
*
stack16
=
MapSL
(
PtrToUlong
(
NtCurrentTeb
()
->
WOW32Reserved
));
HANDLE16
oldDS
=
stack16
->
ds
;
HLOCAL16
ret
;
stack16
->
ds
=
ds
;
ret
=
LocalFree16
(
handle
);
stack16
->
ds
=
oldDS
;
return
ret
;
}
#define USER_HEAP_ALLOC(size) \
((HANDLE)(ULONG_PTR)LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) ))
#define USER_HEAP_REALLOC(handle,size) \
((HANDLE)(ULONG_PTR)LOCAL_ReAlloc( USER_HeapSel, LOWORD(handle), (size), LMEM_FIXED ))
#define USER_HEAP_FREE(handle) \
LOCAL_Free( USER_HeapSel, LOWORD(handle) )
#define USER_HEAP_LIN_ADDR(handle) \
((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, LOWORD(handle))) : NULL)
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
...
...
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