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
011605ed
Commit
011605ed
authored
Oct 17, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the WOWHandle functions to convert between task handle and thread
id. Stop exporting TASK_GetPtr and THREAD_IdToTEB from kernel.
parent
43701b94
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
25 deletions
+19
-25
kernel32.spec
dlls/kernel/kernel32.spec
+0
-2
wowthunk.c
dlls/kernel/wowthunk.c
+7
-2
msg16.c
dlls/user/msg16.c
+3
-4
wnd16.c
dlls/user/wnd16.c
+3
-4
module.c
dlls/winedos/module.c
+1
-1
message.c
windows/message.c
+0
-1
winproc.c
windows/winproc.c
+5
-11
No files found.
dlls/kernel/kernel32.spec
View file @
011605ed
...
...
@@ -1076,6 +1076,4 @@ init MAIN_KernelInit
@ cdecl LOCAL_Unlock(long long) LOCAL_Unlock
@ stdcall NE_DefResourceHandler(long long long) NE_DefResourceHandler
@ cdecl SELECTOR_AllocBlock(ptr long long) SELECTOR_AllocBlock
@ cdecl TASK_GetPtr(long) TASK_GetPtr
@ cdecl THREAD_IdToTEB(long) THREAD_IdToTEB
@ cdecl VIRTUAL_SetFaultHandler(ptr ptr ptr) VIRTUAL_SetFaultHandler
dlls/kernel/wowthunk.c
View file @
011605ed
...
...
@@ -27,6 +27,7 @@
#include "wownt32.h"
#include "winternl.h"
#include "file.h"
#include "task.h"
#include "miscemu.h"
#include "stackframe.h"
#include "wine/debug.h"
...
...
@@ -214,10 +215,12 @@ HANDLE WINAPI K32WOWHandle32( WORD handle, WOW_HANDLE_TYPE type )
case
WOW_TYPE_HPALETTE
:
case
WOW_TYPE_HPEN
:
case
WOW_TYPE_HACCEL
:
case
WOW_TYPE_HTASK
:
case
WOW_TYPE_FULLHWND
:
return
(
HANDLE
)(
ULONG_PTR
)
handle
;
case
WOW_TYPE_HTASK
:
return
(
HANDLE
)
TASK_GetPtr
(
handle
)
->
teb
->
tid
;
default:
ERR
(
"handle 0x%04x of unknown type %d
\n
"
,
handle
,
type
);
return
(
HANDLE
)(
ULONG_PTR
)
handle
;
...
...
@@ -247,10 +250,12 @@ WORD WINAPI K32WOWHandle16( HANDLE handle, WOW_HANDLE_TYPE type )
case
WOW_TYPE_HPALETTE
:
case
WOW_TYPE_HPEN
:
case
WOW_TYPE_HACCEL
:
case
WOW_TYPE_HTASK
:
case
WOW_TYPE_FULLHWND
:
return
LOWORD
(
handle
);
case
WOW_TYPE_HTASK
:
return
THREAD_IdToTEB
((
DWORD
)
handle
)
->
htask16
;
default:
ERR
(
"handle 0x%08x of unknown type %d
\n
"
,
handle
,
type
);
return
LOWORD
(
handle
);
...
...
dlls/user/msg16.c
View file @
011605ed
...
...
@@ -24,7 +24,6 @@
#include "hook.h"
#include "message.h"
#include "spy.h"
#include "task.h"
#include "thread.h"
#include "win.h"
#include "wine/debug.h"
...
...
@@ -118,13 +117,13 @@ BOOL16 WINAPI PostAppMessage16( HTASK16 hTask, UINT16 msg, WPARAM16 wparam, LPAR
{
WPARAM
wparam32
;
UINT
msg32
;
TDB
*
pTask
=
TASK_GetPtr
(
hTask
);
if
(
!
pTask
)
return
FALSE
;
DWORD
tid
=
HTASK_32
(
hTask
);
if
(
!
tid
)
return
FALSE
;
switch
(
WINPROC_MapMsg16To32W
(
0
,
msg
,
wparam
,
&
msg32
,
&
wparam32
,
&
lparam
))
{
case
0
:
return
PostThreadMessageW
(
(
DWORD
)
pTask
->
teb
->
tid
,
msg32
,
wparam32
,
lparam
);
return
PostThreadMessageW
(
tid
,
msg32
,
wparam32
,
lparam
);
case
1
:
ERR
(
"16-bit message %x contains pointer, cannot post
\n
"
,
msg
);
return
FALSE
;
...
...
dlls/user/wnd16.c
View file @
011605ed
...
...
@@ -22,7 +22,6 @@
#include "wownt32.h"
#include "user.h"
#include "win.h"
#include "task.h"
#include "stackframe.h"
/* handle --> handle16 conversions */
...
...
@@ -1033,12 +1032,12 @@ INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
struct
wnd_enum_info
info
;
TDB
*
tdb
=
TASK_GetPtr
(
hTask
);
DWORD
tid
=
HTASK_32
(
hTask
);
if
(
!
t
db
)
return
FALSE
;
if
(
!
t
id
)
return
FALSE
;
info
.
proc
=
func
;
info
.
param
=
lParam
;
return
EnumThreadWindows
(
(
DWORD
)
tdb
->
teb
->
tid
,
wnd_enum_callback
,
(
LPARAM
)
&
info
);
return
EnumThreadWindows
(
tid
,
wnd_enum_callback
,
(
LPARAM
)
&
info
);
}
...
...
dlls/winedos/module.c
View file @
011605ed
...
...
@@ -473,7 +473,7 @@ static BOOL MZ_InitTask(void)
static
void
MZ_Launch
(
void
)
{
TDB
*
pTask
=
TASK_GetPtr
(
GetCurrentTask
()
);
TDB
*
pTask
=
GlobalLock16
(
GetCurrentTask
()
);
BYTE
*
psp_start
=
PTR_REAL_TO_LIN
(
DOSVM_psp
,
0
);
LPSTR
cmdline
=
GetCommandLineA
();
DWORD
rv
;
...
...
windows/message.c
View file @
011605ed
...
...
@@ -45,7 +45,6 @@
#include "winproc.h"
#include "user.h"
#include "thread.h"
#include "task.h"
#include "controls.h"
#include "wine/debug.h"
...
...
windows/winproc.c
View file @
011605ed
...
...
@@ -39,7 +39,6 @@
#include "winproc.h"
#include "wine/debug.h"
#include "spy.h"
#include "task.h"
#include "thread.h"
#include "dde.h"
...
...
@@ -1337,15 +1336,10 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
*
plparam
=
(
LPARAM
)
MapSL
(
*
plparam
);
return
0
;
case
WM_ACTIVATEAPP
:
if
(
*
plparam
)
{
/* We need this when SetActiveWindow sends a Sendmessage16() to
a 32bit window. Might be superflous with 32bit interprocess
message queues.
*/
HTASK16
htask
=
(
HTASK16
)
*
plparam
;
DWORD
idThread
=
(
DWORD
)
TASK_GetPtr
(
htask
)
->
teb
->
tid
;
*
plparam
=
(
LPARAM
)
idThread
;
}
/* We need this when SetActiveWindow sends a Sendmessage16() to
* a 32bit window. Might be superflous with 32bit interprocess
* message queues. */
if
(
*
plparam
)
*
plparam
=
HTASK_32
(
*
plparam
);
return
0
;
case
WM_NEXTMENU
:
{
...
...
@@ -2126,7 +2120,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
return
0
;
case
WM_ACTIVATEAPP
:
if
(
*
plparam
)
*
plparam
=
(
LPARAM
)
THREAD_IdToTEB
((
DWORD
)
*
plparam
)
->
htask16
;
if
(
*
plparam
)
*
plparam
=
HTASK_16
(
(
HANDLE
)
*
plparam
)
;
return
0
;
case
WM_NEXTMENU
:
{
...
...
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