Questions tagged [wdm]

1

votes
0

answer
88

Views

Route ASIO input to WDM virtual microphones

I'm doing some sound manipulation with the Dante Virtual Soundcard (DVS). The software I am using (ffmpeg) can only record from WDM microphones. DVS has a limitation of 8 stereo channels for WDM, so I'm seeing if I can use the 64 channel ASIO option. Basically, I am trying to route 64 ASIO input...
JohnX
1

votes
1

answer
541

Views

DDK/WDM import wink32.lib into driver

Recently I was trying to use W32pServiceTable in my driver. I did imported wink32.lib in SOURCES: TARGETNAME=exp TARGETTYPE=DRIVER TARGETLIB=$(DDK_LIB_PATH)\win32k.lib SOURCES=Experimental.cpp MSC_WARNING_LEVEL=/W3 And I declare in source file: extern PDWORD W32pServiceTable; But I am getting symbol...
Vasilij
0

votes
0

answer
4

Views

Not able to allocate NonPaged/Paged memory above 2047 MB on 64-bit Windows IoT OS inside WDM Driver

As per my knowledge in Windows 64-bit architecture we can assign nonpaged memory upto 75% of RAM or 128 GB (Whichever is lower) https://blogs.technet.microsoft.com/markrussinovich/2009/03/10/pushing-the-limits-of-windows-paged-and-nonpaged-pool/ https://docs.microsoft.com/en-us/windows/desktop/memor...
MankPan
1

votes
1

answer
662

Views

Can Kernel Event Object for IoBuildDeviceIoControlRequest Allocated in Local Scope

I am a newbie in driver developement. I have a basic question. In writing WDM device drivers, one can call IoBuildDeviceIoControlRequest / IoBuildSynchronousFsdRequest to allocate a synchronous IRP to be passed to another target driver. One of the basic requirement is that we have to allocate an ev...
JavaMan
1

votes
1

answer
390

Views

How to detect session creation/termination in the WDM driver?

I'm building a device driver for Windows (WDM driver, 32 bit), and I need to detect the creation and the closure of the terminal sessions. I know how to obtain the session ID of the caller process (ZwQueryInformationProcess with the ProcessSessionInformation flag). I'm also intercepting the event of...
valdo
1

votes
1

answer
231

Views

Who handles the IRP's and decides which IRP is to be sent and in which order?

While debugging the toaster driver in WDM my Bus_PnP has the IRP stack in which its assigned that which MINOR function is to be handled but who assignes it to IRP stack that which minor is to handled.
PU.
1

votes
1

answer
289

Views

EXPORT_SYMBOL() for Windows drivers

Is there any WDM mechanism, similar to EXPORT_SYMBOL under Linux, such that one can use symbols from a driver (A.sys) in another driver (B.sys)?
Mircea
1

votes
1

answer
44

Views

Given an IO Request Packet, how can I tell with which function(s) it is associated? E.g IRP_MJ_READ

If I have a fully intact IRP and I am viewing it in a program such as IRP Monitor, how can I tell which function(s) this IRP is associated with, such as IRP_MJ_READ or IRP_MJ_WRITE?
the_endian
1

votes
2

answer
0

Views

Get file path from NT/Device Name

I want to convert device path to a file path. I want to get process name by process id, so I am using this code PsLookupProcessByProcessId(processId,&pEProcess); ObOpenObjectByPointer(pEProcess, OBJ_KERNEL_HANDLE, NULL, 0, NULL, KernelMode, &hProcess); ObDereferenceObject (pEProcess); nts = ZwQueryI...
YAHOOOOO
1

votes
1

answer
466

Views

Does anyone know where to get the old WDM version of the toaster driver sample?

The current 8.x Windows driver kit samples include the toaster sample, but only implemented in KMDF and UMDF. I have a particular application that requires specialized treatment of PNP messages that I don't think will work with KMDF. Does anyone know where I can get the WDM version of toaster that u...
Ted Middleton
1

votes
1

answer
775

Views

Driver Testing an error occurred deploying the driver(s) in the solution : The system can not find the file specified

I am trying to create a very simple WDM driver in Visual Studio 2013. I have successfully provisioned a virtual pc running win7 sp1 x86 on a wmware machine using serial port. Now that i want to debug the driver, i get the error : Driver Testing an error occurred deploying the driver(s) in the soluti...
Breeze
2

votes
1

answer
629

Views

Two Spinlocks on same processor?

Can two CPUs hold two 'different' spin locks simultaneously at same time? So...does this mean: a sigle(uniprocessor) CPU cannot hold two 'different' spinlocks at the same time? So...does this mean: the number of spinlocks on a single CPU cannot be > 1. PS:'different' implying spinlock associated wit...
bakra
2

votes
2

answer
184

Views

IoBuildAsynchronousFsdRequest with IRP_MJ_WRITE

I developed a WDM filter driver on disk driver. I want to send an asynchronous request to write data on disk. The windows will crash when I delete the writeBuffer memory in WriteDataIRPCompletion function. My question is: How can I safely free the writeBuffer memory without crashing? This my send re...
JoeHsu
1

