Home > other >  WdfFdoQueryForInterface functions return an error
WdfFdoQueryForInterface functions return an error

Time:11-25

During the compilation of the Intel DPDK drive, found that the drivers don't compiled after the installation, debugging found WdfFdoQueryForInterface functions return an error, return the status value for c00000bb, part of the code is as follows:
Get_pci_device_info (_In_ WDFOBJECT device)
{
NTSTATUS status=STATUS_UNSUCCESSFUL;

PNETUIO_CONTEXT_DATA netuio_contextdata;
Netuio_contextdata=https://bbs.csdn.net/topics/netuio_get_context_data (device);

if (! Netuio_contextdata)
Return the status;

Netuio_contextdata - & gt; Wdf_device=device;//Store for later use

//Obtain the BUS_INTERFACE_STANDARD interface from the Bus Driver
DbgPrintEx (DPFLTR_IHVNETWORK_ID DPFLTR_NETUIO_INFO_LEVEL, "get_pci_device_info 111 \ n");
Status=WdfFdoQueryForInterface (device, & amp; GUID_BUS_INTERFACE_STANDARD,
(PINTERFACE) & amp; Netuio_contextdata - & gt; Bus_interface,
Sizeof (BUS_INTERFACE_STANDARD), 1, NULL);
if (! NT_SUCCESS (status))
{
DbgPrintEx (DPFLTR_IHVNETWORK_ID DPFLTR_NETUIO_INFO_LEVEL, "get_pci_device_info status 08 x % \ n", status);
Return the status;
}

//Retrieve the B, D, F the details of our device
PDEVICE_OBJECT pdo=NULL points;
The pdo=WdfDeviceWdmGetPhysicalDevice (device);
If (pdo) {
ULONG prop=0, length=0;
Status=IoGetDeviceProperty (pdo, DevicePropertyBusNumber, sizeof (ULONG), (PVOID) & amp; Netuio_contextdata - & gt; Addr. Bus_num, & amp; Length);
Status=IoGetDeviceProperty (pdo, DevicePropertyAddress, sizeof (ULONG), (PVOID) & amp; Prop, & amp; Length);

If (NT_SUCCESS (status)) {
Netuio_contextdata - & gt; Addr. Func_num=prop & amp; 0 x0000ffff;
Netuio_contextdata - & gt; Addr. Dev_num=((prop & gt;> 16) & amp; 0 x0000ffff);
}
//braking, retrieve the NUMA node of the device
USHORT numaNode;
Status=IoGetDeviceNumaNode (pdo, & amp; NumaNode);
If (NT_SUCCESS (status)) {
Netuio_contextdata - & gt; Dev_numa_node=numaNode;
}
}

Return the status;
}
Could you tell me how to use WdfFdoQueryForInterface function, how to solve? Thank you for the
  • Related