[wdmaudiodev] Weird behavior of driver interface

  • From: Eugene Muzychenko <emuzychenko@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 17 Jun 2009 18:06:46 +0700

My root-enumerated audio WDM driver creates a proprietary interface
for its control application. Interface is created using
IoRegisterDeviceInterface, then enabled using
IoSetDeviceInterfaceState.

User-mode control application obtains interface path using
SetupDiEnumDeviceInterfaces, ensures that SPINT_ACTIVE is set and
SPINT_REMOVED is not set, then opens it using CreateFile, then uses
DeviceIoControl to communicate with the driver.

For thousands of users, all works normally. But I have 5-6 users
running Windows XP (SP2 and SP3) who complain to errors. In those
systems, CreateFile is completed successfully, returning a valid
handle, but the driver does not receive IRP_MJ_CREATE (driver receives
no requests from this application at all). Then control
application issues DeviceIoControl to that handle but the driver, of
course, does not receive IRP_MJ_DEVICE_CONTROL and DeviceIoControl
returns ERROR_INVALID_FUNCTION.

Here is a log:

System: Arch=0 CPU=586 ProcRev=F0B NumProcs=4 ProcMask=F
OS version: 5.1.2600 SP 2.0, SPname="Service Pack 2", PID=2, SM=100, PT=1
Finding driver interface...
Interface 0: GUID=83ed7f0e-2028-4956-b0b4-39c76fdaef1d, Flg=1    
Drv IF: \\?\root#media#0000#{83ed7f0e-2028-4956-b0b4-39c76fdaef1d}    
Opening 
\\?\root#media#0000#{83ed7f0e-2028-4956-b0b4-39c76fdaef1d}\0d13c528-a6fc-47f1-8fee-c5dd46f1fbb1
    
Driver interface opened (DC)    
IoCtl to DC with 222004, ReqSize=4, ResSize=32    
IoCtl returned 0, LastErr=1, RetSize=3435973836    
IoCtl failed (0/1 - Incorrect function.)    
Error: Cannot get driver info (0/1 - Incorrect function.)    
Closing driver
 
Why this could happen?

Regards,
Eugene


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts:

  • » [wdmaudiodev] Weird behavior of driver interface - Eugene Muzychenko