Commit Graph

831 Commits

Author SHA1 Message Date
Zebediah Figura 4da92f3203 ntoskrnl.exe/tests: Test completion callback parameters.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-16 11:24:27 +02:00
Paul Gofman eea911a58b ntoskrnl/tests: Add initial test for WSK listen socket.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 11:21:34 +02:00
Paul Gofman e642587451 ntoskrnl.exe/tests: Add test for wsk_get_address_info().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 11:21:34 +02:00
Paul Gofman 10331eb2b7 netio.sys: Add WSK provider stub interface.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 19:41:12 +02:00
Paul Gofman e63c3ed827 ntoskrnl.exe/tests: Add initial test for netio.sys.
Test driver should import netio.sys which is available since Vista,
so a new test driver is needed to preserve XP compatibility for the
existing tests.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 19:40:49 +02:00
Paul Gofman f81e31b323 ntoskrnl.exe/tests: Move test functions to the new utils.h header.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 16:52:15 +02:00
Jacek Caban 39a585ef8c ntoskrnl: Use loader notification callback to perform relocations.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49093
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Jacek Caban f2e886a006 ntdll: Export builtin functions as cdecl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Paul Gofman d0d1601e6c ntoskrnl.exe/tests: Avoid race condition in test driver.
Might fix random driver crash on testbot Win8 machine.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:49:08 +02:00
Paul Gofman 64946e5543 ntoskrnl.exe/tests: Add a test for accessing process memory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman ee7a5b28c9 ntoskrnl.exe: Add stub for KeUnstackDetachProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman 6f4e73d082 ntoskrnl.exe: Add stub for KeStackAttachProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman c9a55908a5 ntoskrnl.exe: Zero copied size in MmCopyVirtualMemory() stub.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman e58073dbf8 ntoskrnl.exe: Implement PsGetProcessSectionBaseAddress() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Paul Gofman 5d92cf7dbf ntoskrnl.exe: Call load image notify routines for driver modules.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 16:17:32 +02:00
Paul Gofman 26fbff05a1 ntoskrnl.exe: Implement image load notify routines registration.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:24 +02:00
Paul Gofman eb7f784761 ntoskrnl.exe: Implement IoReuseIrp() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:16 +02:00
Paul Gofman 9effc3f963 ntoskrnl.exe: Add stub for ExUnregisterCallback() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:09 +02:00
Paul Gofman 7bc99ae125 ntoskrnl.exe: Add stub for ExRegisterCallback() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:46:04 +02:00
Paul Gofman 1cad86fced ntoskrnl.exe: Return STATUS_SUCCESS from ExCreateCallback() stub.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:59 +02:00
Paul Gofman 4ae92fdaf6 ntoskrnl.exe: Fix ObRegisterCallbacks() function parameter definition.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:55 +02:00
Paul Gofman 6870f13704 ntoskrnl.exe/tests: Add more timer tests.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman a4a903f97a ntoskrnl.exe: Support DPCs with timers.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 6cb3588969 ntoskrnl.exe: Cancel active timer before setting it.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 4584ffadda ntoskrnl.exe: Avoid leaking events on multipe KeSetTimerEx() calls.
As the consequent testing shows we can't just close the events on timer
reset. That would result in wrong wait results for current waiters.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 68a03b6393 ntoskrnl.exe: Reimplement KeSetTimerEx() on top of thread pool.
This is needed to call the DPC callbacks later as SetWaitableTimer()
will call the callback only when the thread is in alertable
wait state.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman ba98574207 ntoskrnl.exe: Add KeSetTimer() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman e49be2db28 ntoskrnl.exe: Partially implement KeInitializeDpc() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 4c81f499a6 ntoskrnl.exe/tests: Add basic test for DPC call.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:18:28 +02:00
Paul Gofman 4921d24627 ntoskrnl.exe: Add KeSignalCallDpcSynchronize() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:18:22 +02:00
Paul Gofman 1adc1b1ecf ntoskrnl.exe: Add KeGenericCallDpc() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:30 +02:00
Paul Gofman 73d915fd8e ntoskrnl.exe: Add KeSignalCallDpcDone() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:22 +02:00
Paul Gofman 8daad8963e ntoskrnl.exe: Import KeGetCurrentProcessorNumber() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:17:16 +02:00
Paul Gofman cda4fa293e ntoskrnl.exe: Implement KeRevertToUserAffinityThread() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 7d4f4783a5 ntoskrnl.exe: Implement KeRevertToUserAffinityThreadEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 631227563b ntoskrnl.exe: Implement KeSetSystemAffinityThread() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman c3bc7689b1 ntoskrnl.exe: Add KeSetSystemAffinityThreadEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Paul Gofman 25f4da665d ntoskrnl.exe: Fix KeQueryActiveProcessors() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:13 +02:00
Alex Henrie 0af08318b7 ntdll: Implement RtlIpv6AddressToString(Ex)[AW].
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46788
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:12:12 +02:00
Paul Gofman 6ceb6c7f47 ntoskrnl.exe: Return zero for unknown msr registers.
rdmsr should fault if called with the register not supported
by CPU. But until we want to support the full range of CPU
specific registers returning zero is probably a better
fallback.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 21:17:13 +02:00
Paul Gofman 2716e215df ntoskrnl.exe: Add KeQueryActiveProcessorCountEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:20:02 +02:00
Paul Gofman b91b4b6de1 ntoskrnl.exe: Add KdRefreshDebuggerNotPresent() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:19:36 +02:00
Zebediah Figura c750ae6b9d ntoskrnl.exe: Protect the two relocated pages independently.
They may have different protection flags.

This fixes a regression introduced by 22dfb0df10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49198
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 19:50:48 +02:00
Paul Gofman 42ce4910a4 ntoskrnl.exe: Support 'xor Ev, Gv' opcode for x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 16:51:57 +02:00
Paul Gofman e7778dd9f9 ntoskrnl.exe: Support 'or Ev, Gv' opcode for x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 16:51:55 +02:00
Paul Gofman b40be1d43b ntoskrnl.exe: Emulate full user shared data area range.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:13:16 +02:00
Alexandre Julliard cb36b615e1 ntoskrnl.exe: Avoid a few more ntdll forwards.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Alex Henrie 474d1f0b2d ntdll: Implement RtlIpv6StringToAddress(Ex)[AW].
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Alexandre Julliard 5bb9f86dbe ntdll: Implement RtlFormatMessage().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 14:43:27 +02:00
Rémi Bernon a1c46c3806 server: Add USD support with timestamp updates.
The USD page is created when the first process (wineboot.exe) completes
its creation, using its provided user_shared_data for initialization.

The server maps the page write-only and the clients map it read-only,
then the server updates the timestamps every 16 ms.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29168
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:57:56 +02:00
Zebediah Figura 7addca95b5 ntoskrnl.exe: Move the BroadcastSystemMessage() call to plugplay_send_event().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:49:18 +02:00
Zebediah Figura d80101f17a ntoskrnl.exe: Broadcast device notifications to registered handlers.
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:48:06 +02:00
Jacek Caban 92e40853d8 ntoskrnl.exe: Export _chkstk from importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Zebediah Figura 0e09d5ea74 ntoskrnl.exe: Implement IoIs32bitProcess().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49088
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Zebediah Figura 74f820fccc ntdll: Export RtlCopyMemoryNonTemporal.
Needed by Blindwrite 7's kernel driver.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Zebediah Figura 22dfb0df10 ntoskrnl.exe: Protect relocated pages one at a time.
Blindwrite 7's ezplay.sys has sections which are consecutive in memory but not
page aligned.  Thus changing the protection to PROT_READWRITE one section at a
time has the effect that old_prot for all sections but the first is set to
PROT_READWRITE (actually, PROT_WRITECOPY), causing us to restore the wrong
protection and the driver to crash in its entry point.

