usbd.sys: Add partial USBD_ValidateConfigurationDescriptor implementation.
This commit is contained in:
parent
89ab0e4b12
commit
c540c98d55
|
@ -218,6 +218,26 @@ PUSB_COMMON_DESCRIPTOR WINAPI USBD_ParseDescriptors(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
USBD_STATUS WINAPI USBD_ValidateConfigurationDescriptor(
|
||||
PUSB_CONFIGURATION_DESCRIPTOR descr,
|
||||
ULONG length,
|
||||
USHORT level,
|
||||
PUCHAR *offset,
|
||||
ULONG tag )
|
||||
{
|
||||
FIXME( "(%p, %u, %u, %p, %u) partial stub!", descr, length, level, offset, tag );
|
||||
|
||||
if (offset) *offset = 0;
|
||||
|
||||
if (!descr ||
|
||||
length < sizeof(USB_CONFIGURATION_DESCRIPTOR) ||
|
||||
descr->bLength < sizeof(USB_CONFIGURATION_DESCRIPTOR) ||
|
||||
descr->wTotalLength < descr->bNumInterfaces * sizeof(USB_CONFIGURATION_DESCRIPTOR)
|
||||
) return USBD_STATUS_ERROR;
|
||||
|
||||
return USBD_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ULONG WINAPI USBD_GetInterfaceLength(
|
||||
PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor,
|
||||
PUCHAR BufferEnd )
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
@ stub USBD_GetDeviceInformation
|
||||
@ stdcall USBD_GetInterfaceLength(ptr ptr)
|
||||
@ stub USBD_GetPdoRegistryParameter
|
||||
@ stub USBD_GetRegistryKeyValue
|
||||
@ stub USBD_GetSuspendPowerState
|
||||
@ stdcall USBD_GetUSBDIVersion(ptr)
|
||||
@ stub USBD_InitializeDevice
|
||||
|
@ -30,4 +31,5 @@
|
|||
@ stub USBD_RemoveDevice
|
||||
@ stub USBD_RestoreDevice
|
||||
@ stub USBD_SetSuspendPowerState
|
||||
@ stdcall USBD_ValidateConfigurationDescriptor(ptr long long ptr long)
|
||||
@ stub USBD_WaitDeviceMutex
|
||||
|
|
|
@ -31,5 +31,6 @@ ULONG WINAPI USBD_GetInterfaceLength(PUSB_INTERFACE_DESCRIPTOR,PUCHAR);
|
|||
VOID WINAPI USBD_GetUSBDIVersion(PUSBD_VERSION_INFORMATION);
|
||||
PUSB_COMMON_DESCRIPTOR WINAPI USBD_ParseDescriptors(PVOID,ULONG,PVOID,LONG);
|
||||
PUSB_INTERFACE_DESCRIPTOR WINAPI USBD_ParseConfigurationDescriptorEx(PUSB_CONFIGURATION_DESCRIPTOR,PVOID,LONG,LONG,LONG,LONG,LONG);
|
||||
USBD_STATUS WINAPI USBD_ValidateConfigurationDescriptor(PUSB_CONFIGURATION_DESCRIPTOR,ULONG,USHORT,PUCHAR*,ULONG);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue