Skip to content

Instantly share code, notes, and snippets.

@mbikovitsky
Created August 26, 2021 09:47
Show Gist options
  • Save mbikovitsky/749f198e37ee2b900010473b9b6e6849 to your computer and use it in GitHub Desktop.
Save mbikovitsky/749f198e37ee2b900010473b9b6e6849 to your computer and use it in GitHub Desktop.
Minimal Windows 98 WDM driver project
#include <wdm.h>
NTSTATUS
DriverEntry(
PDRIVER_OBJECT ptDriverObject,
PUNICODE_STRING pusRegistryPath
)
{
if (!IoIsWdmVersionAvailable(1, 0x10))
{
DbgPrint("Hello from Windows 9x!\r\n");
}
else
{
DbgPrint("Hello from Windows NT!\r\n");
}
return STATUS_UNSUCCESSFUL;
}
REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\driver]
"ImagePath"="\\SystemRoot\\system32\\drivers\\driver.sys"
"Type"=dword:00000001
"Start"=dword:00000001
"Group"="Base"
"ErrorControl"=dword:00000001
#############################################################################
#
# Copyright (C) Microsoft Corporation 1995
# All Rights Reserved.
#
# MAKEFILE for WDM device driver kit
#
#############################################################################
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the driver components of the Windows NT DDK
#
!INCLUDE $(NTMAKEENV)\makefile.def
TARGETNAME=driver
TARGETTYPE=DRIVER
TARGETPATH=bin
SOURCES= driver.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment