diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-07-29 00:27:10 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-07-29 00:27:10 +0200 |
commit | 9934500ad2bac1465e043445bac9c832b5f305db (patch) | |
tree | 21c6422b9c8030a1dd273ce8dff3b8841c7df46b /CRT | |
parent | 6c602fd542b7f97e3a23ef27c3839656906c98de (diff) |
Set DriverUnload callback after DriverEntry called. Added appropriate README advisory.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'CRT')
-rw-r--r-- | CRT/kcrt.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -264,10 +264,14 @@ void __cdecl _CRT_DriverUnload(_In_ struct _DRIVER_OBJECT * DriverObject) NTSTATUS __cdecl _CRT_DriverEntry(_In_ struct _DRIVER_OBJECT * DriverObject, _In_ PUNICODE_STRING RegistryPath) { + NTSTATUS retval; + KCRT_OnDriverEntry(); + retval = DriverEntry(DriverObject, RegistryPath); + /* support for service stopping and CRT de-init */ DriverObject->DriverUnload = _CRT_DriverUnload; - return DriverEntry(DriverObject, RegistryPath); + return retval; } |