Some miniport drivers can use Kernel-Mode Driver Framework, if the port/miniport architecture allows the miniport driver to communicate with other drivers by using WDM or framework interfaces. For example, NDIS miniport drivers with a WDM lower edge can use the framework to implement the lower edge.
If you want your miniport driver to use the framework, the driver must:
Set the WdfDriverInitNoDispatchOverride flag in the DriverInitFlags member of the driver's WDF_DRIVER_CONFIG structure before calling WdfDriverCreate. Setting this flag enables the port driver, instead of the framework, to intercept I/O request packets (IRPs) that the I/O manager has directed to the driver.
Call WdfDeviceMiniportCreate instead of WdfDeviceCreate to create framework device objects for the miniport driver's devices. The miniport driver should call WdfDeviceMiniportCreate when its port driver informs it that a device is available.
Call WdfObjectDelete to delete the device object that WdfDeviceMiniportCreate creates, when the driver determines that the device has been removed. (Because the driver has set the WdfDriverInitNoDispatchOverride flag, the framework cannot determine when the device is removed and cannot delete the device object.)
Call WdfDriverMiniportUnload when the port driver informs the miniport driver that it is about to be unloaded.
A miniport driver can use the framework only if the underlying device supports Plug and Play (PnP). Miniport drivers cannot use the framework's control device objects.