Prev: updated driver in OOBE(audit mode) no longer selected in normal mo
Next: How to access data buffers in a completion routine for a KMDF driv
From: Zaheer on 20 Jan 2010 04:24 The below code: WDFUSBINTERFACE UsbInterface ; UsbInterface = WdfUsbTargetDeviceGetInterface( pDeviceContext->WdfUsbTargetDevice,2); UsbInterface is returning NULL, I have tried giving the second parameter (InterfaceIndex ) to the function in range 0-2 still fails(returns NULL). Please let me know how to I find InterfaceIndex to be passed to this function Thanks, Zaheer Submitted via EggHeadCafe - Software Developer Portal of Choice SQL Server Stored Procedure Scripts By Dependency http://www.eggheadcafe.com/tutorials/aspnet/ad30d309-c488-4070-8db8-37aad7fc9103/sql-server-stored-procedu.aspx
From: Abhishek R [MSFT] on 20 Jan 2010 14:09 Please check the KMDF log using the KMDF debugger extensions. "Zaheer Khan" wrote in message news:201012042440mdzkhan(a)yahoo.com... > > The below code: > > WDFUSBINTERFACE UsbInterface ; > UsbInterface = > WdfUsbTargetDeviceGetInterface( > pDeviceContext->WdfUsbTargetDevice,2); > > UsbInterface is returning NULL, I have tried giving the second parameter > (InterfaceIndex ) to the function in range 0-2 still fails(returns NULL). > Please let me know how to I find InterfaceIndex to be passed to this > function > > Thanks, > Zaheer > > > Submitted via EggHeadCafe - Software Developer Portal of Choice > SQL Server Stored Procedure Scripts By Dependency > http://www.eggheadcafe.com/tutorials/aspnet/ad30d309-c488-4070-8db8-37aad7fc9103/sql-server-stored-procedu.aspx
From: Tim Roberts on 21 Jan 2010 00:23 Zaheer Khan wrote: > >The below code: > >WDFUSBINTERFACE UsbInterface ; >UsbInterface = WdfUsbTargetDeviceGetInterface(pDeviceContext->WdfUsbTargetDevice,2); > >UsbInterface is returning NULL, I have tried giving the second parameter >(InterfaceIndex ) to the function in range 0-2 still fails(returns NULL). >Please let me know how to I find InterfaceIndex to be passed to this >function Did you read the documentation? You are the only one who knows how the interfaces are laid out in your descriptors. The first interface in your configuration descriptor is number 0. The second interface is number 1. Did you call WdfUsbTargetDeviceSelectConfig first? -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Doron Holan [MSFT] on 22 Jan 2010 17:42
you can get WDFUSBINTERFACEs before you select a configuration (although none of the interfaces will be active if you do it before select config) d -- This posting is provided "AS IS" with no warranties, and confers no rights. "Tim Roberts" <timr(a)probo.com> wrote in message news:tjofl51epbgtdskos33hbpmfvs7e6uosra(a)4ax.com... > Zaheer Khan wrote: >> >>The below code: >> >>WDFUSBINTERFACE UsbInterface ; >>UsbInterface = >>WdfUsbTargetDeviceGetInterface(pDeviceContext->WdfUsbTargetDevice,2); >> >>UsbInterface is returning NULL, I have tried giving the second parameter >>(InterfaceIndex ) to the function in range 0-2 still fails(returns NULL). >>Please let me know how to I find InterfaceIndex to be passed to this >>function > > Did you read the documentation? You are the only one who knows how the > interfaces are laid out in your descriptors. The first interface in your > configuration descriptor is number 0. The second interface is number 1. > > Did you call WdfUsbTargetDeviceSelectConfig first? > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. |