votes
2

answer
1.4k

Views

manually Install windows XP driver

How do I install 'hello world' driver manually? I have written a registry script where 'start'=dword:3 means service requires manual start. But how do I start and stop it? I have tried sc start but it says specified service does not exist as an installed service. Also if possible, please tell me...
user2705939
2

votes
3

answer
1.3k

Views

When to use Wave Extensible Format?

I'm writing an audio library that includes reading and writing wave files and I understand the differences between the three possible wave file formats, but it's unclear when to use the extensible format when dealing with mono or stereo PCM data. I've been using this as my main reference and it clea...
riban
6

votes
2

answer
7.3k

Views

What is the difference between a WDM driver, a KMDF driver and a UMDF driver?

When creating a Windows Driver project in Visual Studio 2012, you have many different options to choose from. There's a page on MSDN that helps you with choosing the correct driver model for your device. It however doesn't clearly explain the exact differences between the WDM, KMDF and UMDF driver t...
lesderid
3

votes
4

answer
2.1k

Views

Virtual drivers with Windows Driver Model - where to begin?

I've never written drivers before but I'm starting an open-source project that involves creating virtual MIDI ports that will send the MIDI data over a network. For this, I presume I would be creating some sort of virtual driver using WDM (unless it's possible with kernel hooks?) - but being a begin...
bcoughlan
2

votes
1

answer
329

Views

Iterating over WDM device stack

As I understand, one can iterate the device stack of WDM devices only from the bottoms up, because DEVICE_OBJECT has an AttachedDevice member (but not a LowerDevice member). Luckily, the AddDevice callback receives the PhysicalDeviceObject so you can iterate over the entire stack. From within my fil...
Ilya
2

votes
3

answer
3.8k

Views

Extracting USB PID VID from DevicePath

When using SetupDiGetDeviceInterfaceDetail to retrieve a SP_DEVICE_INTERFACE_DETAIL_DATA relating to a connected USB device, a string called DevicePath is returned. The string being returned is formatted like the following example: \?\usb#vid_abcd&pid_1234#000000000#{xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx...
user3099783
2

votes
1

answer
319

Views

How to register acpi event notify?(AcpiInterfaces.RegisterForDeviceNotifications)

now I want to add the function in my acpi driver . the function is:get the BIOS Notify . I search some doc, And Write code NTSTATUS XxxAddDevice( __in struct _DRIVER_OBJECT *DriverObject, __in struct _DEVICE_OBJECT *PhysicalDeviceObject ) { . . . status = STATUS_SUCCESS; DebugPrint(('AddDevice: %p t...
LeenLi
2

votes
0

answer
509

Views

How do you calculate maximum CPU frequency from a WDM kernel-mode driver?

The problem is this: I'm trying to calculate CPU frequency within a kernel-mode WDM driver based on the IOCTL sample skeleton but it doesn't want to compile if I try to use QueryPerformanceFrequency or QueryPerformanceCounter. I feel like maybe because its a kernel-mode driver it won't let me includ...
Alexandru
3

votes
1

answer
1.6k

Views

UMDF, cannot specify [ClassInstall32] section for Microsoft-defined class

I'm working with the next tutorial: How to write your first USB client driver. And I've got a problem with compiling a project, I've got the next error: I was trying to do the steps closely to the description in tutorial, but always got the error above, when compiling the project. Also, I've tried t...
3

votes
2

answer
1.5k

Views

How does a Windows Kernel mode Driver, access paged memory?

1) A usermode process has its own 'address context', which maps the user-mode virtual addresses to a unique collection of physical page frames. That is, the meaning of any particular virtual address changes from one moment to the next as the Windows XP scheduler switches threads. Part of work of 'sw...
bakra
2

votes
0

answer
454

Views

Get keyboard (PS/2) scan code set, using asm

I would like to get my keyboard current scan code set. Code that I am using looks more or less like this: #define STATUSPORT 64h #define DATAPORT 60h #define PS2controllerOutputFull 0x20 #define PS2controllerInputFull 2h void sendByte() { __asm { push eax repeat : in al, STATUSPORT test al, PS2contr...
ladan
2

votes
1

answer
752

Views

How to make a usb device load my function driver?

I have written a usb function driver. if I want any usb device that plugged in my computer load this driver rather than its real driver, what should I do? I only know if I change vid/pid when bus driver create pdo, I can make it. But I don't know if there is a easy way to do it. How to change the bu...
Jack
2

votes
1

answer
870

Views

LINK : error LNK2001: unresolved external symbol NtProcessStartup

I am new to Windows driver development and minifilters and I am trying to build the nullFilter sample using command line tools. So I added #pragma comment(lib, 'FltMgr.lib') to the .c file and issued the following commands successfully: cl.exe /nologo /Fo../../bin\filter.obj /c filter.c /D _AMD64_ r...
user1973167
3

votes
0

answer
979

Views

implement virtual audio cable programmatically

Virtual Audio Cable is a Windows WDM multimedia driver that allows a user to transfer audio streams from one application to another. I want to implement this functionality programmaticaly. I will prefer to do it in c#. Any developer can guide me how to do it
sajjad
2

votes
1

answer
1.4k

Views

why we need to create two device objects ( PDO and FDO) for a single device attached to bus?

i m new in windows , while reading WDM driver , i encountered about device object (PDO and FDO) .I m not able to visualize why we need 2 different device object as after loading the driver why we again create FDO in ADDDevice routine . we can use PDO there as it represents same device.
uday singh
2

votes
1

answer
829

Views

how to call NdisOpenAdapterEx or the alternative outside the ProtocolBindAdapter routine?

I am porting the famous packet capture software -- WinPcap from NDIS 5.0 to NDIS 6.x. I tried to translate every NDIS 5.0 function to its 6.0 version. In WinPcap sourcecode function NdisOpenAdapter is called by NPF_OpenAdapter in Openclos.c. I translated it to NdisOpenAdapterEx for NDIS 6.0. But I c...
Yang Luo
8

votes
0

answer
1.7k

Views

How to manually deploy a driver service?

How do i manually deploy or register a Windows filter driver? Warning: There's a lot of 'proof of research effort' ahead. You don't have to read any more if you don't want to. I just point out, in detail, that i've tried what you're supposed to, i've tried what MSDN says, and i've tried everything a...
Ian Boyd
3

votes
0

answer
858

Views

How to create a Virtual Audio Loopback Device from MSVAD sample code obtained from WDK?

I am going to make a Virtual Audio Loopback Cable/Pipeline(a Virtual Audio Device).MSVAD source code getting along with WDK only perform capture and save audio data which apears at the input port of the device, I don't know how to implement CopyTo and CopyFrom functions to make a VALC such that any...
user2799465
1

votes
1

answer
1.7k

Views

why we can access memory from non paged pool at or above DISPATCH LEVEL

As I know that if IRQL level is dispatch then you can access memory from non paged pool. if we will try to access memory from paged pool.just wanted to know why ?
MM WDD
3

votes
0

answer
714

Views

Persistently write to a file from windows kernel driver

Hi I'm new to kernel level programming and trying to build a simple log writing driver. What I'm trying to achieve is to have a persistent driver will write referred text every predefined interval to a file in system path. (I'm not familiar IRQ hooking yet) I have following globals for timing // Ti...
Antonio Rodriguez
2

votes
0

answer
698

Views

Sending audio data to a user mode application from Virtual Audio Driver

I have my current task to send audio data from virtual audio driver to user mode application. First I need to create an instance of that virtual audio driver from an user mode application ... Please see the code snippet below //Generating the device info //That works SetupDiGetClassDevs( &KSCATEGORY...
zufluk
7

votes
3

answer
1.3k

Views

Will moving code into kernel space give more precise timing?

Background information: I presently have a hardware device that connects to the USB port. The hardware device is responsible sending out precise periodic messages onto various networks that it, in turn, connects too. Inside the hardware device I have a couple Microchip dsPICs. There are two modes...
Eric
2

votes
0

answer
1.5k

Views

Visual Studio 2012: Creating project from existing source code

I want to create WDM kernel driver project (for x64 and win32 config). I created one from VS File->New->Project from existing source code. For Project type there 4 options: Windows Application Project, Console, DLL, Static (LIB) project, and no other. So I create Lib and changed config (e.g. Platfor...
code muncher
4

votes
0

answer
658

Views

Error: this template attempted to load component assembly 'Microsoft.DriverKit.DriverWizard'

I am getting the following error when I try to create an empty project in Visual Studio 2013 for WDM Error: this template attempted to load component assembly 'Microsoft.DriverKit.DriverWizard, Version=6.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. For more information on this problem a...
2

votes
1

answer
649

Views

Where can I find a minimalistic WDM driver template with source code in it? [closed]

I came across kernel-mode drivers with very little experience. Here's what I am trying to do: Have a user-mode application that loads the driver. Have the user-mode application write to it, in order to send it an instruction. Have the driver send the RDMSR instruction to the Intel chip. Return the r...
Alexandru
2

votes
0

answer
544

Views

IKsPropertySet interface is not supported in IMFMediSource

I am porting my Direct Show camera based SDK to MFT. In my old code I have KSProxy interface like IksTopolgy,IKsControl and IKsProperty . IksTopolgy,IKsControl is used to enumerate the property set and IKsProperty to get/set the property value. Now I was trying to same in new code.I am able to...
Chris_vr
2

votes
1

answer
747

Views

Convert ProcessID to Process Handle

i am trying write basic driver for monitor process and get process path. i create PsSetCreateProcessNotifyRoutine and retrieve Process information using ZwQueryInformationProcess but in my ProcessCallback function when i try to get current process HANDLE using NtCurrentProcess, it give me current pr...
AminM

View additional questions