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
61439d27
Commit
61439d27
authored
Dec 24, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Dec 24, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Callout table (for KERNEL->USER calls) added.
Callbacks->CallPostAppMessageProc removed.
parent
be672fe5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
3 deletions
+134
-3
thunk.c
if1632/thunk.c
+55
-1
callback.h
include/callback.h
+58
-1
callback.c
misc/callback.c
+21
-1
No files found.
if1632/thunk.c
View file @
61439d27
...
@@ -34,6 +34,7 @@ extern LONG CALLBACK CallTo16_lreg_(const CONTEXT *context, INT32 offset);
...
@@ -34,6 +34,7 @@ extern LONG CALLBACK CallTo16_lreg_(const CONTEXT *context, INT32 offset);
extern
WORD
CALLBACK
CallTo16_word_
(
FARPROC16
);
extern
WORD
CALLBACK
CallTo16_word_
(
FARPROC16
);
extern
LONG
CALLBACK
CallTo16_long_
(
FARPROC16
);
extern
LONG
CALLBACK
CallTo16_long_
(
FARPROC16
);
extern
WORD
CALLBACK
CallTo16_word_w
(
FARPROC16
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_w
(
FARPROC16
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_l
(
FARPROC16
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_l
(
FARPROC16
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_l
(
FARPROC16
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_ww
(
FARPROC16
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_ww
(
FARPROC16
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_wl
(
FARPROC16
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wl
(
FARPROC16
,
WORD
,
LONG
);
...
@@ -47,11 +48,14 @@ extern LONG CALLBACK CallTo16_long_lll (FARPROC16,LONG,LONG,LONG);
...
@@ -47,11 +48,14 @@ extern LONG CALLBACK CallTo16_long_lll (FARPROC16,LONG,LONG,LONG);
extern
WORD
CALLBACK
CallTo16_word_llwl
(
FARPROC16
,
LONG
,
LONG
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_llwl
(
FARPROC16
,
LONG
,
LONG
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_lwll
(
FARPROC16
,
LONG
,
WORD
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_lwll
(
FARPROC16
,
LONG
,
WORD
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_lwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_lwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_wlww
(
FARPROC16
,
WORD
,
LONG
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_wwll
(
FARPROC16
,
WORD
,
WORD
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwll
(
FARPROC16
,
WORD
,
WORD
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwwl
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwwl
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_wwwl
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_llll
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_llll
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_llll
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_llll
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wllwl
(
FARPROC16
,
WORD
,
LONG
,
LONG
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wllwl
(
FARPROC16
,
WORD
,
LONG
,
LONG
,
WORD
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_lwwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
,
WORD
);
extern
LONG
CALLBACK
CallTo16_long_lwwll
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
LONG
,
LONG
);
extern
LONG
CALLBACK
CallTo16_long_lwwll
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwlll
(
FARPROC16
,
WORD
,
WORD
,
LONG
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwlll
(
FARPROC16
,
WORD
,
WORD
,
LONG
,
LONG
,
LONG
);
extern
WORD
CALLBACK
CallTo16_word_wwwww
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
CallTo16_word_wwwww
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
WORD
,
WORD
);
...
@@ -158,7 +162,6 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
...
@@ -158,7 +162,6 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
(
void
*
)
CallTo16_word_www
,
/* CallLoadAppSegProc */
(
void
*
)
CallTo16_word_www
,
/* CallLoadAppSegProc */
(
void
*
)
CallTo16_word_www
,
/* CallLocalNotifyFunc */
(
void
*
)
CallTo16_word_www
,
/* CallLocalNotifyFunc */
(
void
*
)
CallTo16_word_www
,
/* CallResourceHandlerProc */
(
void
*
)
CallTo16_word_www
,
/* CallResourceHandlerProc */
(
void
*
)
CallTo16_word_wwwl
,
/* CallPostAppMessageProc */
(
void
*
)
CallTo16_long_l
,
/* CallWOWCallbackProc */
(
void
*
)
CallTo16_long_l
,
/* CallWOWCallbackProc */
THUNK_WOWCallback16Ex
,
/* CallWOWCallback16Ex */
THUNK_WOWCallback16Ex
,
/* CallWOWCallback16Ex */
(
void
*
)
CallTo16_long_l
,
/* CallASPIPostProc */
(
void
*
)
CallTo16_long_l
,
/* CallASPIPostProc */
...
@@ -850,6 +853,57 @@ WORD WINAPI WIN16_CreateSystemTimer( WORD rate, FARPROC16 proc )
...
@@ -850,6 +853,57 @@ WORD WINAPI WIN16_CreateSystemTimer( WORD rate, FARPROC16 proc )
return
timer
;
return
timer
;
}
}
/***********************************************************************
* THUNK_InitCallout
*/
void
THUNK_InitCallout
(
void
)
{
HMODULE32
hModule
=
GetModuleHandle32A
(
"USER32"
);
if
(
hModule
)
{
#define GETADDR( var, name ) \
*(FARPROC32 *)&Callout.##var = GetProcAddress32( hModule, name )
GETADDR
(
PeekMessage32A
,
"PeekMessageA"
);
GETADDR
(
PeekMessage32W
,
"PeekMessageW"
);
GETADDR
(
GetMessage32A
,
"GetMessageA"
);
GETADDR
(
GetMessage32W
,
"GetMessageW"
);
GETADDR
(
SendMessage32A
,
"SendMessageA"
);
GETADDR
(
SendMessage32W
,
"SendMessageW"
);
GETADDR
(
PostMessage32A
,
"PostMessageA"
);
GETADDR
(
PostMessage32W
,
"PostMessageW"
);
GETADDR
(
PostThreadMessage32A
,
"PostThreadMessageA"
);
GETADDR
(
PostThreadMessage32W
,
"PostThreadMessageW"
);
GETADDR
(
TranslateMessage32
,
"TranslateMessage"
);
GETADDR
(
DispatchMessage32W
,
"DispatchMessageW"
);
GETADDR
(
DispatchMessage32A
,
"DispatchMessageA"
);
GETADDR
(
RedrawWindow32
,
"RedrawWindow"
);
#undef GETADDR
}
hModule
=
GetModuleHandle16
(
"USER"
);
if
(
hModule
)
{
#define GETADDR( var, name, thk ) \
*(FARPROC32 *)&Callout.##var = (FARPROC32) \
THUNK_Alloc( WIN32_GetProcAddress16( hModule, name ), \
(RELAY)CallTo16_##thk )
GETADDR
(
PeekMessage16
,
"PeekMessage"
,
word_lwwww
);
GETADDR
(
GetMessage16
,
"GetMessage"
,
word_lwww
);
GETADDR
(
SendMessage16
,
"SendMessage"
,
long_wwwl
);
GETADDR
(
PostMessage16
,
"PostMessage"
,
word_wwwl
);
GETADDR
(
PostAppMessage16
,
"PostAppMessage"
,
word_wwwl
);
GETADDR
(
TranslateMessage16
,
"TranslateMessage"
,
word_l
);
GETADDR
(
DispatchMessage16
,
"DispatchMessage"
,
long_l
);
GETADDR
(
RedrawWindow16
,
"RedrawWindow"
,
word_wlww
);
GETADDR
(
InitThreadInput
,
"InitThreadInput"
,
word_ww
);
GETADDR
(
UserYield
,
"UserYield"
,
word_
);
#undef GETADDR
}
}
/***********************************************************************
/***********************************************************************
* 16->32 Flat Thunk routines:
* 16->32 Flat Thunk routines:
...
...
include/callback.h
View file @
61439d27
...
@@ -38,7 +38,6 @@ typedef struct
...
@@ -38,7 +38,6 @@ typedef struct
WORD
(
CALLBACK
*
CallLoadAppSegProc
)(
FARPROC16
,
HANDLE16
,
HFILE16
,
WORD
);
WORD
(
CALLBACK
*
CallLoadAppSegProc
)(
FARPROC16
,
HANDLE16
,
HFILE16
,
WORD
);
WORD
(
CALLBACK
*
CallLocalNotifyFunc
)(
FARPROC16
,
WORD
,
HLOCAL16
,
WORD
);
WORD
(
CALLBACK
*
CallLocalNotifyFunc
)(
FARPROC16
,
WORD
,
HLOCAL16
,
WORD
);
HGLOBAL16
(
CALLBACK
*
CallResourceHandlerProc
)(
FARPROC16
,
HGLOBAL16
,
HMODULE16
,
HRSRC16
);
HGLOBAL16
(
CALLBACK
*
CallResourceHandlerProc
)(
FARPROC16
,
HGLOBAL16
,
HMODULE16
,
HRSRC16
);
BOOL16
(
CALLBACK
*
CallPostAppMessageProc
)(
FARPROC16
,
HTASK16
,
UINT16
,
WPARAM16
,
LPARAM
);
DWORD
(
CALLBACK
*
CallWOWCallbackProc
)(
FARPROC16
,
DWORD
);
DWORD
(
CALLBACK
*
CallWOWCallbackProc
)(
FARPROC16
,
DWORD
);
BOOL32
(
CALLBACK
*
CallWOWCallback16Ex
)(
FARPROC16
,
DWORD
,
DWORD
,
LPVOID
,
BOOL32
(
CALLBACK
*
CallWOWCallback16Ex
)(
FARPROC16
,
DWORD
,
DWORD
,
LPVOID
,
LPDWORD
);
LPDWORD
);
...
@@ -71,4 +70,62 @@ typedef struct
...
@@ -71,4 +70,62 @@ typedef struct
extern
const
CALLBACKS_TABLE
*
Callbacks
;
extern
const
CALLBACKS_TABLE
*
Callbacks
;
typedef
struct
{
BOOL16
WINAPI
(
*
PeekMessage16
)(
LPMSG16
msg
,
HWND16
hwnd
,
UINT16
first
,
UINT16
last
,
UINT16
flags
);
BOOL32
WINAPI
(
*
PeekMessage32A
)(
LPMSG32
lpmsg
,
HWND32
hwnd
,
UINT32
min
,
UINT32
max
,
UINT32
wRemoveMsg
);
BOOL32
WINAPI
(
*
PeekMessage32W
)(
LPMSG32
lpmsg
,
HWND32
hwnd
,
UINT32
min
,
UINT32
max
,
UINT32
wRemoveMsg
);
BOOL16
WINAPI
(
*
GetMessage16
)(
SEGPTR
msg
,
HWND16
hwnd
,
UINT16
first
,
UINT16
last
);
BOOL32
WINAPI
(
*
GetMessage32A
)(
MSG32
*
lpmsg
,
HWND32
hwnd
,
UINT32
min
,
UINT32
max
);
BOOL32
WINAPI
(
*
GetMessage32W
)(
MSG32
*
lpmsg
,
HWND32
hwnd
,
UINT32
min
,
UINT32
max
);
LRESULT
WINAPI
(
*
SendMessage16
)(
HWND16
hwnd
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
(
*
SendMessage32A
)(
HWND32
hwnd
,
UINT32
msg
,
WPARAM32
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
(
*
SendMessage32W
)(
HWND32
hwnd
,
UINT32
msg
,
WPARAM32
wParam
,
LPARAM
lParam
);
BOOL16
WINAPI
(
*
PostMessage16
)(
HWND16
hwnd
,
UINT16
message
,
WPARAM16
wParam
,
LPARAM
lParam
);
BOOL32
WINAPI
(
*
PostMessage32A
)(
HWND32
hwnd
,
UINT32
message
,
WPARAM32
wParam
,
LPARAM
lParam
);
BOOL32
WINAPI
(
*
PostMessage32W
)(
HWND32
hwnd
,
UINT32
message
,
WPARAM32
wParam
,
LPARAM
lParam
);
BOOL16
WINAPI
(
*
PostAppMessage16
)(
HTASK16
hTask
,
UINT16
message
,
WPARAM16
wParam
,
LPARAM
lParam
);
BOOL32
WINAPI
(
*
PostThreadMessage32A
)(
DWORD
idThread
,
UINT32
message
,
WPARAM32
wParam
,
LPARAM
lParam
);
BOOL32
WINAPI
(
*
PostThreadMessage32W
)(
DWORD
idThread
,
UINT32
message
,
WPARAM32
wParam
,
LPARAM
lParam
);
BOOL16
WINAPI
(
*
TranslateMessage16
)(
const
MSG16
*
msg
);
BOOL32
WINAPI
(
*
TranslateMessage32
)(
const
MSG32
*
msg
);
LONG
WINAPI
(
*
DispatchMessage16
)(
const
MSG16
*
msg
);
LONG
WINAPI
(
*
DispatchMessage32A
)(
const
MSG32
*
msg
);
LONG
WINAPI
(
*
DispatchMessage32W
)(
const
MSG32
*
msg
);
BOOL16
WINAPI
(
*
RedrawWindow16
)(
HWND16
hwnd
,
const
RECT16
*
rectUpdate
,
HRGN16
hrgnUpdate
,
UINT16
flags
);
BOOL32
WINAPI
(
*
RedrawWindow32
)(
HWND32
hwnd
,
const
RECT32
*
rectUpdate
,
HRGN32
hrgnUpdate
,
UINT32
flags
);
HQUEUE16
WINAPI
(
*
InitThreadInput
)(
WORD
unknown
,
WORD
flags
);
void
WINAPI
(
*
UserYield
)(
void
);
}
CALLOUT_TABLE
;
extern
CALLOUT_TABLE
Callout
;
#endif
/* __WINE_CALLBACK_H */
#endif
/* __WINE_CALLBACK_H */
misc/callback.c
View file @
61439d27
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "callback.h"
#include "callback.h"
#include "task.h"
#include "task.h"
#include "syslevel.h"
#include "syslevel.h"
#include "queue.h"
/**********************************************************************
/**********************************************************************
...
@@ -271,7 +272,6 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
...
@@ -271,7 +272,6 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
CALLBACK_CallLoadAppSegProc
,
/* CallLoadAppSegProc */
CALLBACK_CallLoadAppSegProc
,
/* CallLoadAppSegProc */
CALLBACK_CallLocalNotifyFunc
,
/* CallLocalNotifyFunc */
CALLBACK_CallLocalNotifyFunc
,
/* CallLocalNotifyFunc */
CALLBACK_CallResourceHandlerProc
,
/* CallResourceHandlerProc */
CALLBACK_CallResourceHandlerProc
,
/* CallResourceHandlerProc */
NULL
,
/* CallPostAppMessageProc */
CALLBACK_CallWOWCallbackProc
,
/* CallWOWCallbackProc */
CALLBACK_CallWOWCallbackProc
,
/* CallWOWCallbackProc */
CALLBACK_CallWOWCallback16Ex
,
/* CallWOWCallback16Ex */
CALLBACK_CallWOWCallback16Ex
,
/* CallWOWCallback16Ex */
CALLBACK_CallASPIPostProc
,
/* CallASPIPostProc */
CALLBACK_CallASPIPostProc
,
/* CallASPIPostProc */
...
@@ -291,3 +291,23 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
...
@@ -291,3 +291,23 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
const
CALLBACKS_TABLE
*
Callbacks
=
&
CALLBACK_WinelibTable
;
const
CALLBACKS_TABLE
*
Callbacks
=
&
CALLBACK_WinelibTable
;
/**********************************************************************
* CALLOUT_Table
*
* The callout function table for Winelib
*/
CALLOUT_TABLE
Callout
=
{
PeekMessage16
,
PeekMessage32A
,
PeekMessage32W
,
GetMessage16
,
GetMessage32A
,
GetMessage32W
,
SendMessage16
,
SendMessage32A
,
SendMessage32W
,
PostMessage16
,
PostMessage32A
,
PostMessage32W
,
PostAppMessage16
,
PostThreadMessage32A
,
PostThreadMessage32W
,
TranslateMessage16
,
TranslateMessage32
,
DispatchMessage16
,
DispatchMessage32A
,
DispatchMessage32W
,
RedrawWindow16
,
RedrawWindow32
,
InitThreadInput
,
UserYield
};
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