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
0c32905c
Commit
0c32905c
authored
Oct 25, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install the shell hook as a 32-bit hook.
parent
cbacde52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
22 deletions
+33
-22
shell.c
dlls/shell32/shell.c
+33
-20
user32.spec
dlls/user/user32.spec
+0
-2
No files found.
dlls/shell32/shell.c
View file @
0c32905c
...
...
@@ -60,11 +60,11 @@ static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED";
static
const
char
*
lpstrMsgWndDestroyed
=
"OTHERWINDOWDESTROYED"
;
static
const
char
*
lpstrMsgShellActivate
=
"ACTIVATESHELLWINDOW"
;
static
HWND
16
SHELL_hWnd
=
0
;
static
HWND
SHELL_hWnd
=
0
;
static
HHOOK
SHELL_hHook
=
0
;
static
UINT
16
uMsgWndCreated
=
0
;
static
UINT
16
uMsgWndDestroyed
=
0
;
static
UINT
16
uMsgShellActivate
=
0
;
static
UINT
uMsgWndCreated
=
0
;
static
UINT
uMsgWndDestroyed
=
0
;
static
UINT
uMsgShellActivate
=
0
;
HINSTANCE16
SHELL_hInstance
=
0
;
HINSTANCE
SHELL_hInstance32
;
static
int
SHELL_Attach
=
0
;
...
...
@@ -450,25 +450,39 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
}
/*************************************************************************
* ShellHookProc [SHELL.103]
* System-wide WH_SHELL hook.
* SHELL_HookProc
*
* 32-bit version of the system-wide WH_SHELL hook.
*/
LRESULT
WINAPI
ShellHookProc16
(
INT16
code
,
WPARAM16
wParam
,
LPARAM
lParam
)
static
LRESULT
WINAPI
SHELL_HookProc
(
INT
code
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TRACE
(
"%i, %
04x, %08x
\n
"
,
code
,
wParam
,
(
unsigned
)
lParam
);
if
(
SHELL_hHook
&&
SHELL_hWnd
)
TRACE
(
"%i, %
x, %08lx
\n
"
,
code
,
wParam
,
lParam
);
if
(
SHELL_hWnd
)
{
UINT16
uMsg
=
0
;
switch
(
code
)
{
case
HSHELL_WINDOWCREATED
:
uMsg
=
uMsgWndCreated
;
break
;
case
HSHELL_WINDOWDESTROYED
:
uMsg
=
uMsgWndDestroyed
;
break
;
case
HSHELL_ACTIVATESHELLWINDOW
:
uMsg
=
uMsgShellActivate
;
case
HSHELL_WINDOWCREATED
:
PostMessageA
(
SHELL_hWnd
,
uMsgWndCreated
,
wParam
,
0
);
break
;
case
HSHELL_WINDOWDESTROYED
:
PostMessageA
(
SHELL_hWnd
,
uMsgWndDestroyed
,
wParam
,
0
);
break
;
case
HSHELL_ACTIVATESHELLWINDOW
:
PostMessageA
(
SHELL_hWnd
,
uMsgShellActivate
,
wParam
,
0
);
break
;
}
PostMessageA
(
HWND_32
(
SHELL_hWnd
),
uMsg
,
wParam
,
0
);
}
return
CallNextHookEx16
(
SHELL_hHook
,
code
,
wParam
,
lParam
);
return
CallNextHookEx
(
SHELL_hHook
,
code
,
wParam
,
lParam
);
}
/*************************************************************************
* ShellHookProc [SHELL.103]
* System-wide WH_SHELL hook.
*/
LRESULT
WINAPI
ShellHookProc16
(
INT16
code
,
WPARAM16
wParam
,
LPARAM
lParam
)
{
return
SHELL_HookProc
(
code
,
wParam
,
lParam
);
}
/*************************************************************************
...
...
@@ -483,9 +497,8 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
case
2
:
/* register hWnd as a shell window */
if
(
!
SHELL_hHook
)
{
HMODULE16
hShell
=
GetModuleHandle16
(
"SHELL"
);
HOOKPROC16
hookProc
=
(
HOOKPROC16
)
GetProcAddress16
(
hShell
,
(
LPCSTR
)
103
);
SHELL_hHook
=
SetWindowsHookEx16
(
WH_SHELL
,
hookProc
,
hShell
,
0
);
SHELL_hHook
=
SetWindowsHookExA
(
WH_SHELL
,
SHELL_HookProc
,
GetModuleHandleA
(
"shell32.dll"
),
0
);
if
(
SHELL_hHook
)
{
uMsgWndCreated
=
RegisterWindowMessageA
(
lpstrMsgWndCreated
);
...
...
@@ -497,7 +510,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
}
if
(
SHELL_hHook
)
return
((
SHELL_hWnd
=
hWnd
)
!=
0
);
return
((
SHELL_hWnd
=
HWND_32
(
hWnd
)
)
!=
0
);
break
;
default:
...
...
dlls/user/user32.spec
View file @
0c32905c
...
...
@@ -664,7 +664,6 @@ init UserClientDllInitialize
################################################################
# Wine extensions: Win16 functions that are needed by other dlls
#
@ stdcall CallNextHookEx16(long long long long) CallNextHookEx16
@ stdcall CallWindowProc16(long long long long long) CallWindowProc16
@ stdcall CloseDriver16(long long long) CloseDriver16
@ stdcall CreateDialogIndirectParam16(long ptr long long long) CreateDialogIndirectParam16
...
...
@@ -675,7 +674,6 @@ init UserClientDllInitialize
@ stdcall OpenDriver16(str str long) OpenDriver16
@ stdcall PostAppMessage16(long long long long) PostAppMessage16
@ stdcall SendDriverMessage16(long long long long) SendDriverMessage16
@ stdcall SetWindowsHookEx16(long long long long) SetWindowsHookEx16
@ stdcall UserYield16() UserYield16
################################################################
...
...
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