I tried to write simple driver for ReactOS.
Code: Select all
/* INCLUDES ******************************************************************/
#include <ntddk.h>
#include <debug.h>
/* FUNCTIONS *****************************************************************/
DRIVER_UNLOAD DriverUnload;
VOID
NTAPI
DriverUnload(IN PDRIVER_OBJECT DriverObject) {}
NTSTATUS
NTAPI
DriverEntry(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath) {
/* For non-used parameter */
UNREFERENCED_PARAMETER(RegistryPath);
/* Setup the Driver Object */
DriverObject->DriverUnload = DriverUnload;
/* Log. */
DPRINT1("Hello World.\n");
/* Return success. */
return STATUS_SUCCESS;
}
/* EOF */
"No DriverUnload function!" in debug.log and "[SC] ControlService FAILED 1: ERROR_INVALID_FUNCTION" in cmd. I'm using ReactOS 0.5. Where is my mistake??