Windows Driver Model is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD. It was later replaced with Windows Driver Foundation (WDF).
Questions tagged [wdm]
134 questions
0
votes
1 answer
Unable to use NDIS related functions from a Visual Studio's Empty WDM Driver template
I was looking at try writing an NDIS miniport driver and created a new project in my VS2019 installation, choosing the "Empty WDM Driver" as my starting template. I can include ndis.h, but many functions appear not be available including important…

James Parsons
- 6,097
- 12
- 68
- 108
0
votes
0 answers
How can I install a locally developed WDM driver?
I'm following a video tutorial that covers developing WDM drivers and I've managed to put together a very barebones driver that doesn't really do anything other than print when it's loaded or unloaded. I did not make any modifications to the INF…

James Parsons
- 6,097
- 12
- 68
- 108
0
votes
0 answers
Windows kernel: why is my memory mapping not working?
I have a kmdf that allocates a single buffer using MmAllocateContiguousMemorySpecifyCache and gets its mdl:
auto ptr = MmAllocateContiguousMemorySpecifyCache(
BUFFER_SIZE,
lowestAcceptible,
highestAcceptible,
lowestAcceptible,
…

Elad Maimoni
- 3,703
- 3
- 20
- 37
0
votes
1 answer
Unresolved extenral symbol - VC++ Linker
I'm using WDM to build a simple driver. (I have the latest WDK version and also the latest Visual Studio 2017 version installed).
The problem is that when it comes to building the solution, it just doesn't pass the linker and returns error 2019…

Eyal B
- 15
- 1
- 5
0
votes
1 answer
Getting current USB power state
I've been trying to read the current power state of an USB port (D0/D1/D2/D3). I haven't been able to find much information on how to access the actual state. Here's a description of the USB Device Power States on Microsoft docs. It has a whole…

pavelkomin
- 33
- 1
- 10
0
votes
0 answers
WDM driver develop, sc start error
I'm learning developing drivers with win10 1709 and visual studio 2017. I created a empty wdm project and build it into mydriver1.sys
But I can't start service
sc create mydriver binpath= mydriver1.sys type= kernel
[SC] CreateService SUCCESS
sc…

TBD
- 9
- 1
0
votes
0 answers
Passing SCSI commands over network
I want to share cdrom device over network.
On the client side I create root enumerated device (scsi bus). On the server side (where cdrom device resides) I replace device stack's FDO with my own (in other words - cdrom.sys is replaced by another…

igntec
- 1,006
- 10
- 24
0
votes
1 answer
How retrive Process Privilege (windows drivers)?
I have an object of IRP and EPROCESS in my driver
i want to know how can i retrieve process privilege (like normal or Administrator or SYSTEM) from these structures ?
KPROCESSOR_MODE ProcessRequestorMode = pIrp->RequestorMode;
…

smm123
- 3
- 3
0
votes
1 answer
What is a "context" used for in regards to a Windows NT MiniFilter Driver?
I built a very simple minifilter driver as part of a lesson on minifilters. I've also read the minifilter documentation that Microsoft provides which is in the form of a PDF doc, as well as this reference. These guides explain how to set up a…

the_endian
- 2,259
- 1
- 24
- 49
0
votes
0 answers
Driver Unload Notification
I'm very new to windows development specially in the field of driver creation. I want to create a driver that will be notified whenever another driver(s) (Any type of driver but preferably not device driver) has been unloaded. So far (I maybe…

Brex
- 3
- 3
0
votes
1 answer
Windows driver, spin lock acquisition and condition test
Inside one dispatch routine we have the following code:
if (DeviceExtension->Flag)
{
KeAcquireInStackQueuedSpinLockAtDpcLevel(&DeviceExtension->SpinLock, &LockHandle);
//... when we will enter here, DeviceExtension->Flag can already be set…

igntec
- 1,006
- 10
- 24
0
votes
0 answers
What's the best way to safely access a shared object in kernel mode in a multiprocessor architecture
I've read on The Rootkit Arsenal book(page 269 - https://books.google.co.il/books?id=GAsuwHTquhEC) about kernel synchronization techniques.
According to what I've read, the safest/appropriate way to access a shared object in a multi CPU architecture…

user1341970
- 449
- 2
- 7
- 15
0
votes
1 answer
WDM device removal in PnP driver
I have question about device removal.
When we want to notify PnP manager that device has disappeared we call IoInvalidateDeviceRelations with BusRelations. After that OS will send IRP_MN_QUERY_DEVICE_RELATIONS request with BusRelations. In this…

new_user
- 3
- 1
0
votes
1 answer
BSOD with Bug Check 0x139 in RemoveEntryList
We have developed a WDM serial port driver which is based on (WinDDK 6) native serial COM port driver.
But our customer has a application triggering BSOD when using our driver.
This application calls IRP_MJ_READ continuously when the button on the…

CCT
- 1
- 3
0
votes
1 answer
Process IDs are the same in User mode and Kernel mode
I was shocked that I got the same PID between User mode and Kernel mode in an IOCTL request from my application to my kernel driver(WDM) via DeviceIoControl() Win32 API.
As far as I know, drivers have its own PID in kernel mode; applications own its…

dougpuob
- 23
- 1
- 7