WdfDeviceCreateDeviceInterface failed with STATUS_INVALID_DEVICE_REQUEST on vista

Hi all,

I have written a virtual comport driver for an USB to SERIAL
converter. The same driver acts as the functional driver for the USB
controller and bus driver for the (two) virtual com ports. It also acts as
the functional driver for the com ports.

I am trying to create an interface (GUID_DEVINTERFACE_COMPORT)
for the port FDOs, from EvtPrepareHardware callback using
WdfDeviceCreateDeviceInterface function. In windows XP it is working fine.
But in Vista OS WdfDeviceCreateDeviceInterface is getting failed with status
STATUS_INVALID_DEVICE_REQUEST. I have dumped the wdf log file using
!wdflogdump command. But the log doesn’t have any entry regarding this
failure. Can anybody give me some hint on tracing this issue?

Regards,

Deepu.

My guess is that the underlying WDM api is failing. Have you manually removed devices from the machine by editing the registry by hand?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 10:39 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfDeviceCreateDeviceInterface failed with STATUS_INVALID_DEVICE_REQUEST on vista

Hi all,
I have written a virtual comport driver for an USB to SERIAL converter. The same driver acts as the functional driver for the USB controller and bus driver for the (two) virtual com ports. It also acts as the functional driver for the com ports.

I am trying to create an interface (GUID_DEVINTERFACE_COMPORT) for the port FDOs, from EvtPrepareHardware callback using WdfDeviceCreateDeviceInterface function. In windows XP it is working fine. But in Vista OS WdfDeviceCreateDeviceInterface is getting failed with status STATUS_INVALID_DEVICE_REQUEST. I have dumped the wdf log file using !wdflogdump command. But the log doesn’t have any entry regarding this failure. Can anybody give me some hint on tracing this issue?

Regards,
Deepu.


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

Hi,

I have used Device Manager to install and uninstall the driver
in both XP and Vista. The documentation says that, “To register an instance
of a device interface class, a framework-based driver can call
WdfDeviceCreateDeviceInterface from within its EvtDriverDeviceAdd callback
function”. Does it mean that we cannot call it from EvtPrepareHardware?

Regards,

Deepu


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, September 17, 2008 11:14 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

My guess is that the underlying WDM api is failing. Have you manually
removed devices from the machine by editing the registry by hand?

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 10:39 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

Hi all,

I have written a virtual comport driver for an USB to SERIAL
converter. The same driver acts as the functional driver for the USB
controller and bus driver for the (two) virtual com ports. It also acts as
the functional driver for the com ports.

I am trying to create an interface (GUID_DEVINTERFACE_COMPORT)
for the port FDOs, from EvtPrepareHardware callback using
WdfDeviceCreateDeviceInterface function. In windows XP it is working fine.
But in Vista OS WdfDeviceCreateDeviceInterface is getting failed with status
STATUS_INVALID_DEVICE_REQUEST. I have dumped the wdf log file using
!wdflogdump command. But the log doesn’t have any entry regarding this
failure. Can anybody give me some hint on tracing this issue?

Regards,

Deepu.


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


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

Typically you register it in AddDevice, but if you want to inspect state/hardware, PrepareHardware is a valid place to do it. To see if KMDF is truly the cause of the failure, just try to call IoRegisterDeviceInterface yourself in PrepareHardare and see what it returns. If !NT_SUCCESS, the underlying api has a problem. If NT_SUCCESS, it would probably point towards KMDF

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 11:33 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with STATUS_INVALID_DEVICE_REQUEST on vista

Hi,
I have used Device Manager to install and uninstall the driver in both XP and Vista. The documentation says that, ?To register an instance of a device interface class, a framework-based driver can call WdfDeviceCreateDeviceInterface from within its EvtDriverDeviceAdd callback function?. Does it mean that we cannot call it from EvtPrepareHardware?

Regards,
Deepu


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, September 17, 2008 11:14 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with STATUS_INVALID_DEVICE_REQUEST on vista

My guess is that the underlying WDM api is failing. Have you manually removed devices from the machine by editing the registry by hand?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 10:39 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfDeviceCreateDeviceInterface failed with STATUS_INVALID_DEVICE_REQUEST on vista

Hi all,
I have written a virtual comport driver for an USB to SERIAL converter. The same driver acts as the functional driver for the USB controller and bus driver for the (two) virtual com ports. It also acts as the functional driver for the com ports.

I am trying to create an interface (GUID_DEVINTERFACE_COMPORT) for the port FDOs, from EvtPrepareHardware callback using WdfDeviceCreateDeviceInterface function. In windows XP it is working fine. But in Vista OS WdfDeviceCreateDeviceInterface is getting failed with status STATUS_INVALID_DEVICE_REQUEST. I have dumped the wdf log file using !wdflogdump command. But the log doesn’t have any entry regarding this failure. Can anybody give me some hint on tracing this issue?

Regards,
Deepu.


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


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


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

Hi,

I have checked it with IoRegisterDeviceInterface it is also
failing with STATUS_INVALID_DEVICE_REQUEST. Let me try it on a fresh vista
machine.

Regards

Deepu.LR


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, September 17, 2008 12:07 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

Typically you register it in AddDevice, but if you want to inspect
state/hardware, PrepareHardware is a valid place to do it. To see if KMDF
is truly the cause of the failure, just try to call
IoRegisterDeviceInterface yourself in PrepareHardare and see what it
returns. If !NT_SUCCESS, the underlying api has a problem. If NT_SUCCESS,
it would probably point towards KMDF

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 11:33 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

Hi,

I have used Device Manager to install and uninstall the driver
in both XP and Vista. The documentation says that, “To register an instance
of a device interface class, a framework-based driver can call
WdfDeviceCreateDeviceInterface from within its EvtDriverDeviceAdd callback
function”. Does it mean that we cannot call it from EvtPrepareHardware?

Regards,

Deepu


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, September 17, 2008 11:14 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

My guess is that the underlying WDM api is failing. Have you manually
removed devices from the machine by editing the registry by hand?

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Deepu.LR
Sent: Tuesday, September 16, 2008 10:39 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfDeviceCreateDeviceInterface failed with
STATUS_INVALID_DEVICE_REQUEST on vista

Hi all,

I have written a virtual comport driver for an USB to SERIAL
converter. The same driver acts as the functional driver for the USB
controller and bus driver for the (two) virtual com ports. It also acts as
the functional driver for the com ports.

I am trying to create an interface (GUID_DEVINTERFACE_COMPORT)
for the port FDOs, from EvtPrepareHardware callback using
WdfDeviceCreateDeviceInterface function. In windows XP it is working fine.
But in Vista OS WdfDeviceCreateDeviceInterface is getting failed with status
STATUS_INVALID_DEVICE_REQUEST. I have dumped the wdf log file using
!wdflogdump command. But the log doesn’t have any entry regarding this
failure. Can anybody give me some hint on tracing this issue?

Regards,

Deepu.


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


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


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


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