To fix this, protect and unprotect one page at a time while processing it, i.e.
essentially revert 6c0a8c359.  To avoid reintroducing bug 28254, protect two
pages at a time instead of just one.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Alexandre Julliard 1028a5c15f ntoskrnl: Add missing exports for functions that are already implemented.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 22:03:16 +02:00
Andrew Eikum 7ac5b7889f ntoskrnl: Quiet down failed class installer debug message.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 21:51:31 +02:00
Zebediah Figura 09db718d99 include: Rename BaseAddress to DllBase.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:46 +02:00
Zebediah Figura feeb1c7c24 include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Jacek Caban 14df0183b0 makefiles: Explicitly import msvcrt in modules that need specific crt version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:04 +01:00
Zebediah Figura bd00dedecd ntoskrnl.exe: Implement IoOpenDeviceRegistryKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:36:23 +01:00
Brendan Shanks 3810fb1ef0 ntoskrnl: Fix emulation of RIP-relative addressing.
The target address is relative to the RIP of the next instruction, not
the current RIP.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:53:46 +01:00
Louis Lenders ba8360be4e ntoskrnl.exe: Add stub for RtlIsNtDdiVersionAvailable.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48122
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:47:54 +01:00
Alex Henrie f307e94c0e ntoskrnl: Add KeSetImportanceDpc stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48358
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:11:59 +01:00
Andrey Gusev 8cd1225497 ntoskrnl.exe/tests: Fix typos in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:06 +01:00
Alexandre Julliard 0e97fe86fd ntdll: Implement custom codepage conversion functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Zebediah Figura 993c833cf4 ntoskrnl.exe: Remove a superfluous condition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:26:30 +01:00
Chip Davis a224824782 ntoskrnl.exe: Add tests for METHOD_NEITHER ioctl behavior.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Alexandre Julliard 9ae5717ba6 ntdll: Implement RtlInitCodePageTable().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Piotr Caban 292b728908 ntoskrnl.exe: Store device state in volatile key.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 23:04:35 +01:00
Piotr Caban cc395391ed winebus: Reference PDOs added to DEVICE_RELATIONS structure.
Fixes crash caused by 81cda52d15.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Zebediah Figura 81cda52d15 ntoskrnl.exe: BusRelations is also used when devices are removed.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:53 +01:00
Zebediah Figura ca683dcaad ntoskrnl.exe: IoInvalidateDeviceRelations() receives the parent PDO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:12:51 +01:00
Zebediah Figura 781fc47f36 ntoskrnl.exe: Trace the call to AddDevice().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:57 +01:00
Zebediah Figura 74b98dc82b ntoskrnl.exe: Implement IRP_MN_QUERY_DEVICE_RELATIONS for root-enumerated devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:54 +01:00
Zebediah Figura 481b099345 ntoskrnl.exe: Stub IRP_MN_QUERY_CAPABILITIES for root-enumerated devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:50 +01:00
Zebediah Figura c4ec69adce ntoskrnl.exe: Implement many more properties in IoGetDeviceProperty().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:46 +01:00
Zebediah Figura 61928e8160 ntoskrnl.exe: Pass the correct output size to IoBuildDeviceIoControlRequest().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Austin English f0b09c3572 ntoskrnl.exe: Quiet a verbose FIXME.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=11908
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 18:32:17 +01:00
Alex Henrie 380d31b17a ntoskrnl: Implement IoCreateUnprotectedSymbolicLink.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47986
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:31:27 +01:00
Alexandre Julliard 2d25263a31 ntoskrnl: Export some functions on all architecture except i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Rémi Bernon 8db70e92a8 ntoskrnl.exe: Update the interface if it is already in the tree.
As we are going to reuse the same device id when re-plugging a
previously plugged SDL controller, the device interfaces are still
present in the tree and IoRegisterDeviceInterface was not updating the
device pointer.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-20 12:50:05 +02:00
Rémi Bernon e6138a52a9 ntoskrnl.exe: Use case-insensitive driver name comparison.
For instance winebus driver is sometimes referred as WineBus, when
loaded by winedevice.exe, and sometimes as winebus, when loaded from
devices. This makes Wine try to load it twice and initializes the
backend twice as well.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:42:03 +02:00
Alex Henrie 363b8809f3 ntdll: Implement RtlIpv4StringToAddress(Ex)A.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46149
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:45:18 +02:00
Francois Gouget c9f222e775 ntoskrnl/tests: Declare the driver subtest.
It may print test failures and as such should be declared by its parent.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:42:56 +02:00
Andrew Eikum 6f17f4caad ntoskrnl.exe: Add -norelay flag for _vsnprintf.
Fixes traces from services when relay logging.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 18:55:25 +02:00
André Hentschel 9220772d28 ntdll: Add RtlUnwindEx spec entry for ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 21:24:26 +02:00
Zebediah Figura ca1c153422 ntoskrnl.exe: Implement IoGetRequestorProcess().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:28 +02:00
Zebediah Figura 37652d5cc4 ntoskrnl.exe: Set the IRP thread also for create and close requests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:25 +02:00
Zebediah Figura 8ce1c66b5e ntoskrnl.exe: Stub IoRegisterBootDriverReinitialization().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:22 +02:00
Zebediah Figura da23da3952 ntoskrnl.exe: Allocate pool memory from an executable heap.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45843
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:50:19 +02:00
Zebediah Figura 2b6cf134c7 ntoskrnl.exe/tests: Add tests for remove locks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 09:33:53 +02:00
Zebediah Figura 59f72d87c5 ntoskrnl.exe: Don't signal the remove lock event unless the lock is in the removed state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 09:33:51 +02:00
Zebediah Figura 83493a72bc ntoskrnl.exe: Use a manual-reset event for remove locks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 09:33:49 +02:00
Zebediah Figura c0b05a2c74 ntoskrnl.exe: Implement IoReleaseRemoveLockAndWaitEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 09:10:17 +02:00
Zebediah Figura 9d899c753a ntoskrnl.exe: Implement IoReleaseRemoveLockEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 09:10:15 +02:00
Zebediah Figura 2a92951769 ntoskrnl.exe: Implement IoAcquireRemoveLockEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 09:10:11 +02:00
Zebediah Figura afe444f75a ntoskrnl.exe: Implement IoInitializeRemoveLockEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 09:10:08 +02:00
Zebediah Figura 21cadb7c0b ntoskrnl.exe: Export InitializeSListHead().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Zebediah Figura 92d8ec7954 ntoskrnl.exe: Make the driver object accessible by name while in its entry point.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Zebediah Figura 32b2497645 ntoskrnl.exe: Implement ObQueryNameString().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Zebediah Figura 2543f37932 ntoskrnl.exe: Fix a typo in a debug trace.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Sven Baars aa10b49c57 ntoskrnl.exe: Don't use irp after it has been freed by IoCompleteRequest (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Alex Henrie f04e7d2650 ntoskrnl: Add stub for SeLocateProcessImageName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47601
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:04:01 +02:00
Alex Henrie 558d7fd1b2 ntoskrnl: Add stub for SePrivilegeCheck.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47601
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:03:57 +02:00
Zebediah Figura b9919c2e7f ntoskrnl.exe: Set the IRP output buffer unless the status has both high bits set.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 09:15:43 +02:00
Alex Henrie 433c14b064 ntoskrnl: Add MmIsThisAnNtAsSystem().
This function returns FALSE on all server and non-server versions of
Windows since XP except for Windows Server 2003.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47578
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 21:59:29 +02:00
Zebediah Figura dfc7132f50 ntoskrnl.exe: Always set the IRP return size.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:57:20 +02:00
Zebediah Figura d99ecb078b ntoskrnl.exe/tests: Add some tests for IRP return values.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:57:15 +02:00
Zebediah Figura 7845c0117a ntoskrnl.exe/tests: Add some tests for file objects.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:57:13 +02:00
Zebediah Figura 4f8dfdba3d services: Do not overwrite the service type in SetServiceStatus().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:53 +02:00
Zebediah Figura 2698249362 ntoskrnl.exe: Use the registered interface class in IoSetDeviceInterfaceState().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-03 23:44:24 +02:00
Zebediah Figura 4ecbc3a0f5 ntoskrnl.exe: Implement PoCallDriver().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-26 09:34:41 +02:00
Zebediah Figura 656035da85 ntoskrnl.exe: Stub PoStartNextPowerIrp().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-26 09:34:37 +02:00
Zebediah Figura 816e25c194 ntoskrnl.exe: Handle IRP_MN_QUERY_ID for root PnP devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-26 09:34:33 +02:00
Zebediah Figura 13e9d43127 ntoskrnl.exe: Handle some no-op PnP requests.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-26 09:34:31 +02:00
Zebediah Figura b06740ecde ntoskrnl.exe: Load a driver's root PnP devices when the driver is started.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 19:25:40 +02:00
Zebediah Figura d4c91cc6f9 ntoskrnl.exe: Add a stub PnP manager driver.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 19:25:01 +02:00
Jacek Caban 39d4f9d8af ntoskrnl.exe: Implement KeBugCheck and KeBugCheckEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45656
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 19:22:21 +02:00
Jacek Caban 7e14df06f1 ntoskrnl.exe: Implement ExDeletePagedLookasideList.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 21:21:10 +02:00
Jacek Caban fac633495d ntoskrnl.exe: Implement ExInitializePagedLookasideList.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47014
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 21:21:07 +02:00
Jacek Caban 8b787945ef ntoskrnl.exe: Implement IoGetStackLimits.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47017
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 21:21:04 +02:00
Alexandre Julliard a1cdcc5290 ntoskrnl: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 09:28:35 +02:00
Alexandre Julliard 7cee5e2bdc ntoskrnl: Make the standard C functions available for importing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 09:25:06 +02:00
Zebediah Figura 4ca91cfd5d ntoskrnl.exe: Use INF files to locate function drivers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:42:38 +02:00
André Hentschel dd84b0a744 ntoskrnl.exe/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:20:02 +02:00
Zebediah Figura 365f162fb1 ntoskrnl.exe: Implement automatically generated device names.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 17:42:08 +02:00
Zebediah Figura 9392aaa17f ntoskrnl.exe: Send PnP IRPs to the top of the device stack.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 17:41:42 +02:00
Zebediah Figura 4820d9d76c ntoskrnl.exe: Dispatch user IRPs to the top of the device stack.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 17:41:37 +02:00
Zebediah Figura 6c6aeea8a8 ntoskrnl.exe: Correctly handle instance IDs.
The instance ID is only the third part of the "A\B\C" form, and must be
combined with the device ID to form the whole name for setupapi (the "device
instance ID").

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:46:20 +02:00
Zebediah Figura 510261a4b4 ntoskrnl.exe: Use SetupDiOpenDeviceInfo().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:54 +02:00
Zebediah Figura 533a426d14 ntoskrnl.exe: Free device IDs from pool.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:47 +02:00
Zebediah Figura 6e999b4a46 ntoskrnl.exe: Fix handling of reference string in IoRegisterDeviceInterface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 23:05:29 +02:00
Zebediah Figura 3b2592a2bc ntoskrnl.exe: Move PNP code to a separate file.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 22:33:30 +02:00
Jacek Caban 828ac9880d ntoskrnl.exe: Set IRP caller thread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:27 +02:00
Jacek Caban 7f0883ae88 server: Associate create and close IRPs with current thread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:27 +02:00
Jacek Caban e80b507f1e ntoskrnl.exe: Dispatch server IRPs in critical region.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Derek Lesho 51a732163f ntoskrnl.exe: Implement KeAreApcsDisabled.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Jacek Caban 9157129fc8 ntoskrnl.exe: Cancel IRPs terminated by server.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 20:17:39 +02:00
Jacek Caban b724024d5a server: Notify kernel when IRP is terminated by server.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 20:17:36 +02:00
Jacek Caban 101da2b512 server: Store IRP client pointer on server side.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 20:17:03 +02:00
Piotr Caban 294cfaf077 ntoskrnl.exe: Fix IoAttachDeviceToDeviceStack implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 20:41:05 +02:00
Piotr Caban e0e795cfe9 ntoskrnl.exe: Add IoDetachDevice implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 20:41:00 +02:00
Michael Stefaniuc 94e958c61a ntoskrnl: Add a macro to declare a static CRITICAL_SECTION.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:40:35 +02:00
Jacek Caban 7287611606 ntoskrnl.exe: Set irp context handle in dispatch_irp.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:40:33 +02:00
Jacek Caban 0138da5025 ntoskrnl.exe: Reuse IRP input buffer if it wasn't used.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:40:31 +02:00
Jacek Caban 6870bb74d4 ntoskrnl.exe: Pass context as a structure to IRP dispatchers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:40:29 +02:00
Jacek Caban e1d932a9e1 ntoskrnl.exe/tests: Always test DeviceIoControl result.
Spotted by Mathew Hodson.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:39:50 +02:00
Jacek Caban a55a287cab server: Always block overlapped device requests until driver dispatches them.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:32 +02:00
Jacek Caban 2f7e7863e0 ntoskrnl.exe: Implement PsGetThreadProcessId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Jacek Caban 07e249e431 ntddk.h: Add a few more declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Jacek Caban 850fd237bd ntoskrnl.exe: Implement PsGetProcessInheritedFromUniqueProcessId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Jacek Caban ed140a7ac5 ntoskrnl.exe: Implement ExAcquireFastMutex and ExReleaseFastMutex.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47044
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Alexandre Julliard 10584d2057 include: Use the __fastcall attribute directly for the Windows build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 14:07:15 +02:00
Alexandre Julliard 62fa748f23 include: Define fastcall assembly wrappers globally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:59:33 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Francois Gouget 3f0ca3c7a4 ntoskrnl.exe: Make run_work_item_worker() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:20:23 -05:00
Jacek Caban 4e4a1098f2 ntoskrnl.exe/tests: Add more overlapped tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:20:25 -05:00
Rafał Harabień 6c0a8c3592 ntoskrnl.exe: Fix handling relocations on page boundary.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28254
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 09:32:24 -05:00
Jacek Caban 7223f11d4a ntoskrnl.exe: Don't keep reference to driver created file objects on client side.
Server keeps instead.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:18:05 +02:00
Jacek Caban bd94c43fcf ntoskrnl.exe: Associate file object with server object before calling IRP routine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:18:02 +02:00
Jacek Caban b1e1111d7b server: Don't use IRP_MJ_* constants for ntoskrnl.exe communication.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:16:56 +02:00
Jacek Caban 8bce6309ac server: Pass IRP output size in irp_params_t.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:15:46 +02:00
Zebediah Figura 39e9b841e5 ntoskrnl.exe/tests: Avoid linking directly to CancelIoEx().
It's not available before Vista.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:14:53 +02:00
Zebediah Figura ecdb5e82fe ntoskrnl.exe/tests: Use coarser waits for timer tests.
In an attempt to mitigate intermittent failures on Linux.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:14:50 +02:00
Jacek Caban 0ee017f2ed ntoskrnl.exe: Support UserEvent in IoCompleteRequest.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban 0a8c36b8e3 ntoskrnl.exe: Set IRP DeviceObject in IoCallDriver.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban 60ddf0f09e ntoskrnl.exe/tests: Add CancelIo tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban 5f10c86d5b ntoskrnl.exe: Implement IoCancelIrp.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban da5b97c8b4 ntoskrnl.exe/tests: Add IoCallDriver tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban a11cdd2231 ntoskrnl.exe: Implement IoBuildAsynchronousFsdRequest.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Jacek Caban 7099c0be2c ntoskrnl.exe: Add work item tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Jacek Caban 43ba0a1bec ntoskrnl.exe: Implement IoQueueWorkItem.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Jacek Caban 322f0b57a8 ntoskrnl.exe: Implement IoAllocateWorkItem and IoFreeWorkItem.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Jacek Caban 73b99d296c ntoskrnl.exe: Use ObGetObjectType in kernel_object_from_handle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Jacek Caban 73568dab0b ntoskrnl.exe: Support NULL offset in IoBuildSynchronousFsdRequest.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:09:38 +02:00
Jacek Caban b781a00b14 ntoskrnl.exe: Support SL_INVOKE_ON_CANCEL in IoCompleteRequest.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:09:34 +02:00
Jacek Caban 332035fb94 ntoskrnl.exe: Use ObOpenObjectByPointer to get handle for kernel object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:09:28 +02:00
Jacek Caban bfe3dfb535 ntoskrnl.exe: Implement ObOpenObjectByPointer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:09:15 +02:00
Michael Stefaniuc 4905bc740d ntoskrnl.exe: Correctly initialize two CRITICAL_SECTION_DEBUGs.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 22:23:38 +02:00
Jacek Caban 82860424bf ntoskrnl.exe: Implement PsGetThreadId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Jacek Caban eb1146a500 ntoskrnl.exe: Implement PsGetProcessId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Derek Lesho 1c2d517242 ntoskrnl.exe: Implement PsIsSystemThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Derek Lesho 1064e20a3f ntoskrnl.exe: Export and set PsInitialSystemProcess.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Jacek Caban 6ebc223955 ntoskrnl.exe: Implement IoGetCurrentProcess.
Based on patch by Derek Lesho.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29460
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Jacek Caban 52ff9bd3ac server: Use generic kernel object list to store client device file pointer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:11 +02:00
Jacek Caban dcaeddd4db server: Allow creating file kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Jacek Caban 9784c3fd6f ntoskrnl.exe: Add MmUnmapLockedPages stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Jacek Caban 95bd82eee5 ntoskrnl.exe: Return error codes compatible with recent Windows versions in PsLookupThreadByThreadId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Derek Lesho ae6ae91d1a ntoskrnl.exe: Implement PsLookupProcessByProcessId.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-20 00:18:23 +02:00
Derek Lesho e5bbb5e6ca ntoskrnl.exe: Implement process object constructor.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-20 00:18:19 +02:00
Derek Lesho 7498c15b0d ntoskrnl.exe: Implement PsLookupThreadByThreadId.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-20 00:18:03 +02:00
Gijs Vermeulen 7d32c24c4a ntoskrnl.exe: Add Ex[p]InterlockedFlushSList.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-15 21:33:07 +02:00
Jacek Caban 2017db7d0a ntoskrnl.exe: Open thread with THREAD_QUERY_INFORMATION access in KeGetCurrentThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:48 +02:00
Jacek Caban c1fb240f0c ntoskrnl.exe: Use proper device handle in DevicePropertyPhysicalDeviceObjectName implementation.
Spotted by Huw Davies.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Alexandre Julliard c4433a06b7 ntoskrnl.exe/tests: Avoid standard C functions in kernel drivers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46993
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:41 +02:00
Zebediah Figura cc2e8d7cda ntoskrnl.exe/tests: Add tests for ERESOURCE functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:53:08 +02:00
Zebediah Figura ab22796ab0 ntoskrnl.exe: Implement ExIsResourceAcquiredSharedLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:53:02 +02:00
Zebediah Figura 37640f3269 ntoskrnl.exe: Implement ExIsResourceAcquiredExclusiveLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:52:57 +02:00
Zebediah Figura 01566351fa ntoskrnl.exe: Implement ExGetSharedWaiterCount().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:52:53 +02:00
Zebediah Figura 631473ffd9 ntoskrnl.exe: Implement ExGetExclusiveWaiterCount().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:52:48 +02:00
Zebediah Figura 5698bb29a3 ntoskrnl.exe: Implement ExDeleteResourceLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura aeed70689c ntoskrnl.exe: Implement ExReleaseResourceLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura 9dfa9f6b26 ntoskrnl.exe: Implement ExReleaseResourceForThreadLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura b13a00f82b ntoskrnl.exe: Implement ExAcquireSharedWaitForExclusive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura f0499323d8 ntoskrnl.exe: Implement ExAcquireSharedStarveExclusive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura dcfc7ab165 ntoskrnl.exe: Implement ExAcquireResourceSharedLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura 257c56f5f3 ntoskrnl.exe: Implement ExAcquireResourceExclusiveLite().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Zebediah Figura 1304b4c71b ntoskrnl.exe: Implement ExInitializeResourceLite().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45819
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Jacek Caban 2ee040382f server: Return client thread object pointer from get_next_device_request if available.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban d9d55bb1d0 ntoskrnl.exe: Reimplement PsGetCurrentProcessId and PsGetCurrentThreadId on top of KeGetCurrentThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban f680eda832 ntoskrnl.exe: Implement KeGetCurrentThread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45844
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban b0b89cb569 ntoskrnl.exe: Implement thread object constructor.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46205
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban 4c0e81728f server: Allow creating thread kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban 80d53026bf ntoskrnl.exe: Don't add device to the list if IoCreateDevice fails.
Spotted by Zebediah Figura.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Jacek Caban fd8bc0c16d ntoskrnl.exe: Implement IoCreateSynchronizationEvent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46804
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Jacek Caban b4f78d6896 server: Use generic kernel object list to store client device pointer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Piotr Caban 5e80774131 ntoskrnl.exe: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 19:23:23 +02:00
Jacek Caban b9c621856f ntoskrnl.exe: Support event functions on kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 14:01:45 +01:00
Jacek Caban f57a383d09 ntoskrnl.exe: Support waiting on kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:59:04 +01:00
Jacek Caban 0decadd62a ntoskrnl.exe: Support creating event objects from server handle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:59:04 +01:00
Jacek Caban a5c2f043e6 server: Notify client about freed object so that it may free associated kernel object.
Long term, we may consider making interface between server and device
manager more generic so that it could be used for messages other than IRPs.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:59:04 +01:00
Jacek Caban 94c1ef0ee1 server: Allow kernel to keep reference to server objects by client pointer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:57:18 +01:00
Jacek Caban 134e264ae5 server: Store pointers to objects created by kernel_object_from_handle in server.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:56:31 +01:00
Derek Lesho c988910cae ntoskrnl.exe: Update the tick count in KUSER_SHARED_DATA when accessed.
EasyAntiCheat.sys constantly reads this value, so I think keeping it
up-to-date is a good idea.

Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 21:59:08 +01:00
Derek Lesho e7863eaa4e ntoskrnl.exe: Add emulation of rdmsr for MSR_LSTAR control register.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 21:39:26 +01:00
Derek Lesho 468c546f90 ntoskrnl.exe: Add IoWMIOpenBlock stub.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:49:53 +01:00
Derek Lesho da060af242 ntoskrnl.exe: Implement ObGetObjectType.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Francois Gouget 7604174e5b ntoskrnl.exe/tests: Make vskip_(), win_skip_() and kmemcpy() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:11:48 +01:00
Gijs Vermeulen 66c321a4b8 ntoskrnl.exe: Add ExSetTimerResolution stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46762
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:29:36 +01:00
Gijs Vermeulen 199b5d2ca2 ntoskrnl.exe: Add MmBuildMdlForNonPagedPool stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46761
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:29:36 +01:00
Jacek Caban fdcd9ee712 ntoskrnl.exe: Support NULL type in ObReferenceObjectByHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 17:55:17 +01:00
Zhiyi Zhang 948d39c529 ntoskrnl.exe: Implement ExUuidCreate().
This is mostly a copy of UuidCreate() in rpcrt4 with NTSTATUS return code.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Alexandre Julliard 26bbbb7b73 winebuild: Use stdcall for fastcall wrappers.
This allows catching mismatched argument lists.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Alexandre Julliard 556bc03758 ntoskrnl.exe: Specify fastcall entry points using the appropriate spec file flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:29 +01:00
Huw Davies d88f129507 ntoskrnl.exe: Add stubs for PsSuspendProcess() and PsResumeProcess().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 22:21:17 +01:00
Jacek Caban 637e01e217 ntoskrnl.exe: Implement file object constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 855314449b ntoskrnl.exe: Implement ObReferenceObject and ObDereferenceObject.
NULL checks are meant to prevent regressions in applications trying to
reference NULL objects returned from stubs.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban ad7c1392ce ntoskrnl.exe: Add partial ObReferenceObjectByHandle implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 916c5f2edb ntoskrnl.exe: Use kernel object allocators for file object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 7fb89b126d ntoskrnl.exe: Add missing ObReferenceObject call to ObReferenceObjectByName.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban d01cd45b55 ntoskrnl.exe: Use kernel object allocators for device object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban bb94d94bb0 ntoskrnl.exe: Introduce common kernel object allocator and use it for driver object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 38eebddc1d ntoskrnl.exe: Export object type values.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 99876873b8 ntoskrnl.exe/tests: Add object reference tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 15:01:01 +01:00
Jacek Caban 6b50fa3161 ntoskrnl.exe: Add PsReferenceProcessFilePointer stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 21:18:14 +01:00
Michael Müller 88b20b2dee ntoskrnl.exe: Implement NtBuildNumber.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 12:54:15 +01:00
Jacek Caban 4505ef6cfd ntoskrnl.exe/tests: Introduce get_proc_address helper.
Based on a patch by Michael Müller.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 12:54:02 +01:00
Jacek Caban 4498648ec1 ntoskrnl.exe: Add KeRevertToUserAffinityThread stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 12:53:46 +01:00