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
701932a6
Commit
701932a6
authored
Jul 30, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64win: Add initial user callbacks support.
parent
21a3690a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
235 additions
and
2 deletions
+235
-2
syscall.c
dlls/wow64win/syscall.c
+3
-1
user.c
dlls/wow64win/user.c
+226
-0
wow64win_private.h
dlls/wow64win/wow64win_private.h
+5
-0
ntuser.h
include/ntuser.h
+1
-1
No files found.
dlls/wow64win/syscall.c
View file @
701932a6
...
...
@@ -53,6 +53,8 @@ SYSTEM_SERVICE_TABLE sdwhwin32 =
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
void
*
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
)
LdrDisableThreadCalloutsForDll
(
inst
);
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
TRUE
;
LdrDisableThreadCalloutsForDll
(
inst
);
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
=
user_callbacks
;
return
TRUE
;
}
dlls/wow64win/user.c
View file @
701932a6
...
...
@@ -189,6 +189,232 @@ static struct client_menu_name32 *client_menu_name_64to32( const struct client_m
return
name32
;
}
static
NTSTATUS
dispatch_callback
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
void
*
ret_ptr
;
ULONG
ret_len
;
NTSTATUS
status
=
Wow64KiUserCallbackDispatcher
(
id
,
args
,
len
,
&
ret_ptr
,
&
ret_len
);
return
NtCallbackReturn
(
ret_ptr
,
ret_len
,
status
);
}
static
NTSTATUS
WINAPI
wow64_NtUserCallEnumDisplayMonitor
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallSendAsyncCallback
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallWinEventHook
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallWinProc
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallWindowsHook
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCopyImage
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserDrawScrollBar
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserDrawText
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserFreeCachedClipboardData
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserImmProcessKey
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserImmTranslateMessage
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserInitBuiltinClasses
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserInitBuiltinClasses
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserLoadDriver
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserLoadDriver
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserLoadImage
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserLoadSysMenu
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserLoadSysMenu
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserPostDDEMessage
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserRenderSynthesizedFormat
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserRenderSynthesizedFormat
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserUnpackDDEMessage
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallFreeIcon
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserCallFreeIcon
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserThunkLock
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserThunkLock
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserCallVulkanDebugReportCallback
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserCallVulkanDebugUtilsCallback
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst0
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
0
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst1
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
1
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst2
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
2
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst3
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
3
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst4
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
4
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst5
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
5
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst6
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
6
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst7
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
7
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst8
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
8
,
arg
,
size
);
}
static
NTSTATUS
WINAPI
wow64_NtUserDriverCallbackFirst9
(
void
*
arg
,
ULONG
size
)
{
return
dispatch_callback
(
NtUserDriverCallbackFirst
+
9
,
arg
,
size
);
}
user_callback
user_callbacks
[]
=
{
/* user32 callbacks */
wow64_NtUserCallEnumDisplayMonitor
,
wow64_NtUserCallSendAsyncCallback
,
wow64_NtUserCallWinEventHook
,
wow64_NtUserCallWinProc
,
wow64_NtUserCallWindowsHook
,
wow64_NtUserCopyImage
,
wow64_NtUserDrawScrollBar
,
wow64_NtUserDrawText
,
wow64_NtUserFreeCachedClipboardData
,
wow64_NtUserImmProcessKey
,
wow64_NtUserImmTranslateMessage
,
wow64_NtUserInitBuiltinClasses
,
wow64_NtUserLoadDriver
,
wow64_NtUserLoadImage
,
wow64_NtUserLoadSysMenu
,
wow64_NtUserPostDDEMessage
,
wow64_NtUserRenderSynthesizedFormat
,
wow64_NtUserUnpackDDEMessage
,
/* win16 hooks */
wow64_NtUserCallFreeIcon
,
wow64_NtUserThunkLock
,
/* Vulkan support */
wow64_NtUserCallVulkanDebugReportCallback
,
wow64_NtUserCallVulkanDebugUtilsCallback
,
/* Driver-specific callbacks */
wow64_NtUserDriverCallbackFirst0
,
wow64_NtUserDriverCallbackFirst1
,
wow64_NtUserDriverCallbackFirst2
,
wow64_NtUserDriverCallbackFirst3
,
wow64_NtUserDriverCallbackFirst4
,
wow64_NtUserDriverCallbackFirst5
,
wow64_NtUserDriverCallbackFirst6
,
wow64_NtUserDriverCallbackFirst7
,
wow64_NtUserDriverCallbackFirst8
,
wow64_NtUserDriverCallbackFirst9
,
};
C_ASSERT
(
ARRAYSIZE
(
user_callbacks
)
==
NtUserCallCount
);
NTSTATUS
WINAPI
wow64_NtUserActivateKeyboardLayout
(
UINT
*
args
)
{
HKL
layout
=
get_handle
(
&
args
);
...
...
dlls/wow64win/wow64win_private.h
View file @
701932a6
...
...
@@ -27,7 +27,12 @@
ALL_WIN32_SYSCALLS
#undef SYSCALL_ENTRY
typedef
NTSTATUS
(
WINAPI
*
user_callback
)(
void
*
params
,
ULONG
size
);
extern
user_callback
user_callbacks
[]
DECLSPEC_HIDDEN
;
void
*
WINAPI
Wow64AllocateTemp
(
SIZE_T
size
);
NTSTATUS
WINAPI
Wow64KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
,
void
**
ret_ptr
,
ULONG
*
ret_len
);
struct
object_attr64
{
...
...
include/ntuser.h
View file @
701932a6
...
...
@@ -54,7 +54,7 @@ enum
NtUserCallVulkanDebugUtilsCallback
,
/* Driver-specific callbacks */
NtUserDriverCallbackFirst
,
NtUserDriverCallbackLast
=
NtUserDriverCallbackFirst
+
10
,
NtUserDriverCallbackLast
=
NtUserDriverCallbackFirst
+
9
,
NtUserCallCount
};
...
...
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