none
How to register the interrupt handle in AVStream framework? RRS feed

  • Question

  • Hello everyone, I have written an avstream minidriver. And I create a wdf device on it, but when I u register an interrupt in the driver, the system was been crash by the function "WdfInterruptCreate". Is there anyone can help me, thank you very much.

    The following is the key part of the driver for register interrupt:

    	pKsDevice = m_pDevice->GetKsDevice();
    	WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&deviceAttributes, HVEC_DEVICE_CONTEXT);
    	status = WdfDeviceMiniportCreate(WdfGetDriver(),
    					 &deviceAttributes,
    					 pKsDevice->FunctionalDeviceObject,
    					 pKsDevice->NextDeviceObject,
    					 pKsDevice->PhysicalDeviceObject ,
    					 &m_Device);
    
    	if (!NT_SUCCESS(status))
    	{
    		DbgPrint("WdfDeviceMiniportCreate failed = %x!!!\n", status);
    		return STATUS_HARDWARE_MEMORY_ERROR;
    	}
    
    	WDF_INTERRUPT_CONFIG_INIT(&interruptConfig,
    					Hvec_EvtInterruptIsr,
    					Hvec_EvtInterruptDpc);
    
    
    
     	//here cause a system crash
    	status = WdfInterruptCreate(m_Device,
    				    &interruptConfig,
    				    WDF_NO_OBJECT_ATTRIBUTES,
    				    &m_Interrupt);


    Wednesday, July 16, 2014 8:52 AM

Answers

  • you cant use wdfinterrupts in miniport mode.and the system isn't crashing, if you attach a kernel debugger you will see kmdf is breaking in and telling upj exactly what I just did

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, July 16, 2014 3:33 PM
  • you can call IOConnectInterrupt in your kmdf miniport

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Sharyu0526 Friday, July 18, 2014 2:10 AM
    Thursday, July 17, 2014 2:42 AM

All replies

  • you cant use wdfinterrupts in miniport mode.and the system isn't crashing, if you attach a kernel debugger you will see kmdf is breaking in and telling upj exactly what I just did

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, July 16, 2014 3:33 PM
  • Dear Holan, Thank you very much. But I do need to use the interrupt in miniport mode necessarily. Should I make it via WDM?
    Thursday, July 17, 2014 2:33 AM
  • you can call IOConnectInterrupt in your kmdf miniport

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Sharyu0526 Friday, July 18, 2014 2:10 AM
    Thursday, July 17, 2014 2:42 AM
  • Oh, yes! Thank you very much.

    Friday, July 18, 2014 2:10 AM