Paul Gofman
de0dc0e8ac
server: Send completions for existing job processes when adding completion port.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:40:41 +02:00
Paul Gofman
21f5597de4
server: Support nested jobs.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:40:21 +02:00
Zebediah Figura
e68f41e4fe
server: Introduce IOCTL_AFD_WINE_SHUTDOWN.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:32:59 +02:00
Zebediah Figura
4256253419
server: Introduce IOCTL_AFD_WINE_CONNECT.
...
I was able to reverse-engineer a native CONNECT ioctl, with code 0x801; but I
was not able to find a valid set of parameters which would allow us to
implement either connect() or ConnectEx(). In particular, I could not find a
way to make the ioctl respect nonblocking mode, and I could not find a way to
specify an initial buffer to be sent.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:25 +02:00
Zebediah Figura
737fe1f993
server: Allow polling on an fd after it was removed.
...
In particular, so that we can wait for POLLOUT on a connecting socket multiple
times, in case the first connection fails, without polling on it while it is
unconnected.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:23 +02:00
Zebediah Figura
609dfea1fd
server: Also clear pending events in set_socket_event.
...
In particular, prevent FD_CONNECT from being reported when not selected for.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 17:42:15 +02:00
Zebediah Figura
6ccf61fbc7
server: Implement IOCTL_AFD_LISTEN.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:57:52 +02:00
Zebediah Figura
98d1dc31fb
include: Rename Wine-specific socket ioctls.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:54:11 +02:00
Zebediah Figura
21efebbdc1
server: Always clear pending messages in sock_wake_up().
...
Instead of clearing all messages when any match.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:53:59 +02:00
Zebediah Figura
aa6b2482cc
server: Poll for FD_CLOSE even if we cannot receive more data.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 11:53:54 +02:00
Alexandre Julliard
5864bc88de
ntdll: Always send the native PEB pointer to the server.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard
4dca2cc797
ntdll: Always send the native TEB pointer to the server.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard
d743c1e6c3
server: Send TEB and PEB in the process_init_done request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Zebediah Figura
4c409f8a3b
server: Post socket events only if selecting for them.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:54 +02:00
Zebediah Figura
037fccc0df
server: Do not send messages for events that are not currently being selected for.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:25 +02:00
Zebediah Figura
44a3c70d77
server: Reset the reported event mask in set_socket_event only when using window messages.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:12 +02:00
Zebediah Figura
0214c73d46
server: Rename "hmask" to "reported_events".
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Zebediah Figura
30c02f67ce
server: Rename "pmask" to "pending_events".
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Zebediah Figura
ccbc17c9f6
server: Add a helper to post socket events.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 10:43:07 +02:00
Rémi Bernon
4e956dc0fe
server: Implement WM_INPUT_DEVICE_CHANGE message dispatch.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:46 +02:00
Rémi Bernon
3481dc05e9
server: Broadcast rawinput messages when desktop is NULL.
...
HID rawinput hardware messages are sent from winedevice.exe, which is
attached to the services desktop. We need to broadcast its messages to
all (interactive) desktops instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:44 +02:00
Rémi Bernon
371be0bc1c
server: Add support for RIDEV_DEVNOTIFY rawinput flag.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:42 +02:00
Rémi Bernon
2d8f98fd4e
server: Add an explicit message field in rawinput_message.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:40 +02:00
Rémi Bernon
427168ba5a
server: Add process argument to find_rawinput_device.
...
And use it to find registered HID rawinput devices.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 21:51:37 +02:00
Rémi Bernon
37c7923a31
server: Add RIM_TYPEHID type / hid member to rawinput union.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 22:02:52 +02:00
Rémi Bernon
6d167b91ad
server: Add rawinput union to hw_input_t / INPUT_HARDWARE.
...
When msg is WM_INPUT_DEVICE_CHANGE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 22:02:27 +02:00
Zebediah Figura
afad281dd1
server: Do not call sock_reselect() on an uninitialized socket.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:33:34 +02:00
Zebediah Figura
920f654ffb
server: Avoid calling get_unix_fd() in IOCTL_AFD_CREATE.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 20:33:34 +02:00
Alexandre Julliard
6a296592aa
server: Send the zero_bits parameter for remote NtCreateThreadEx() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Zebediah Figura
15aceec067
server: Map EINPROGRESS to STATUS_DEVICE_NOT_READY.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:12:18 +02:00
Zebediah Figura
523032e6f1
server: Map EFAULT to STATUS_ACCESS_VIOLATION.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:11:54 +02:00
Zebediah Figura
d6d4fa4bd1
server: Map ENOTCONN to STATUS_INVALID_CONNECTION.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 08:11:44 +02:00
Zebediah Figura
12f3e27bbb
server: Map EADDRINUSE to STATUS_SHARING_VIOLATION.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:20:00 +02:00
Zebediah Figura
4f4dc095f6
server: Return a proper NTSTATUS from IOCTL_AFD_ADDRESS_LIST_CHANGE.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:19:37 +02:00
Zebediah Figura
a0cc341559
server: Return a proper NTSTATUS from IOCTL_AFD_ACCEPT.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 10:19:33 +02:00
Alexandre Julliard
734e3a91ac
server: Only the first mapping needs to be an image in NtAreMappedFilesTheSame().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37488
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:30 +02:00
Alexandre Julliard
384c042fea
server: Don't return a handle for user apcs.
...
Reported by David Torok.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 19:32:30 +02:00
Alexandre Julliard
f3d41cc789
server: Don't bother queuing APC_NONE apcs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 19:32:30 +02:00
Paul Gofman
02e3327f06
ntdll: Implement NtGetNextThread().
...
Largely based on a patch by Nikolay Sivov for NtGetNextProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 10:48:59 +02:00
Zebediah Figura
904c05d3d3
include: Do not include winsock.h in winsock2.h.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 18:55:24 +02:00
Alexandre Julliard
ea2d9c0406
server: Create the Wow64 key and system directory for all supported architectures.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:43:35 +02:00
Alexandre Julliard
339ed57643
server: Get rid of the CPU type and functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:42:04 +02:00
Alexandre Julliard
308bd35746
server: Store a machine ID instead of a CPU in the context structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:40:53 +02:00
Alexandre Julliard
94d19eff22
server: Use a 64-bit machine for IL executables.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51067
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:39:57 +02:00
Alexandre Julliard
8d50c34655
server: Check the supported machines list to validate an image mapping.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:35:16 +02:00
Alexandre Julliard
a51f26badf
server: Return the process machine from the main exe instead of a CPU flag.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:06 +02:00
Alexandre Julliard
96865eb7e7
server: Return a list of supported machines instead of a CPU bitmask.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 15:17:54 +02:00
Alexandre Julliard
191fd47e38
server: Get rid of the remaining PowerPC support.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 12:41:45 +02:00
Zebediah Figura
a17cd35d6d
server: Map a SD group to Unix group modes if the SD owner is present anywhere in the current user's token.
...
Instead of requiring the SD owner to match the token user.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44691
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 21:12:57 +02:00
Rémi Bernon
769a2616ae
server: Track desktop users per thread instead of per process.
...
As some thread may use a different desktop from their process.
This fixes the user32 win tests, which leaks a desktop that never gets
closed. The test_shell_window test creates a new desktop, which spawns
explorer.exe process, incrementing the desktop user count to 1, then
associates the desktop to a thread, which closes it on exit.
Never the user count is incremented to 2, and closing the thread desktop
doesn't either check whether the desktop process should be terminated.
Reversely, it is possible to create a desktop, associate it with a
thread /and/ a process, and this time the desktop process would be
terminated when the process exits, although the thread may still be
using it.
Tracking the users per thread is more robust and fixes the problem as
set_thread_desktop increments the desktop user count, and thread exit
decrements it.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 21:00:33 +02:00