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
ac7efef3
Commit
ac7efef3
authored
Nov 27, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed GetProcAddress16 and 16-bit resource functions to take normal
pointers instead of SEGPTRs. Removed WIN16_GetTempDrive.
parent
cb45438b
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
118 additions
and
198 deletions
+118
-198
menu.c
controls/menu.c
+7
-10
colordlg.c
dlls/commdlg/colordlg.c
+3
-3
filedlg.c
dlls/commdlg/filedlg.c
+18
-16
finddlg.c
dlls/commdlg/finddlg.c
+4
-4
fontdlg.c
dlls/commdlg/fontdlg.c
+4
-6
kernel.spec
dlls/kernel/kernel.spec
+2
-2
ifs.c
dlls/ole32/ifs.c
+1
-1
storage.c
dlls/ole32/storage.c
+3
-3
shell.c
dlls/shell32/shell.c
+2
-2
resource.c
dlls/user/resource.c
+4
-9
user.spec
dlls/user/user.spec
+10
-10
lolvldrv.c
dlls/winmm/lolvldrv.c
+2
-1
mmsystem.c
dlls/winmm/mmsystem.c
+1
-1
directory.c
files/directory.c
+17
-22
prtdrv.c
graphics/win16drv/prtdrv.c
+1
-1
thunk.c
if1632/thunk.c
+1
-1
winbase16.h
include/wine/winbase16.h
+2
-4
winuser16.h
include/wine/winuser16.h
+9
-33
module.c
loader/module.c
+4
-18
resource.c
loader/resource.c
+2
-5
cursoricon.c
windows/cursoricon.c
+6
-9
dialog.c
windows/dialog.c
+10
-26
driver.c
windows/driver.c
+1
-1
win.c
windows/win.c
+4
-10
No files found.
controls/menu.c
View file @
ac7efef3
...
...
@@ -4229,29 +4229,26 @@ HMENU16 WINAPI LookupMenuHandle16( HMENU16 hmenu, INT16 id )
/**********************************************************************
* LoadMenu16 (USER.150)
*/
HMENU16
WINAPI
LoadMenu16
(
HINSTANCE16
instance
,
SEGP
TR
name
)
HMENU16
WINAPI
LoadMenu16
(
HINSTANCE16
instance
,
LPCS
TR
name
)
{
HRSRC16
hRsrc
;
HGLOBAL16
handle
;
HMENU16
hMenu
;
TRACE
(
"(%04x,%s)
\n
"
,
instance
,
debugres_a
(
name
)
);
if
(
HIWORD
(
name
))
{
char
*
str
=
(
char
*
)
PTR_SEG_TO_LIN
(
name
);
TRACE
(
"(%04x,'%s')
\n
"
,
instance
,
str
);
if
(
str
[
0
]
==
'#'
)
name
=
(
SEGPTR
)
atoi
(
str
+
1
);
if
(
name
[
0
]
==
'#'
)
name
=
(
LPCSTR
)
atoi
(
name
+
1
);
}
else
TRACE
(
"(%04x,%04x)
\n
"
,
instance
,
LOWORD
(
name
));
if
(
!
name
)
return
0
;
/* check for Win32 module */
if
(
HIWORD
(
instance
))
return
LoadMenuA
(
instance
,
PTR_SEG_TO_LIN
(
name
));
if
(
HIWORD
(
instance
))
return
LoadMenuA
(
instance
,
name
);
instance
=
GetExePtr
(
instance
);
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
name
,
RT_MENU
16
)))
return
0
;
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
name
,
RT_MENU
A
)))
return
0
;
if
(
!
(
handle
=
LoadResource16
(
instance
,
hRsrc
)))
return
0
;
hMenu
=
LoadMenuIndirect16
(
LockResource16
(
handle
));
FreeResource16
(
handle
);
...
...
dlls/commdlg/colordlg.c
View file @
ac7efef3
...
...
@@ -1372,8 +1372,8 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
{
HANDLE16
hResInfo
;
if
(
!
(
hResInfo
=
FindResource16
(
lpChCol
->
hInstance
,
lpChCol
->
lpTemplateName
,
RT_DIALOG
16
)))
PTR_SEG_TO_LIN
(
lpChCol
->
lpTemplateName
)
,
RT_DIALOG
A
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
...
...
@@ -1421,7 +1421,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
hDlgTmpl16
=
hGlobal16
;
}
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
8
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
8
);
hInst
=
GetWindowLongA
(
lpChCol
->
hwndOwner
,
GWL_HINSTANCE
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
hDlgTmpl16
,
lpChCol
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lpChCol
);
...
...
dlls/commdlg/filedlg.c
View file @
ac7efef3
...
...
@@ -97,12 +97,12 @@ static BOOL FileDlg_Init(void)
CURSORICONINFO
*
fldrInfo
;
if
(
!
initialized
)
{
if
(
!
hFolder
)
hFolder
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_FOLDER
));
if
(
!
hFolder2
)
hFolder2
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_FOLDER2
));
if
(
!
hFloppy
)
hFloppy
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_FLOPPY
));
if
(
!
hHDisk
)
hHDisk
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_HDISK
));
if
(
!
hCDRom
)
hCDRom
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_CDROM
));
if
(
!
hNet
)
hNet
=
LoadIcon
16
(
0
,
MAKEINTRESOURCE16
(
OIC_NETWORK
));
if
(
!
hFolder
)
hFolder
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_FOLDER
));
if
(
!
hFolder2
)
hFolder2
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_FOLDER2
));
if
(
!
hFloppy
)
hFloppy
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_FLOPPY
));
if
(
!
hHDisk
)
hHDisk
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_HDISK
));
if
(
!
hCDRom
)
hCDRom
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_CDROM
));
if
(
!
hNet
)
hNet
=
LoadIcon
A
(
0
,
MAKEINTRESOURCEA
(
OIC_NETWORK
));
if
(
hFolder
==
0
||
hFolder2
==
0
||
hFloppy
==
0
||
hHDisk
==
0
||
hCDRom
==
0
||
hNet
==
0
)
{
...
...
@@ -205,8 +205,8 @@ BOOL Get16BitsTemplate(LFSPRIVATE lfs)
{
HANDLE16
hResInfo
;
if
(
!
(
hResInfo
=
FindResource16
(
ofn16
->
hInstance
,
ofn16
->
lpTemplateName
,
RT_DIALOG
16
)))
PTR_SEG_TO_LIN
(
ofn16
->
lpTemplateName
)
,
RT_DIALOG
A
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
...
...
@@ -329,7 +329,7 @@ static BOOL FILEDLG_ScanDir(HWND hWnd, LPWSTR newPath)
/* get the list of spec files */
GetDlgItemTextW
(
hWnd
,
edt1
,
buffer
,
sizeof
(
buffer
));
hCursorWait
=
LoadCursorA
(
NULL
,
IDC_WAITA
);
hCursorWait
=
LoadCursorA
(
0
,
IDC_WAITA
);
oldCursor
=
SetCursor
(
hCursorWait
);
/* list of files */
...
...
@@ -459,16 +459,18 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
}
if
(
lpdis
->
CtlType
==
ODT_COMBOBOX
&&
lpdis
->
CtlID
==
cmb2
)
{
char
root
[]
=
"a:"
;
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
BUFFILEALLOC
)))
return
FALSE
;
SendMessageW
(
lpdis
->
hwndItem
,
CB_GETLBTEXT
,
lpdis
->
itemID
,
(
LPARAM
)
str
);
switch
(
DRIVE_GetType
(
str
[
2
]
-
'a'
))
root
[
0
]
+=
str
[
2
]
-
'a'
;
switch
(
GetDriveTypeA
(
root
))
{
case
TYPE_FLOPPY
:
hIcon
=
hFloppy
;
break
;
case
TYPE_CDROM
:
hIcon
=
hCDRom
;
break
;
case
TYPE_NETWORK
:
hIcon
=
hNet
;
break
;
case
TYPE_H
D
:
case
DRIVE_REMOVABLE
:
hIcon
=
hFloppy
;
break
;
case
DRIVE_CDROM
:
hIcon
=
hCDRom
;
break
;
case
DRIVE_REMOTE
:
hIcon
=
hNet
;
break
;
case
DRIVE_FIXE
D
:
default:
hIcon
=
hHDisk
;
break
;
}
if
(
lpdis
->
itemState
&
ODS_SELECTED
)
...
...
@@ -1482,7 +1484,7 @@ BOOL16 WINAPI GetOpenFileName16(
if
(
lfs
)
{
hInst
=
GetWindowLongA
(
lpofn
->
hwndOwner
,
GWL_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
6
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
6
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
lfs
->
hDlgTmpl16
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lfs
);
FILEDLG_DestroyPrivate
(
lfs
);
...
...
@@ -1521,7 +1523,7 @@ BOOL16 WINAPI GetSaveFileName16(
if
(
lfs
)
{
hInst
=
GetWindowLongA
(
lpofn
->
hwndOwner
,
GWL_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
7
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
7
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
lfs
->
hDlgTmpl16
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lfs
);
FILEDLG_DestroyPrivate
(
lfs
);
...
...
dlls/commdlg/finddlg.c
View file @
ac7efef3
...
...
@@ -62,8 +62,8 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr)
{
HANDLE16
hResInfo
;
if
(
!
(
hResInfo
=
FindResource16
(
fr16
->
hInstance
,
fr16
->
lpTemplateName
,
RT_DIALOG
16
)))
PTR_SEG_TO_LIN
(
fr16
->
lpTemplateName
)
,
RT_DIALOG
A
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
...
...
@@ -165,7 +165,7 @@ HWND16 WINAPI FindText16( SEGPTR find )
if
(
FINDDLG_Get16BitsTemplate
(
lfr
))
{
hInst
=
GetWindowLongA
(
lfr
->
fr16
->
hwndOwner
,
GWL_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
13
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
13
);
ret
=
CreateDialogIndirectParam16
(
hInst
,
lfr
->
template
,
lfr
->
fr16
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
find
);
FINDDLG_FreeResources
(
lfr
);
...
...
@@ -195,7 +195,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
if
(
FINDDLG_Get16BitsTemplate
(
lfr
))
{
hInst
=
GetWindowLongA
(
lfr
->
fr16
->
hwndOwner
,
GWL_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
14
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
14
);
ret
=
CreateDialogIndirectParam16
(
hInst
,
lfr
->
template
,
lfr
->
fr16
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
find
);
...
...
dlls/commdlg/fontdlg.c
View file @
ac7efef3
...
...
@@ -92,8 +92,8 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
{
HANDLE16
hResInfo
;
if
(
!
(
hResInfo
=
FindResource16
(
lpChFont
->
hInstance
,
lpChFont
->
lpTemplateName
,
RT_DIALOG
16
)))
PTR_SEG_TO_LIN
(
lpChFont
->
lpTemplateName
)
,
RT_DIALOG
A
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
...
...
@@ -146,7 +146,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
lpTemplateName
=
lpChFont
->
lpTemplateName
;
lpChFont
->
lpTemplateName
=
(
SEGPTR
)
&
cf32a
;
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
SEGP
TR
)
16
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCS
TR
)
16
);
hInst
=
GetWindowLongA
(
lpChFont
->
hwndOwner
,
GWL_HINSTANCE
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
hDlgTmpl16
,
lpChFont
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lpChFont
);
...
...
@@ -367,9 +367,7 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf)
if
(
tm
.
tmWeight
==
fontstyles
[
i
].
weight
&&
tm
.
tmItalic
==
fontstyles
[
i
].
italic
)
/* font successful created ? */
{
char
*
str
=
SEGPTR_STRDUP
(
fontstyles
[
i
].
stname
);
j
=
SendMessage16
(
hwnd
,
CB_ADDSTRING16
,
0
,(
LPARAM
)
SEGPTR_GET
(
str
)
);
SEGPTR_FREE
(
str
);
j
=
SendMessageA
(
hwnd
,
CB_ADDSTRING
,
0
,(
LPARAM
)
fontstyles
[
i
].
stname
);
if
(
j
==
CB_ERR
)
return
1
;
j
=
SendMessage16
(
hwnd
,
CB_SETITEMDATA16
,
j
,
MAKELONG
(
fontstyles
[
i
].
weight
,
fontstyles
[
i
].
italic
));
...
...
dlls/kernel/kernel.spec
View file @
ac7efef3
...
...
@@ -55,7 +55,7 @@ owner kernel32
47 pascal GetModuleHandle(segstr) WIN16_GetModuleHandle
48 pascal16 GetModuleUsage(word) GetModuleUsage16
49 pascal16 GetModuleFileName(word ptr s_word) GetModuleFileName16
50 pascal GetProcAddress(word s
egs
tr) GetProcAddress16
50 pascal GetProcAddress(word str) GetProcAddress16
51 pascal MakeProcInstance(segptr word) MakeProcInstance16
52 pascal16 FreeProcInstance(segptr) FreeProcInstance16
53 stub CallProcInstance
...
...
@@ -98,7 +98,7 @@ owner kernel32
89 pascal lstrcat(segstr str) lstrcat16
90 pascal16 lstrlen(str) lstrlen16
91 register InitTask() InitTask16
92 pascal GetTempDrive(word)
WIN16_
GetTempDrive
92 pascal GetTempDrive(word) GetTempDrive
93 pascal16 GetCodeHandle(segptr) GetCodeHandle16
94 pascal16 DefineHandleTable(word) DefineHandleTable16
95 pascal16 LoadLibrary(str) LoadLibrary16
...
...
dlls/ole32/ifs.c
View file @
ac7efef3
...
...
@@ -207,7 +207,7 @@ IMalloc16_Constructor() {
if
(
!
msegvt16
)
{
msegvt16
=
SEGPTR_NEW
(
ICOM_VTABLE
(
IMalloc16
));
#define VTENT(x) msegvt16->fn##x = (void*)
WIN32_
GetProcAddress16(hcomp,"IMalloc16_"#x);assert(msegvt16->fn##x)
#define VTENT(x) msegvt16->fn##x = (void*)GetProcAddress16(hcomp,"IMalloc16_"#x);assert(msegvt16->fn##x)
VTENT
(
QueryInterface
);
VTENT
(
AddRef
);
VTENT
(
Release
);
...
...
dlls/ole32/storage.c
View file @
ac7efef3
...
...
@@ -1102,8 +1102,8 @@ static void _create_istream16(LPSTREAM16 *str) {
if
(
!
strvt16
.
fnQueryInterface
)
{
HMODULE16
wp
=
GetModuleHandle16
(
"STORAGE"
);
if
(
wp
>=
32
)
{
/* FIXME: what is This
WIN32_
GetProcAddress16. Should the name be IStream16_QueryInterface of IStream16_fnQueryInterface */
#define VTENT(xfn) strvt16.fn##xfn = (void*)
WIN32_
GetProcAddress16(wp,"IStream16_"#xfn);assert(strvt16.fn##xfn)
/* FIXME: what is This GetProcAddress16. Should the name be IStream16_QueryInterface of IStream16_fnQueryInterface */
#define VTENT(xfn) strvt16.fn##xfn = (void*)GetProcAddress16(wp,"IStream16_"#xfn);assert(strvt16.fn##xfn)
VTENT
(
QueryInterface
);
VTENT
(
AddRef
);
VTENT
(
Release
);
...
...
@@ -1500,7 +1500,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) {
if
(
!
stvt16
.
fnQueryInterface
)
{
HMODULE16
wp
=
GetModuleHandle16
(
"STORAGE"
);
if
(
wp
>=
32
)
{
#define VTENT(xfn) stvt16.fn##xfn = (void*)
WIN32_
GetProcAddress16(wp,"IStorage16_"#xfn);
#define VTENT(xfn) stvt16.fn##xfn = (void*)GetProcAddress16(wp,"IStorage16_"#xfn);
VTENT
(
QueryInterface
)
VTENT
(
AddRef
)
VTENT
(
Release
)
...
...
dlls/shell32/shell.c
View file @
ac7efef3
...
...
@@ -641,7 +641,7 @@ HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWO
*
lpiIcon
=
6
;
/* generic icon - found nothing */
GetModuleFileName16
(
hInst
,
lpIconPath
,
0x80
);
hIcon
=
LoadIcon
16
(
hInst
,
MAKEINTRESOURCE16
(
*
lpiIcon
));
hIcon
=
LoadIcon
A
(
hInst
,
MAKEINTRESOURCEA
(
*
lpiIcon
));
}
return
hIcon
;
}
...
...
@@ -803,7 +803,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
if
(
!
SHELL_hHook
)
{
HMODULE16
hShell
=
GetModuleHandle16
(
"SHELL"
);
HOOKPROC16
hookProc
=
(
HOOKPROC16
)
GetProcAddress16
(
hShell
,
(
SEGP
TR
)
103
);
HOOKPROC16
hookProc
=
(
HOOKPROC16
)
GetProcAddress16
(
hShell
,
(
LPCS
TR
)
103
);
SHELL_hHook
=
SetWindowsHookEx16
(
WH_SHELL
,
hookProc
,
hShell
,
0
);
if
(
SHELL_hHook
)
{
...
...
dlls/user/resource.c
View file @
ac7efef3
...
...
@@ -32,18 +32,13 @@ typedef struct
/**********************************************************************
* LoadAccelerators16 [USER.177]
*/
HACCEL16
WINAPI
LoadAccelerators16
(
HINSTANCE16
instance
,
SEGP
TR
lpTableName
)
HACCEL16
WINAPI
LoadAccelerators16
(
HINSTANCE16
instance
,
LPCS
TR
lpTableName
)
{
HRSRC16
hRsrc
;
if
(
HIWORD
(
lpTableName
))
TRACE_
(
accel
)(
"%04x '%s'
\n
"
,
instance
,
(
char
*
)
PTR_SEG_TO_LIN
(
lpTableName
)
);
else
TRACE_
(
accel
)(
"%04x %04x
\n
"
,
instance
,
LOWORD
(
lpTableName
)
);
TRACE_
(
accel
)(
"%04x %s
\n
"
,
instance
,
debugres_a
(
lpTableName
)
);
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
lpTableName
,
RT_ACCELERATOR
16
)))
{
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
lpTableName
,
RT_ACCELERATOR
A
)))
{
WARN_
(
accel
)(
"couldn't find accelerator table resource
\n
"
);
return
0
;
}
...
...
@@ -310,7 +305,7 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
TRACE
(
"inst=%04x id=%04x buff=%08x len=%d
\n
"
,
instance
,
resource_id
,
(
int
)
buffer
,
buflen
);
hrsrc
=
FindResource16
(
instance
,
(
SEGPTR
)((
resource_id
>>
4
)
+
1
),
RT_STRING16
);
hrsrc
=
FindResource16
(
instance
,
(
LPCSTR
)((
resource_id
>>
4
)
+
1
),
RT_STRINGA
);
if
(
!
hrsrc
)
return
0
;
hmem
=
LoadResource16
(
instance
,
hrsrc
);
if
(
!
hmem
)
return
0
;
...
...
dlls/user/user.spec
View file @
ac7efef3
...
...
@@ -89,10 +89,10 @@ owner user32
84 pascal16 DrawIcon(word s_word s_word word) DrawIcon16
85 pascal16 DrawText(word str s_word ptr word) DrawText16
86 pascal IconSize() IconSize16 # later versions: BEAR86
87 pascal16 DialogBox(word s
egs
tr word segptr) DialogBox16
87 pascal16 DialogBox(word str word segptr) DialogBox16
88 pascal16 EndDialog(word s_word) EndDialog16
89 pascal16 CreateDialog(word s
egs
tr word segptr) CreateDialog16
90 pascal16 IsDialogMessage(word segptr)
WIN16_
IsDialogMessage16
89 pascal16 CreateDialog(word str word segptr) CreateDialog16
90 pascal16 IsDialogMessage(word segptr) IsDialogMessage16
91 pascal16 GetDlgItem(word word) GetDlgItem16
92 pascal16 SetDlgItemText(word word segstr) SetDlgItemText16
93 pascal16 GetDlgItemText(word word segptr word) GetDlgItemText16
...
...
@@ -152,7 +152,7 @@ owner user32
147 pascal16 SetClipboardViewer(word) SetClipboardViewer16
148 pascal16 GetClipboardViewer() GetClipboardViewer16
149 pascal16 ChangeClipboardChain(word word) ChangeClipboardChain16
150 pascal16 LoadMenu(word s
egs
tr) LoadMenu16
150 pascal16 LoadMenu(word str) LoadMenu16
151 pascal16 CreateMenu() CreateMenu16
152 pascal16 DestroyMenu(word) DestroyMenu16
153 pascal16 ChangeMenu(word word segstr word word) ChangeMenu16
...
...
@@ -175,11 +175,11 @@ owner user32
170 pascal16 ArrangeIconicWindows(word) ArrangeIconicWindows16 # W1.1: CREATECONVERTWINDOW, W2.0: nothing !
171 pascal16 WinHelp(word str word long) WinHelp16 # W1.1: SHOWCONVERTWINDOW, W2.0: nothing !
172 pascal16 SwitchToThisWindow(word word) SwitchToThisWindow16 # W1.1: SETCONVERTWINDOWHEIGHT, W2.0: nothing !
173 pascal16 LoadCursor(word s
egs
tr) LoadCursor16
174 pascal16 LoadIcon(word s
egs
tr) LoadIcon16
175 pascal16 LoadBitmap(word s
egs
tr) LoadBitmap16
173 pascal16 LoadCursor(word str) LoadCursor16
174 pascal16 LoadIcon(word str) LoadIcon16
175 pascal16 LoadBitmap(word str) LoadBitmap16
176 pascal16 LoadString(word word ptr s_word) LoadString16
177 pascal16 LoadAccelerators(word s
egs
tr) LoadAccelerators16
177 pascal16 LoadAccelerators(word str) LoadAccelerators16
178 pascal16 TranslateAccelerator(word word ptr) TranslateAccelerator16
179 pascal16 GetSystemMetrics(s_word) GetSystemMetrics16
180 pascal GetSysColor(word) GetSysColor16
...
...
@@ -243,10 +243,10 @@ owner user32
236 pascal16 GetCapture() GetCapture16
237 pascal16 GetUpdateRgn(word word word) GetUpdateRgn16
238 pascal16 ExcludeUpdateRgn(word word) ExcludeUpdateRgn16
239 pascal16 DialogBoxParam(word s
egs
tr word segptr long) DialogBoxParam16
239 pascal16 DialogBoxParam(word str word segptr long) DialogBoxParam16
240 pascal16 DialogBoxIndirectParam(word word word segptr long)
DialogBoxIndirectParam16
241 pascal16 CreateDialogParam(word s
egs
tr word segptr long) CreateDialogParam16
241 pascal16 CreateDialogParam(word str word segptr long) CreateDialogParam16
242 pascal16 CreateDialogIndirectParam(word ptr word segptr long)
CreateDialogIndirectParam16
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
...
...
dlls/winmm/lolvldrv.c
View file @
ac7efef3
...
...
@@ -8,6 +8,7 @@
#include <string.h>
#include <assert.h>
#include "wine/winbase16.h"
#include "heap.h"
#include "user.h"
/* should be removed asap; used in MMDRV_(Get|Alloc|Free) */
#include "selectors.h"
...
...
@@ -2299,7 +2300,7 @@ static BOOL MMDRV_Install(LPCSTR name, int num, BOOL bIsMapper)
lpDrv
->
bIs32
=
FALSE
;
if
((
hModule
=
GetDriverModuleHandle16
(
lpDrv
->
hDrvr
)))
{
#define A(_x,_y) AA(_x,_y,16,
WIN32_
GetProcAddress16)
#define A(_x,_y) AA(_x,_y,16,GetProcAddress16)
A
(
MMDRV_AUX
,
auxMessage
);
A
(
MMDRV_MIXER
,
mixMessage
);
A
(
MMDRV_MIDIIN
,
midMessage
);
...
...
dlls/winmm/mmsystem.c
View file @
ac7efef3
...
...
@@ -5118,7 +5118,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD d
/* get WINE_mmThreadEntryPoint()
* 2047 is its ordinal in mmsystem.spec
*/
FARPROC16
fp
=
GetProcAddress16
(
GetModuleHandle16
(
"MMSYSTEM"
),
(
SEGP
TR
)
2047
);
FARPROC16
fp
=
GetProcAddress16
(
GetModuleHandle16
(
"MMSYSTEM"
),
(
LPCS
TR
)
2047
);
TRACE
(
"farproc seg=0x%08lx lin=%p
\n
"
,
(
DWORD
)
fp
,
PTR_SEG_TO_LIN
(
fp
));
...
...
files/directory.c
View file @
ac7efef3
...
...
@@ -221,35 +221,30 @@ UINT DIR_GetSystemUnixDir( LPSTR path, UINT count )
/***********************************************************************
* GetTempDrive (KERNEL.92)
* A closer look at krnl386.exe shows what the SDK doesn't mention:
*
* returns:
* AL: driveletter
* AH: ':' - yes, some kernel code even does stosw with
* the returned AX.
* DX: 1 for success
*/
BYTE
WINAPI
GetTempDrive
(
BYTE
ignored
)
UINT
WINAPI
GetTempDrive
(
BYTE
ignored
)
{
char
*
buffer
;
BYTE
ret
;
UINT
len
=
GetTempPathA
(
0
,
NULL
);
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
))
)
return
DRIVE_GetCurrentDrive
()
+
'A'
;
/* FIXME: apparently Windows does something with the ignored byte */
if
(
!
GetTempPathA
(
len
,
buffer
))
buffer
[
0
]
=
'C'
;
ret
=
buffer
[
0
];
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
toupper
(
ret
);
}
UINT
WINAPI
WIN16_GetTempDrive
(
BYTE
ignored
)
{
/* A closer look at krnl386.exe shows what the SDK doesn't mention:
*
* returns:
* AL: driveletter
* AH: ':' - yes, some kernel code even does stosw with
* the returned AX.
* DX: 1 for success
*/
return
MAKELONG
(
GetTempDrive
(
ignored
)
|
(
':'
<<
8
),
1
);
ret
=
DRIVE_GetCurrentDrive
()
+
'A'
;
else
{
/* FIXME: apparently Windows does something with the ignored byte */
if
(
!
GetTempPathA
(
len
,
buffer
))
buffer
[
0
]
=
'C'
;
ret
=
toupper
(
buffer
[
0
]);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
return
MAKELONG
(
ret
|
(
':'
<<
8
),
1
);
}
...
...
graphics/win16drv/prtdrv.c
View file @
ac7efef3
...
...
@@ -55,7 +55,7 @@ static LOADED_PRINTER_DRIVER *gapLoadedPrinterDrivers[MAX_PRINTER_DRIVERS];
static
void
GetPrinterDriverFunctions
(
HINSTANCE16
hInst
,
LOADED_PRINTER_DRIVER
*
pLPD
)
{
#define LoadPrinterDrvFunc(A) pLPD->fn[FUNC_##A] = \
GetProcAddress16(hInst, MAKEINTRESOURCE
16
(ORD_##A))
GetProcAddress16(hInst, MAKEINTRESOURCE
A
(ORD_##A))
LoadPrinterDrvFunc
(
BITBLT
);
LoadPrinterDrvFunc
(
COLORINFO
);
...
...
if1632/thunk.c
View file @
ac7efef3
...
...
@@ -150,7 +150,7 @@ void THUNK_Free( FARPROC thunk )
*/
static
FARPROC
THUNK_GetCalloutThunk
(
NE_MODULE
*
pModule
,
LPSTR
name
,
RELAY
relay
)
{
FARPROC16
proc
=
WIN32_
GetProcAddress16
(
pModule
->
self
,
name
);
FARPROC16
proc
=
GetProcAddress16
(
pModule
->
self
,
name
);
if
(
!
proc
)
return
0
;
if
(
pModule
->
flags
&
NE_FFLAGS_BUILTIN
)
...
...
include/wine/winbase16.h
View file @
ac7efef3
...
...
@@ -137,7 +137,7 @@ BOOL16 WINAPI FindClose16(HANDLE16);
VOID
WINAPI
FreeLibrary16
(
HINSTANCE16
);
HANDLE16
WINAPI
FindFirstFile16
(
LPCSTR
,
LPWIN32_FIND_DATAA
);
BOOL16
WINAPI
FindNextFile16
(
HANDLE16
,
LPWIN32_FIND_DATAA
);
HRSRC16
WINAPI
FindResource16
(
HINSTANCE16
,
SEGPTR
,
SEGP
TR
);
HRSRC16
WINAPI
FindResource16
(
HINSTANCE16
,
LPCSTR
,
LPCS
TR
);
BOOL16
WINAPI
FreeModule16
(
HMODULE16
);
void
WINAPI
FreeProcInstance16
(
FARPROC16
);
BOOL16
WINAPI
FreeResource16
(
HGLOBAL16
);
...
...
@@ -155,7 +155,7 @@ INT16 WINAPI GetPrivateProfileSection16(LPCSTR,LPSTR,UINT16,LPCSTR);
WORD
WINAPI
GetPrivateProfileSectionNames16
(
LPSTR
,
UINT16
,
LPCSTR
);
INT16
WINAPI
GetPrivateProfileString16
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
LPSTR
,
UINT16
,
LPCSTR
);
BOOL16
WINAPI
GetPrivateProfileStruct16
(
LPCSTR
,
LPCSTR
,
LPVOID
,
UINT16
,
LPCSTR
);
FARPROC16
WINAPI
GetProcAddress16
(
HMODULE16
,
SEGP
TR
);
FARPROC16
WINAPI
GetProcAddress16
(
HMODULE16
,
LPCS
TR
);
UINT16
WINAPI
GetProfileInt16
(
LPCSTR
,
LPCSTR
,
INT16
);
INT16
WINAPI
GetProfileSection16
(
LPCSTR
,
LPSTR
,
UINT16
);
WORD
WINAPI
GetProfileSectionNames16
(
LPSTR
,
WORD
);
...
...
@@ -250,8 +250,6 @@ BOOL16 WINAPI WriteProfileSection16(LPCSTR,LPCSTR);
/* Extra functions that don't exist in the Windows API */
HPEN16
WINAPI
GetSysColorPen16
(
INT16
);
UINT
WINAPI
WIN16_GetTempDrive
(
BYTE
);
SEGPTR
WINAPI
WIN16_GlobalLock16
(
HGLOBAL16
);
SEGPTR
WINAPI
WIN16_LockResource16
(
HGLOBAL16
);
LONG
WINAPI
WIN16_hread
(
HFILE16
,
SEGPTR
,
LONG
);
...
...
include/wine/winuser16.h
View file @
ac7efef3
...
...
@@ -437,29 +437,6 @@ typedef struct
#define RT_MESSAGELIST16 MAKEINTRESOURCE16(11)
#define RT_GROUP_CURSOR16 MAKEINTRESOURCE16(12)
#define RT_GROUP_ICON16 MAKEINTRESOURCE16(14)
/* Predefined resources */
#define IDI_APPLICATION16 MAKEINTRESOURCE16(32512)
#define IDI_HAND16 MAKEINTRESOURCE16(32513)
#define IDI_QUESTION16 MAKEINTRESOURCE16(32514)
#define IDI_EXCLAMATION16 MAKEINTRESOURCE16(32515)
#define IDI_ASTERISK16 MAKEINTRESOURCE16(32516)
#define IDC_BUMMER16 MAKEINTRESOURCE16(100)
#define IDC_ARROW16 MAKEINTRESOURCE16(32512)
#define IDC_IBEAM16 MAKEINTRESOURCE16(32513)
#define IDC_WAIT16 MAKEINTRESOURCE16(32514)
#define IDC_CROSS16 MAKEINTRESOURCE16(32515)
#define IDC_UPARROW16 MAKEINTRESOURCE16(32516)
#define IDC_SIZE16 MAKEINTRESOURCE16(32640)
#define IDC_ICON16 MAKEINTRESOURCE16(32641)
#define IDC_SIZENWSE16 MAKEINTRESOURCE16(32642)
#define IDC_SIZENESW16 MAKEINTRESOURCE16(32643)
#define IDC_SIZEWE16 MAKEINTRESOURCE16(32644)
#define IDC_SIZENS16 MAKEINTRESOURCE16(32645)
#define IDC_SIZEALL16 MAKEINTRESOURCE16(32646)
#define IDC_NO16 MAKEINTRESOURCE16(32648)
#define IDC_APPSTARTING16 MAKEINTRESOURCE16(32650)
#define IDC_HELP16 MAKEINTRESOURCE16(32651)
/* CreateWindow() coordinates */
#define CW_USEDEFAULT16 ((INT16)0x8000)
...
...
@@ -662,11 +639,11 @@ BOOL16 WINAPI CopyRect16(RECT16*,const RECT16*);
INT16
WINAPI
CountClipboardFormats16
(
void
);
VOID
WINAPI
CreateCaret16
(
HWND16
,
HBITMAP16
,
INT16
,
INT16
);
HCURSOR16
WINAPI
CreateCursor16
(
HINSTANCE16
,
INT16
,
INT16
,
INT16
,
INT16
,
LPCVOID
,
LPCVOID
);
HWND16
WINAPI
CreateDialog16
(
HINSTANCE16
,
SEGP
TR
,
HWND16
,
DLGPROC16
);
HWND16
WINAPI
CreateDialog16
(
HINSTANCE16
,
LPCS
TR
,
HWND16
,
DLGPROC16
);
HWND16
WINAPI
CreateDialogIndirect16
(
HINSTANCE16
,
LPCVOID
,
HWND16
,
DLGPROC16
);
HWND16
WINAPI
CreateDialogIndirectParam16
(
HINSTANCE16
,
LPCVOID
,
HWND16
,
DLGPROC16
,
LPARAM
);
HWND16
WINAPI
CreateDialogParam16
(
HINSTANCE16
,
SEGP
TR
,
HWND16
,
DLGPROC16
,
LPARAM
);
HWND16
WINAPI
CreateDialogParam16
(
HINSTANCE16
,
LPCS
TR
,
HWND16
,
DLGPROC16
,
LPARAM
);
HICON16
WINAPI
CreateIcon16
(
HINSTANCE16
,
INT16
,
INT16
,
BYTE
,
BYTE
,
LPCVOID
,
LPCVOID
);
HICON16
WINAPI
CreateIconFromResourceEx16
(
LPBYTE
,
UINT16
,
BOOL16
,
DWORD
,
INT16
,
INT16
,
UINT16
);
HMENU16
WINAPI
CreateMenu16
(
void
);
...
...
@@ -687,10 +664,10 @@ BOOL16 WINAPI DestroyCursor16(HCURSOR16);
BOOL16
WINAPI
DestroyIcon16
(
HICON16
);
BOOL16
WINAPI
DestroyMenu16
(
HMENU16
);
BOOL16
WINAPI
DestroyWindow16
(
HWND16
);
INT16
WINAPI
DialogBox16
(
HINSTANCE16
,
SEGP
TR
,
HWND16
,
DLGPROC16
);
INT16
WINAPI
DialogBox16
(
HINSTANCE16
,
LPCS
TR
,
HWND16
,
DLGPROC16
);
INT16
WINAPI
DialogBoxIndirect16
(
HINSTANCE16
,
HANDLE16
,
HWND16
,
DLGPROC16
);
INT16
WINAPI
DialogBoxIndirectParam16
(
HINSTANCE16
,
HANDLE16
,
HWND16
,
DLGPROC16
,
LPARAM
);
INT16
WINAPI
DialogBoxParam16
(
HINSTANCE16
,
SEGP
TR
,
HWND16
,
DLGPROC16
,
LPARAM
);
INT16
WINAPI
DialogBoxParam16
(
HINSTANCE16
,
LPCS
TR
,
HWND16
,
DLGPROC16
,
LPARAM
);
LONG
WINAPI
DispatchMessage16
(
const
MSG16
*
);
LONG
WINAPI
DispatchMessage32_16
(
const
MSG32_16
*
,
BOOL16
);
INT16
WINAPI
DlgDirList16
(
HWND16
,
LPSTR
,
INT16
,
INT16
,
UINT16
);
...
...
@@ -829,11 +806,11 @@ BOOL16 WINAPI IsWindowVisible16(HWND16);
BOOL16
WINAPI
IsZoomed16
(
HWND16
);
BOOL16
WINAPI
KillSystemTimer16
(
HWND16
,
UINT16
);
BOOL16
WINAPI
KillTimer16
(
HWND16
,
UINT16
);
HBITMAP16
WINAPI
LoadBitmap16
(
HANDLE16
,
SEGP
TR
);
HCURSOR16
WINAPI
LoadCursor16
(
HINSTANCE16
,
SEGP
TR
);
HICON16
WINAPI
LoadIcon16
(
HINSTANCE16
,
SEGP
TR
);
HBITMAP16
WINAPI
LoadBitmap16
(
HANDLE16
,
LPCS
TR
);
HCURSOR16
WINAPI
LoadCursor16
(
HINSTANCE16
,
LPCS
TR
);
HICON16
WINAPI
LoadIcon16
(
HINSTANCE16
,
LPCS
TR
);
HANDLE16
WINAPI
LoadImage16
(
HINSTANCE16
,
LPCSTR
,
UINT16
,
INT16
,
INT16
,
UINT16
);
HMENU16
WINAPI
LoadMenu16
(
HINSTANCE16
,
SEGP
TR
);
HMENU16
WINAPI
LoadMenu16
(
HINSTANCE16
,
LPCS
TR
);
HMENU16
WINAPI
LoadMenuIndirect16
(
LPCVOID
);
INT16
WINAPI
LoadString16
(
HINSTANCE16
,
UINT16
,
LPSTR
,
INT16
);
BOOL16
WINAPI
LockWindowUpdate16
(
HWND16
);
...
...
@@ -939,7 +916,7 @@ BOOL16 WINAPI WinHelp16(HWND16,LPCSTR,UINT16,DWORD);
UINT16
WINAPI
WNetAddConnection16
(
LPCSTR
,
LPCSTR
,
LPCSTR
);
INT16
WINAPI
wvsprintf16
(
LPSTR
,
LPCSTR
,
LPCVOID
);
BOOL16
WINAPI
DrawState16A
(
HDC16
,
HBRUSH16
,
DRAWSTATEPROC16
,
LPARAM
,
WPARAM16
,
INT16
,
INT16
,
INT16
,
INT16
,
UINT16
);
BOOL16
WINAPI
IsDialogMessage16
(
HWND16
,
LPMSG16
);
BOOL16
WINAPI
IsDialogMessage16
(
HWND16
,
SEGPTR
);
INT16
WINAPI
GetCommError16
(
INT16
,
LPCOMSTAT16
);
BOOL16
WINAPI
BuildCommDCB16
(
LPCSTR
,
LPDCB16
);
INT16
WINAPI
GetCommState16
(
INT16
,
LPDCB16
);
...
...
@@ -960,7 +937,6 @@ BOOL16 WINAPI GrayString16(HDC16,HBRUSH16,GRAYSTRINGPROC16,LPARAM,
INT16
,
INT16
,
INT16
,
INT16
,
INT16
);
DWORD
WINAPI
GetFileResourceSize16
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
LPDWORD
);
DWORD
WINAPI
GetFileResource16
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
DWORD
,
DWORD
,
LPVOID
);
BYTE
WINAPI
GetTempDrive
(
BYTE
);
FARPROC16
WINAPI
SetTaskSignalProc
(
HTASK16
,
FARPROC16
);
...
...
loader/module.c
View file @
ac7efef3
...
...
@@ -1633,9 +1633,6 @@ void WINAPI PrivateFreeLibrary(HINSTANCE handle)
*/
FARPROC16
WINAPI
WIN32_GetProcAddress16
(
HMODULE
hModule
,
LPCSTR
name
)
{
WORD
ordinal
;
FARPROC16
ret
;
if
(
!
hModule
)
{
WARN
(
"hModule may not be 0!
\n
"
);
return
(
FARPROC16
)
0
;
...
...
@@ -1645,24 +1642,13 @@ FARPROC16 WINAPI WIN32_GetProcAddress16( HMODULE hModule, LPCSTR name )
WARN
(
"hModule is Win32 handle (%08x)
\n
"
,
hModule
);
return
(
FARPROC16
)
0
;
}
hModule
=
GetExePtr
(
hModule
);
if
(
HIWORD
(
name
))
{
ordinal
=
NE_GetOrdinal
(
hModule
,
name
);
TRACE
(
"%04x '%s'
\n
"
,
hModule
,
name
);
}
else
{
ordinal
=
LOWORD
(
name
);
TRACE
(
"%04x %04x
\n
"
,
hModule
,
ordinal
);
}
if
(
!
ordinal
)
return
(
FARPROC16
)
0
;
ret
=
NE_GetEntryPoint
(
hModule
,
ordinal
);
TRACE
(
"returning %08x
\n
"
,(
UINT
)
ret
);
return
ret
;
return
GetProcAddress16
(
hModule
,
name
);
}
/***********************************************************************
* GetProcAddress16 (KERNEL.50)
*/
FARPROC16
WINAPI
GetProcAddress16
(
HMODULE16
hModule
,
SEGP
TR
name
)
FARPROC16
WINAPI
GetProcAddress16
(
HMODULE16
hModule
,
LPCS
TR
name
)
{
WORD
ordinal
;
FARPROC16
ret
;
...
...
@@ -1672,8 +1658,8 @@ FARPROC16 WINAPI GetProcAddress16( HMODULE16 hModule, SEGPTR name )
if
(
HIWORD
(
name
)
!=
0
)
{
ordinal
=
NE_GetOrdinal
(
hModule
,
(
LPSTR
)
PTR_SEG_TO_LIN
(
name
)
);
TRACE
(
"%04x '%s'
\n
"
,
hModule
,
(
LPSTR
)
PTR_SEG_TO_LIN
(
name
)
);
ordinal
=
NE_GetOrdinal
(
hModule
,
name
);
TRACE
(
"%04x '%s'
\n
"
,
hModule
,
name
);
}
else
{
...
...
loader/resource.c
View file @
ac7efef3
...
...
@@ -320,12 +320,9 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
/**********************************************************************
* FindResource16 (KERNEL.60)
*/
HRSRC16
WINAPI
FindResource16
(
HMODULE16
hModule
,
SEGPTR
name
,
SEGP
TR
type
)
HRSRC16
WINAPI
FindResource16
(
HMODULE16
hModule
,
LPCSTR
name
,
LPCS
TR
type
)
{
LPCSTR
nameStr
=
HIWORD
(
name
)
?
PTR_SEG_TO_LIN
(
name
)
:
(
LPCSTR
)
name
;
LPCSTR
typeStr
=
HIWORD
(
type
)
?
PTR_SEG_TO_LIN
(
type
)
:
(
LPCSTR
)
type
;
return
RES_FindResource
(
hModule
,
typeStr
,
nameStr
,
return
RES_FindResource
(
hModule
,
type
,
name
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_NEUTRAL
),
FALSE
,
TRUE
);
}
...
...
windows/cursoricon.c
View file @
ac7efef3
...
...
@@ -1040,20 +1040,18 @@ HCURSOR16 CURSORICON_IconToCursor(HICON16 hIcon, BOOL bSemiTransparent)
/***********************************************************************
* LoadCursor16 (USER.173)
*/
HCURSOR16
WINAPI
LoadCursor16
(
HINSTANCE16
hInstance
,
SEGP
TR
name
)
HCURSOR16
WINAPI
LoadCursor16
(
HINSTANCE16
hInstance
,
LPCS
TR
name
)
{
LPCSTR
nameStr
=
HIWORD
(
name
)
?
PTR_SEG_TO_LIN
(
name
)
:
(
LPCSTR
)
name
;
return
LoadCursorA
(
hInstance
,
nameStr
);
return
LoadCursorA
(
hInstance
,
name
);
}
/***********************************************************************
* LoadIcon16 (USER.174)
*/
HICON16
WINAPI
LoadIcon16
(
HINSTANCE16
hInstance
,
SEGP
TR
name
)
HICON16
WINAPI
LoadIcon16
(
HINSTANCE16
hInstance
,
LPCS
TR
name
)
{
LPCSTR
nameStr
=
HIWORD
(
name
)
?
PTR_SEG_TO_LIN
(
name
)
:
(
LPCSTR
)
name
;
return
LoadIconA
(
hInstance
,
nameStr
);
return
LoadIconA
(
hInstance
,
name
);
}
...
...
@@ -2304,8 +2302,7 @@ HBITMAP WINAPI LoadBitmapA( HINSTANCE instance, LPCSTR name )
/**********************************************************************
* LoadBitmap16 (USER.175)
*/
HBITMAP16
WINAPI
LoadBitmap16
(
HINSTANCE16
instance
,
SEGP
TR
name
)
HBITMAP16
WINAPI
LoadBitmap16
(
HINSTANCE16
instance
,
LPCS
TR
name
)
{
LPCSTR
nameStr
=
HIWORD
(
name
)
?
PTR_SEG_TO_LIN
(
name
)
:
(
LPCSTR
)
name
;
return
LoadBitmapA
(
instance
,
nameStr
);
return
LoadBitmapA
(
instance
,
name
);
}
windows/dialog.c
View file @
ac7efef3
...
...
@@ -710,12 +710,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
if
(
template
.
menuName
)
{
if
(
!
win32Template
)
{
LPSTR
str
=
SEGPTR_STRDUP
(
template
.
menuName
);
hMenu
=
LoadMenu16
(
hInst
,
SEGPTR_GET
(
str
)
);
SEGPTR_FREE
(
str
);
}
if
(
!
win32Template
)
hMenu
=
LoadMenu16
(
hInst
,
template
.
menuName
);
else
hMenu
=
LoadMenuW
(
hInst
,
(
LPCWSTR
)
template
.
menuName
);
}
...
...
@@ -891,7 +886,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
/***********************************************************************
* CreateDialog16 (USER.89)
*/
HWND16
WINAPI
CreateDialog16
(
HINSTANCE16
hInst
,
SEGP
TR
dlgTemplate
,
HWND16
WINAPI
CreateDialog16
(
HINSTANCE16
hInst
,
LPCS
TR
dlgTemplate
,
HWND16
owner
,
DLGPROC16
dlgProc
)
{
return
CreateDialogParam16
(
hInst
,
dlgTemplate
,
owner
,
dlgProc
,
0
);
...
...
@@ -901,7 +896,7 @@ HWND16 WINAPI CreateDialog16( HINSTANCE16 hInst, SEGPTR dlgTemplate,
/***********************************************************************
* CreateDialogParam16 (USER.241)
*/
HWND16
WINAPI
CreateDialogParam16
(
HINSTANCE16
hInst
,
SEGP
TR
dlgTemplate
,
HWND16
WINAPI
CreateDialogParam16
(
HINSTANCE16
hInst
,
LPCS
TR
dlgTemplate
,
HWND16
owner
,
DLGPROC16
dlgProc
,
LPARAM
param
)
{
...
...
@@ -910,10 +905,10 @@ HWND16 WINAPI CreateDialogParam16( HINSTANCE16 hInst, SEGPTR dlgTemplate,
HGLOBAL16
hmem
;
LPCVOID
data
;
TRACE
(
"%04x,%
08lx
,%04x,%08lx,%ld
\n
"
,
hInst
,
(
DWORD
)
dlgTemplate
,
owner
,
(
DWORD
)
dlgProc
,
param
);
TRACE
(
"%04x,%
s
,%04x,%08lx,%ld
\n
"
,
hInst
,
debugres_a
(
dlgTemplate
)
,
owner
,
(
DWORD
)
dlgProc
,
param
);
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
dlgTemplate
,
RT_DIALOG
16
)))
return
0
;
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
dlgTemplate
,
RT_DIALOG
A
)))
return
0
;
if
(
!
(
hmem
=
LoadResource16
(
hInst
,
hRsrc
)))
return
0
;
if
(
!
(
data
=
LockResource16
(
hmem
)))
hwnd
=
0
;
else
hwnd
=
CreateDialogIndirectParam16
(
hInst
,
data
,
owner
,
...
...
@@ -1051,7 +1046,7 @@ static INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
/***********************************************************************
* DialogBox16 (USER.87)
*/
INT16
WINAPI
DialogBox16
(
HINSTANCE16
hInst
,
SEGP
TR
dlgTemplate
,
INT16
WINAPI
DialogBox16
(
HINSTANCE16
hInst
,
LPCS
TR
dlgTemplate
,
HWND16
owner
,
DLGPROC16
dlgProc
)
{
return
DialogBoxParam16
(
hInst
,
dlgTemplate
,
owner
,
dlgProc
,
0
);
...
...
@@ -1061,7 +1056,7 @@ INT16 WINAPI DialogBox16( HINSTANCE16 hInst, SEGPTR dlgTemplate,
/***********************************************************************
* DialogBoxParam16 (USER.239)
*/
INT16
WINAPI
DialogBoxParam16
(
HINSTANCE16
hInst
,
SEGP
TR
template
,
INT16
WINAPI
DialogBoxParam16
(
HINSTANCE16
hInst
,
LPCS
TR
template
,
HWND16
owner
,
DLGPROC16
dlgProc
,
LPARAM
param
)
{
HWND16
hwnd
=
0
;
...
...
@@ -1070,7 +1065,7 @@ INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, SEGPTR template,
LPCVOID
data
;
int
ret
=
-
1
;
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
template
,
RT_DIALOG
16
)))
return
0
;
if
(
!
(
hRsrc
=
FindResource16
(
hInst
,
template
,
RT_DIALOG
A
)))
return
0
;
if
(
!
(
hmem
=
LoadResource16
(
hInst
,
hRsrc
)))
return
0
;
if
(
!
(
data
=
LockResource16
(
hmem
)))
hwnd
=
0
;
else
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
data
,
FALSE
,
owner
,
...
...
@@ -1480,7 +1475,7 @@ static BOOL DIALOG_IsDialogMessage( HWND hwnd, HWND hwndDlg,
/***********************************************************************
* IsDialogMessage16 (USER.90)
*/
BOOL16
WINAPI
WIN16_
IsDialogMessage16
(
HWND16
hwndDlg
,
SEGPTR
msg16
)
BOOL16
WINAPI
IsDialogMessage16
(
HWND16
hwndDlg
,
SEGPTR
msg16
)
{
LPMSG16
msg
=
PTR_SEG_TO_LIN
(
msg16
);
BOOL
ret
,
translate
,
dispatch
;
...
...
@@ -1503,17 +1498,6 @@ BOOL16 WINAPI WIN16_IsDialogMessage16( HWND16 hwndDlg, SEGPTR msg16 )
}
BOOL16
WINAPI
IsDialogMessage16
(
HWND16
hwndDlg
,
LPMSG16
msg
)
{
LPMSG16
msg16
=
SEGPTR_NEW
(
MSG16
);
BOOL
ret
;
*
msg16
=
*
msg
;
ret
=
WIN16_IsDialogMessage16
(
hwndDlg
,
SEGPTR_GET
(
msg16
)
);
SEGPTR_FREE
(
msg16
);
return
ret
;
}
/***********************************************************************
* IsDialogMessageA (USER32.342)
*/
...
...
windows/driver.c
View file @
ac7efef3
...
...
@@ -739,7 +739,7 @@ static HDRVR16 DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam, BOOL bCa
lpSFN
=
(
lpSFN
)
?
(
lpSFN
+
1
)
:
lpFileName
;
if
((
hModule
=
LoadModule16
(
lpFileName
,
(
LPVOID
)
-
1
))
>=
32
)
{
if
((
lpProc
=
(
DRIVERPROC16
)
WIN32_
GetProcAddress16
(
hModule
,
"DRIVERPROC"
))
!=
NULL
)
{
if
((
lpProc
=
(
DRIVERPROC16
)
GetProcAddress16
(
hModule
,
"DRIVERPROC"
))
!=
NULL
)
{
lpDrv
=
DRIVER_RegisterDriver16
(
lpSFN
,
hModule
,
lpProc
,
lParam
,
bCallFrom32
);
}
else
{
FreeLibrary16
(
hModule
);
...
...
windows/win.c
View file @
ac7efef3
...
...
@@ -904,23 +904,17 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if
(
cs
->
hMenu
)
SetMenu
(
hwnd
,
cs
->
hMenu
);
else
{
#if 0 /* FIXME: should check if classPtr->menuNameW can be used as is */
if (classPtr->menuNameA)
cs->hMenu = HIWORD(classPtr->menuNameA) ?
LoadMenu(cs->hInstance,SEGPTR_GET(classPtr->menuNameA)):
LoadMenu(cs->hInstance,(SEGPTR)classPtr->menuNameA);
#else
SEGPTR
menuName
=
(
SEGPTR
)
GetClassLong16
(
hwnd
,
GCL_MENUNAME
);
/* FIXME: should check if classPtr->menuNameW can be used as is */
LPCSTR
menuName
=
(
LPCSTR
)
GetClassLongA
(
hwnd
,
GCL_MENUNAME
);
if
(
menuName
)
{
if
(
HIWORD
(
cs
->
hInstance
))
cs
->
hMenu
=
LoadMenuA
(
cs
->
hInstance
,
PTR_SEG_TO_LIN
(
menuName
)
);
cs
->
hMenu
=
LoadMenuA
(
cs
->
hInstance
,
menuName
);
else
cs
->
hMenu
=
LoadMenu16
(
cs
->
hInstance
,
menuName
);
if
(
cs
->
hMenu
)
SetMenu
(
hwnd
,
cs
->
hMenu
);
}
#endif
}
}
else
wndPtr
->
wIDmenu
=
(
UINT
)
cs
->
hMenu
;
...
...
@@ -3286,7 +3280,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
return
0L
;
}
hBummer
=
LoadCursor
16
(
0
,
IDC_BUMMER16
);
hBummer
=
LoadCursor
A
(
0
,
IDC_BUMMERA
);
if
(
!
hBummer
||
!
wndPtr
)
{
...
...
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