Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8dbffe70
Commit
8dbffe70
authored
Jul 24, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Jul 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed MODULE_GetWndProcEntry16().
Use 32-bit window procedures in COMMDLG instead.
parent
1a97191e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
140 additions
and
89 deletions
+140
-89
colordlg.c
dlls/commdlg/colordlg.c
+23
-3
filedlg.c
dlls/commdlg/filedlg.c
+48
-4
finddlg.c
dlls/commdlg/finddlg.c
+48
-4
fontdlg.c
dlls/commdlg/fontdlg.c
+2
-2
printdlg.c
dlls/commdlg/printdlg.c
+3
-3
wprocs.spec
if1632/wprocs.spec
+0
-9
commdlg.h
include/commdlg.h
+0
-6
module.h
include/module.h
+0
-1
module.c
loader/module.c
+0
-55
utthunk.c
relay32/utthunk.c
+16
-2
No files found.
dlls/commdlg/colordlg.c
View file @
8dbffe70
...
...
@@ -27,6 +27,27 @@ DEFAULT_DEBUG_CHANNEL(commdlg)
#include "cdlg.h"
/***********************************************************************
* ColorDlgProc [internal]
*
* FIXME: Convert to real 32-bit message processing
*/
static
LRESULT
WINAPI
ColorDlgProc
(
HWND
hDlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UINT16
msg16
;
MSGPARAM16
mp16
;
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
ColorDlgProc16
(
(
HWND16
)
hDlg
,
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
}
/***********************************************************************
* ChooseColor (COMMDLG.5)
*/
BOOL16
WINAPI
ChooseColor16
(
LPCHOOSECOLOR16
lpChCol
)
...
...
@@ -85,8 +106,8 @@ BOOL16 WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol)
hInst
=
GetWindowLongA
(
lpChCol
->
hwndOwner
,
GWL_HINSTANCE
);
hwndDialog
=
DIALOG_CreateIndirect
(
hInst
,
template
,
win32Format
,
lpChCol
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"ColorDlgProc"
)
,
(
DWORD
)
lpChCol
,
WIN_PROC_
16
);
(
DLGPROC16
)
ColorDlgProc
,
(
DWORD
)
lpChCol
,
WIN_PROC_
32A
);
if
(
hwndDialog
)
bRet
=
DIALOG_DoDialogBox
(
hwndDialog
,
lpChCol
->
hwndOwner
);
if
(
hDlgTmpl
)
FreeResource16
(
hDlgTmpl
);
...
...
@@ -1165,7 +1186,6 @@ LRESULT WINAPI ColorDlgProc16(HWND16 hDlg, UINT16 message,
return
FALSE
;
}
/***********************************************************************
* ChooseColorA (COMDLG32.1)
*/
...
...
dlls/commdlg/filedlg.c
View file @
8dbffe70
...
...
@@ -74,6 +74,50 @@ static BOOL FileDlg_Init(void)
}
/***********************************************************************
* FileOpenDlgProc [internal]
*
* FIXME: Convert to real 32-bit message processing
*/
static
LRESULT
WINAPI
FileOpenDlgProc
(
HWND
hDlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UINT16
msg16
;
MSGPARAM16
mp16
;
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
FileOpenDlgProc16
(
(
HWND16
)
hDlg
,
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
}
/***********************************************************************
* FileSaveDlgProc [internal]
*
* FIXME: Convert to real 32-bit message processing
*/
static
LRESULT
WINAPI
FileSaveDlgProc
(
HWND
hDlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UINT16
msg16
;
MSGPARAM16
mp16
;
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
FileSaveDlgProc16
(
(
HWND16
)
hDlg
,
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
}
/***********************************************************************
* GetOpenFileName16 (COMMDLG.1)
*
* Creates a dialog box for the user to select a file to open.
...
...
@@ -199,8 +243,8 @@ BOOL16 WINAPI GetOpenFileName16(
/* FIXME: doesn't handle win32 format correctly yet */
hwndDialog
=
DIALOG_CreateIndirect
(
hInst
,
template
,
win32Format
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"FileOpenDlgProc"
)
,
ofn
,
WIN_PROC_
16
);
(
DLGPROC16
)
FileOpenDlgProc
,
ofn
,
WIN_PROC_
32A
);
if
(
hwndDialog
)
bRet
=
DIALOG_DoDialogBox
(
hwndDialog
,
lpofn
->
hwndOwner
);
if
(
str1
)
...
...
@@ -361,8 +405,8 @@ BOOL16 WINAPI GetSaveFileName16(
hwndDialog
=
DIALOG_CreateIndirect
(
hInst
,
template
,
win32Format
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"FileSaveDlgProc"
)
,
ofn
,
WIN_PROC_
16
);
(
DLGPROC16
)
FileSaveDlgProc
,
ofn
,
WIN_PROC_
32A
);
if
(
hwndDialog
)
bRet
=
DIALOG_DoDialogBox
(
hwndDialog
,
lpofn
->
hwndOwner
);
if
(
str1
)
...
...
dlls/commdlg/finddlg.c
View file @
8dbffe70
...
...
@@ -25,6 +25,50 @@ DEFAULT_DEBUG_CHANNEL(commdlg)
#include "cdlg.h"
/***********************************************************************
* FindTextDlgProc [internal]
*
* FIXME: Convert to real 32-bit message processing
*/
static
LRESULT
WINAPI
FindTextDlgProc
(
HWND
hDlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UINT16
msg16
;
MSGPARAM16
mp16
;
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
FindTextDlgProc16
(
(
HWND16
)
hDlg
,
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
}
/***********************************************************************
* ReplaceTextDlgProc [internal]
*
* FIXME: Convert to real 32-bit message processing
*/
static
LRESULT
WINAPI
ReplaceTextDlgProc
(
HWND
hDlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UINT16
msg16
;
MSGPARAM16
mp16
;
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
ReplaceTextDlgProc16
(
(
HWND16
)
hDlg
,
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hDlg
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
}
/***********************************************************************
* FindText16 (COMMDLG.11)
*/
HWND16
WINAPI
FindText16
(
SEGPTR
find
)
...
...
@@ -53,8 +97,8 @@ HWND16 WINAPI FindText16( SEGPTR find )
}
hInst
=
GetWindowLongA
(
lpFind
->
hwndOwner
,
GWL_HINSTANCE
);
return
DIALOG_CreateIndirect
(
hInst
,
ptr
,
TRUE
,
lpFind
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"FindTextDlgProc"
)
,
find
,
WIN_PROC_
16
);
(
DLGPROC16
)
FindTextDlgProc
,
find
,
WIN_PROC_
32A
);
}
...
...
@@ -87,8 +131,8 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
}
hInst
=
GetWindowLongA
(
lpFind
->
hwndOwner
,
GWL_HINSTANCE
);
return
DIALOG_CreateIndirect
(
hInst
,
ptr
,
TRUE
,
lpFind
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"ReplaceTextDlgProc"
)
,
find
,
WIN_PROC_
16
);
(
DLGPROC16
)
ReplaceTextDlgProc
,
find
,
WIN_PROC_
32A
);
}
...
...
dlls/commdlg/fontdlg.c
View file @
8dbffe70
...
...
@@ -122,8 +122,8 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
hwndDialog
=
DIALOG_CreateIndirect
(
hInst
,
template
,
win32Format
,
lpChFont
->
hwndOwner
,
(
DLGPROC16
)
MODULE_GetWndProcEntry16
(
"FormatCharDlgProc"
)
,
(
DWORD
)
lpChFont
,
WIN_PROC_
16
);
(
DLGPROC16
)
FormatCharDlgProcA
,
(
DWORD
)
lpChFont
,
WIN_PROC_
32A
);
if
(
hwndDialog
)
bRet
=
DIALOG_DoDialogBox
(
hwndDialog
,
lpChFont
->
hwndOwner
);
if
(
hDlgTmpl
)
FreeResource16
(
hDlgTmpl
);
lpChFont
->
lpTemplateName
=
lpTemplateName
;
...
...
dlls/commdlg/printdlg.c
View file @
8dbffe70
...
...
@@ -67,9 +67,9 @@ BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
hwndDialog
=
DIALOG_CreateIndirect
(
hInst
,
template
,
TRUE
,
lpPrint
->
hwndOwner
,
(
DLGPROC16
)((
lpPrint
->
Flags
&
PD_PRINTSETUP
)
?
MODULE_GetWndProcEntry16
(
"PrintSetupDlgProc"
)
:
MODULE_GetWndProcEntry16
(
"PrintDlgProc"
)
),
printdlg
,
WIN_PROC_
16
);
/* FIXME: PrintSetupDlgProc */
PrintDlgProcA
:
PrintDlgProcA
),
printdlg
,
WIN_PROC_
32A
);
if
(
hwndDialog
)
bRet
=
DIALOG_DoDialogBox
(
hwndDialog
,
lpPrint
->
hwndOwner
);
return
bRet
;
}
...
...
if1632/wprocs.spec
View file @
8dbffe70
name wprocs
type win16
14 pascal FileOpenDlgProc(word word word long) FileOpenDlgProc16
15 pascal FileSaveDlgProc(word word word long) FileSaveDlgProc16
16 pascal ColorDlgProc(word word word long) ColorDlgProc16
17 pascal FindTextDlgProc(word word word long) FindTextDlgProc16
18 pascal ReplaceTextDlgProc(word word word long) ReplaceTextDlgProc16
19 pascal PrintSetupDlgProc(word word word long) PrintSetupDlgProc16
20 pascal PrintDlgProc(word word word long) PrintDlgProc16
23 pascal UTGlue16(ptr long ptr long) UTGlue16
24 pascal16 TASK_Reschedule() TASK_Reschedule
27 pascal EntryAddrProc(word word) NE_GetEntryPoint
28 pascal MyAlloc(word word word) NE_AllocateSegment
30 pascal FormatCharDlgProc(word word word long) FormatCharDlgProc16
# Interrupt vectors 0-255 are ordinals 100-355
# The 'word' parameter are the flags pushed on the stack by the interrupt
...
...
include/commdlg.h
View file @
8dbffe70
...
...
@@ -627,13 +627,7 @@ LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPAR
LRESULT
WINAPI
FileSaveDlgProc16
(
HWND16
hWnd
,
UINT16
wMsg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
ColorDlgProc16
(
HWND16
hWnd
,
UINT16
wMsg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
FindTextDlgProc16
(
HWND16
hWnd
,
UINT16
wMsg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
FindTextDlgProcA
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
FindTextDlgProcW
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
#define FindTextDlgProc WINELIB_NAME_AW(FindTextDlgProc)
LRESULT
WINAPI
ReplaceTextDlgProc16
(
HWND16
hWnd
,
UINT16
wMsg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
ReplaceTextDlgProcA
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
ReplaceTextDlgProcW
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
#define ReplaceTextProc WINELIB_NAME_AW(ReplaceTextDlgProc)
LRESULT
WINAPI
PrintDlgProc16
(
HWND16
hWnd
,
UINT16
wMsg
,
WPARAM16
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
PrintDlgProcA
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
LRESULT
WINAPI
PrintDlgProcW
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
...
...
include/module.h
View file @
8dbffe70
...
...
@@ -184,7 +184,6 @@ extern WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD fl
extern
BOOL
MODULE_FreeLibrary
(
WINE_MODREF
*
wm
);
extern
WINE_MODREF
*
MODULE_FindModule
(
LPCSTR
path
);
extern
HMODULE
MODULE_CreateDummyModule
(
const
OFSTRUCT
*
ofs
,
LPCSTR
modName
);
extern
FARPROC16
MODULE_GetWndProcEntry16
(
const
char
*
name
);
extern
FARPROC16
WINAPI
WIN32_GetProcAddress16
(
HMODULE
hmodule
,
LPCSTR
name
);
extern
SEGPTR
WINAPI
HasGPHandler16
(
SEGPTR
address
);
extern
void
MODULE_WalkModref
(
DWORD
id
);
...
...
loader/module.c
View file @
8dbffe70
...
...
@@ -420,61 +420,6 @@ HMODULE MODULE_CreateDummyModule( const OFSTRUCT *ofs, LPCSTR modName )
}
/***********************************************************************
* MODULE_GetWndProcEntry16 (not a Windows API function)
*
* Return an entry point from the WPROCS dll.
*/
FARPROC16
MODULE_GetWndProcEntry16
(
LPCSTR
name
)
{
FARPROC16
ret
=
NULL
;
if
(
__winelib
)
{
/* FIXME: hack for Winelib */
extern
LRESULT
ColorDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
FileOpenDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
FileSaveDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
FindTextDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
PrintDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
PrintSetupDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
extern
LRESULT
ReplaceTextDlgProc16
(
HWND16
,
UINT16
,
WPARAM16
,
LPARAM
);
if
(
!
strcmp
(
name
,
"ColorDlgProc"
))
return
(
FARPROC16
)
ColorDlgProc16
;
if
(
!
strcmp
(
name
,
"FileOpenDlgProc"
))
return
(
FARPROC16
)
FileOpenDlgProc16
;
if
(
!
strcmp
(
name
,
"FileSaveDlgProc"
))
return
(
FARPROC16
)
FileSaveDlgProc16
;
if
(
!
strcmp
(
name
,
"FindTextDlgProc"
))
return
(
FARPROC16
)
FindTextDlgProc16
;
if
(
!
strcmp
(
name
,
"PrintDlgProc"
))
return
(
FARPROC16
)
PrintDlgProc16
;
if
(
!
strcmp
(
name
,
"PrintSetupDlgProc"
))
return
(
FARPROC16
)
PrintSetupDlgProc16
;
if
(
!
strcmp
(
name
,
"ReplaceTextDlgProc"
))
return
(
FARPROC16
)
ReplaceTextDlgProc16
;
FIXME_
(
module
)(
"No mapping for %s(), add one in library/miscstubs.c
\n
"
,
name
);
assert
(
FALSE
);
return
NULL
;
}
else
{
WORD
ordinal
;
static
HMODULE
hModule
=
0
;
if
(
!
hModule
)
hModule
=
GetModuleHandle16
(
"WPROCS"
);
ordinal
=
NE_GetOrdinal
(
hModule
,
name
);
if
(
!
(
ret
=
NE_GetEntryPoint
(
hModule
,
ordinal
)))
{
WARN_
(
module
)(
"%s not found
\n
"
,
name
);
assert
(
FALSE
);
}
}
return
ret
;
}
/**********************************************************************
* MODULE_FindModule32
*
...
...
relay32/utthunk.c
View file @
8dbffe70
...
...
@@ -4,6 +4,7 @@
* Copyright 1999 Ulrich Weigand
*/
#include "wine/winbase16.h"
#include "windef.h"
#include "heap.h"
#include "module.h"
...
...
@@ -139,7 +140,20 @@ static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefin
static
UTINFO
*
UTAlloc
(
HMODULE
hModule
,
HMODULE16
hModule16
,
FARPROC16
target16
,
FARPROC
target32
)
{
UTINFO
*
ut
=
HeapAlloc
(
SegptrHeap
,
HEAP_ZERO_MEMORY
,
sizeof
(
UTINFO
)
);
static
FARPROC16
UTGlue16_Segptr
=
NULL
;
UTINFO
*
ut
;
if
(
!
UTGlue16_Segptr
)
{
HMODULE16
hModule
=
GetModuleHandle16
(
"WPROCS"
);
int
ordinal
=
NE_GetOrdinal
(
hModule
,
"UTGlue16"
);
if
(
hModule
&&
ordinal
)
UTGlue16_Segptr
=
NE_GetEntryPoint
(
hModule
,
ordinal
);
if
(
!
UTGlue16_Segptr
)
return
NULL
;
}
ut
=
HeapAlloc
(
SegptrHeap
,
HEAP_ZERO_MEMORY
,
sizeof
(
UTINFO
)
);
if
(
!
ut
)
return
NULL
;
ut
->
hModule
=
hModule
;
...
...
@@ -150,7 +164,7 @@ static UTINFO *UTAlloc( HMODULE hModule, HMODULE16 hModule16,
ut
->
ut16
.
target
=
(
DWORD
)
target32
;
ut
->
ut16
.
pushl_eax
=
0x50
;
ut
->
ut16
.
ljmp
=
0xea
;
ut
->
ut16
.
utglue16
=
(
DWORD
)
MODULE_GetWndProcEntry16
(
"UTGlue16"
)
;
ut
->
ut16
.
utglue16
=
(
DWORD
)
UTGlue16_Segptr
;
ut
->
ut32
.
popl_eax
=
0x58
;
ut
->
ut32
.
pushl
=
0x68
;
...
...
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