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
54100873
Commit
54100873
authored
May 16, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using the MapHModule functions.
parent
1ed73fae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
hook16.c
dlls/user/hook16.c
+2
-2
wnd16.c
dlls/user/wnd16.c
+1
-1
task.c
loader/task.c
+12
-9
cursoricon.c
windows/cursoricon.c
+3
-7
No files found.
dlls/user/hook16.c
View file @
54100873
...
...
@@ -221,7 +221,7 @@ static LRESULT CALLBACK call_WH_CBT( INT code, WPARAM wp, LPARAM lp )
CREATESTRUCT16
cs16
;
cs16
.
lpCreateParams
=
cbtcw32
->
lpcs
->
lpCreateParams
;
cs16
.
hInstance
=
MapHModuleLS
(
cbtcw32
->
lpcs
->
hInstance
);
cs16
.
hInstance
=
HINSTANCE_16
(
cbtcw32
->
lpcs
->
hInstance
);
cs16
.
hMenu
=
HMENU_16
(
cbtcw32
->
lpcs
->
hMenu
);
cs16
.
hwndParent
=
HWND_16
(
cbtcw32
->
lpcs
->
hwndParent
);
cs16
.
cy
=
cbtcw32
->
lpcs
->
cy
;
...
...
@@ -524,7 +524,7 @@ LRESULT WINAPI CallNextHookEx16( HHOOK hhook, INT16 code, WPARAM16 wparam, LPARA
cbtcw32
.
hwndInsertAfter
=
WIN_Handle32
(
cbtcw16
->
hwndInsertAfter
);
cs32
.
lpCreateParams
=
cs16
->
lpCreateParams
;
cs32
.
hInstance
=
MapHModuleSL
(
cs16
->
hInstance
);
cs32
.
hInstance
=
HINSTANCE_32
(
cs16
->
hInstance
);
cs32
.
hMenu
=
HMENU_32
(
cs16
->
hMenu
);
cs32
.
hwndParent
=
WIN_Handle32
(
cs16
->
hwndParent
);
cs32
.
cy
=
cs16
->
cy
;
...
...
dlls/user/wnd16.c
View file @
54100873
...
...
@@ -1473,7 +1473,7 @@ INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
msgbox32
.
cbSize
=
msgbox
->
cbSize
;
msgbox32
.
hwndOwner
=
WIN_Handle32
(
msgbox
->
hwndOwner
);
msgbox32
.
hInstance
=
MapHModuleSL
(
msgbox
->
hInstance
);
msgbox32
.
hInstance
=
HINSTANCE_32
(
msgbox
->
hInstance
);
msgbox32
.
lpszText
=
MapSL
(
msgbox
->
lpszText
);
msgbox32
.
lpszCaption
=
MapSL
(
msgbox
->
lpszCaption
);
msgbox32
.
dwStyle
=
msgbox
->
dwStyle
;
...
...
loader/task.c
View file @
54100873
...
...
@@ -260,13 +260,14 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cm
TDB
*
pTask
;
char
name
[
10
];
FARPROC16
proc
;
HMODULE16
hModule
=
pModule
?
pModule
->
self
:
0
;
/* Allocate the task structure */
hTask
=
GlobalAlloc16
(
GMEM_FIXED
|
GMEM_ZEROINIT
,
sizeof
(
TDB
)
);
if
(
!
hTask
)
return
NULL
;
pTask
=
TASK_GetPtr
(
hTask
);
FarSetOwner16
(
hTask
,
pModule
->
self
);
FarSetOwner16
(
hTask
,
hModule
);
/* Fill the task structure */
...
...
@@ -275,14 +276,14 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cm
if
(
teb
&&
teb
->
tibflags
&
TEBF_WIN32
)
{
pTask
->
flags
|=
TDBF_WIN32
;
pTask
->
hInstance
=
pModule
->
self
;
pTask
->
hInstance
=
hModule
;
pTask
->
hPrevInstance
=
0
;
/* NOTE: for 16-bit tasks, the instance handles are updated later on
in NE_InitProcess */
}
pTask
->
version
=
pModule
->
expected_version
;
pTask
->
hModule
=
pModule
->
self
;
pTask
->
version
=
pModule
?
pModule
->
expected_version
:
0x0400
;
pTask
->
hModule
=
hModule
;
pTask
->
hParent
=
GetCurrentTask
();
pTask
->
magic
=
TDB_MAGIC
;
pTask
->
nCmdShow
=
cmdShow
;
...
...
@@ -299,13 +300,16 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cm
/* Copy the module name */
GetModuleName16
(
pModule
->
self
,
name
,
sizeof
(
name
)
);
strncpy
(
pTask
->
module_name
,
name
,
sizeof
(
pTask
->
module_name
)
);
if
(
hModule
)
{
GetModuleName16
(
hModule
,
name
,
sizeof
(
name
)
);
strncpy
(
pTask
->
module_name
,
name
,
sizeof
(
pTask
->
module_name
)
);
}
/* Allocate a selector for the PDB */
pTask
->
hPDB
=
GLOBAL_CreateBlock
(
GMEM_FIXED
,
&
pTask
->
pdb
,
sizeof
(
PDB16
),
pModule
->
self
,
WINE_LDT_FLAGS_DATA
);
hModule
,
WINE_LDT_FLAGS_DATA
);
/* Fill the PDB */
...
...
@@ -416,8 +420,7 @@ void TASK_CreateMainTask(void)
GetStartupInfoA
(
&
startup_info
);
if
(
startup_info
.
dwFlags
&
STARTF_USESHOWWINDOW
)
cmdShow
=
startup_info
.
wShowWindow
;
pTask
=
TASK_Create
(
(
NE_MODULE
*
)
GlobalLock16
(
MapHModuleLS
(
GetModuleHandleA
(
0
))
),
cmdShow
,
NtCurrentTeb
(),
NULL
,
0
);
pTask
=
TASK_Create
(
NULL
,
cmdShow
,
NtCurrentTeb
(),
NULL
,
0
);
if
(
!
pTask
)
{
ERR
(
"could not create task for main process
\n
"
);
...
...
windows/cursoricon.c
View file @
54100873
...
...
@@ -754,9 +754,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
/* Normalize hInstance (must be uniquely represented for icon cache) */
if
(
HIWORD
(
hInstance
)
)
hInstance
=
HINSTANCE_32
(
MapHModuleLS
(
hInstance
));
else
if
(
!
HIWORD
(
hInstance
))
hInstance
=
HINSTANCE_32
(
GetExePtr
(
HINSTANCE_16
(
hInstance
)
));
/* Get directory resource ID */
...
...
@@ -993,8 +991,7 @@ HCURSOR WINAPI CreateCursor( HINSTANCE hInstance,
info
.
bPlanes
=
1
;
info
.
bBitsPerPixel
=
1
;
return
HICON_32
(
CreateCursorIconIndirect16
(
MapHModuleLS
(
hInstance
),
&
info
,
lpANDbits
,
lpXORbits
));
return
HICON_32
(
CreateCursorIconIndirect16
(
0
,
&
info
,
lpANDbits
,
lpXORbits
));
}
...
...
@@ -1084,8 +1081,7 @@ HICON WINAPI CreateIcon(
info
.
bPlanes
=
bPlanes
;
info
.
bBitsPerPixel
=
bBitsPixel
;
hIcon
=
HICON_32
(
CreateCursorIconIndirect16
(
MapHModuleLS
(
hInstance
),
&
info
,
lpANDbits
,
lpXORbits
));
hIcon
=
HICON_32
(
CreateCursorIconIndirect16
(
0
,
&
info
,
lpANDbits
,
lpXORbits
));
}
else
{
ICONINFO
iinfo
;
BITMAPINFO
bmi
;
...
...
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