Re: How to identify whether a function pointer is valid? by Jack
Jack
Wed Oct 17 07:56:16 PDT 2007
Yes, I know it.
I ever tested several vendor supplied host drivers on WinME.
Some host drivers did support this interface, and some host
drivers returned STATUS_NOT_SUPPORT.
The problem host driver I met returned STATUS_SUCCESS
,but the function pointer is invalid.
"Alexander Grigoriev" <alegr@earthlink.net> l...
> WinME doesn't provide USB_BUS_INTERFACE_USBDI_V1. You should check result
> of your QUERY_INTERFACE, it most likely fails.
>
> But there's no point in calling that function, because WinME doesn't
> support high speed USB anyway. Non-MS hosts that could provide support are
> unlikely to support this interface.
>
> "Jack Huang" <huangjj@hotmail.com> wrote in message
> news:e4DBwbAEIHA.5752@TK2MSFTNGP02.phx.gbl...
>> The driver runs on WinME x86 platform.
>> I didn't clear USB_BUS_INTERFACE_USBDI_V1 structure.
>> The function pointer value is filled by the bus driver.
>> I will zero the structure and check the return version number again.
>> Thanks for all suggestions.
>>
>> Best Regards
>> Jack Huang
>>
>> "Alexander Grigoriev" <alegr@earthlink.net> ...
>>> Are you running x64?
>>>
>>> "Jack Huang" <huangjj@hotmail.com> wrote in message
>>> news:e46h2d0DIHA.4584@TK2MSFTNGP03.phx.gbl...
>>>> My USB driver sends Irp to query USB_BUS_INTERFACE_USBDI_V1
>>>> from bus driver. It returns STATUS_SUCCESS and fills the structure.
>>>> I use USB_BUS_INTERFACE_USBDI_V1.IsDeviceHighSpeed() to query
>>>> the device running speed mode.
>>>> However, the IsDeviceHighSpeed() function pointer is invalid and not
>>>> NULL.
>>>> The system crashes immediately after the driver call the function
>>>> pointer.
>>>> The USB EHCI driver is 3rd party driver. I'm not surprised.
>>>> I want to know how the kernel driver to identify whether the function
>>>> pointer
>>>> is valid before it calls the function pointer.
>>>> Or how the kernel driver handle this kind of case.
>>>>
>>>> Best Regards
>>>> Jack Huang
>>>>
>>>
>>>
>>
>>
>
>