RE: [SPAM] Re:KMDF Question - Support query interface on PDO

Thanks for your reply. :slight_smile:

The version number is from 0 ~ 3, Config.ImportInterface = TRUE.

Does it have any method to solve this except
WdfDeviceInitAssignWdmIrpPreprocessCallback?

Thanks again!!

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Abhishek Ram
Sent: Friday, August 20, 2010 3:45 AM
To: Windows System Software Devs Interest List
Subject: [SPAM] Re:[ntdev] KMDF Question - Support query interface on
PDO

There is a known KMDF bug in the case where there are multiple versions
for the same GUID, but I’m not sure if that is the cause for what you’re
seeing.

Couple of questions: Is one of your interface version numbers ‘0’? And
do you specify Config.ImportInterface = FALSE for that version?

wrote in message news:xxxxx@ntdev…

Hi All,

I am developing a KMDF driver and it needs to support XXX_GUID
interface with different interface versions. Following up WDK document,
I implemented a function, AddQueryInterface() below to support XXX_GUID.

BUT I observed that ExposedInterface’s version is 0 (actually
ExposedInterface content are all zero) when
EvtDeviceProcessQueryInterfaceRequest() be called.

If I use WdfDeviceInitAssignWdmIrpPreprocessCallback api to
register preprocess callback to handle IRP_MN_QUERY_INTERFACE, I can get
correct interface version in EvtDeviceWdmIrpPreprocess callback.

WHY WDF clear ExposedInterface content? Do I miss any anything?

Thanks in advance!!

Note:

1. This associated device object is PDO.

2. AddQueryInterface() return STATUS_SUCCESS.

3. AddQueryInterface() is called from within an
EvtDevicePrepareHardware
ms-help:ralRef_a447de77-9692-4a48-83c2-3ced294863e4.xml.htm> callback.

NTSTATUS

AddQueryInterface(

IN WDFDEVICE WdfDevice

)

//

// add XXX_GUID

//

WDF_QUERY_INTERFACE_CONFIG_INIT(

&Config,

NULL,

&XXX_GUID,

EvtDeviceProcessQueryInterfaceRequest

);

Config.ImportInterface = TRUE;

Status = WdfDeviceAddQueryInterface(WdfDevice, &Config);

TRAP(NT_SUCCESS(Status));

return Status;

}

NTSTATUS

EvtDeviceProcessQueryInterfaceRequest(

IN WDFDEVICE Device,

IN LPGUID InterfaceType,

IN OUT PINTERFACE ExposedInterface,

IN OUT PVOID ExposedInterfaceSpecificData

)

{

TRAPMSG(“Trace”, FALSE);

return STATUS_UNSUCCESSFUL;

}


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</ms-help:>