16 IN PUSBUSER_CONTROLLER_UNICODE_NAME ControllerName,
24 DPRINT(
"USBPORT_UserGetHcName: ... \n");
28 Length = ControllerName->Header.RequestBufferLength -
29 sizeof(USBUSER_CONTROLLER_UNICODE_NAME);
43 ControllerName->Header.UsbUserStatusCode = UsbUserBufferTooSmall;
47 ControllerName->Header.UsbUserStatusCode = UsbUserInvalidParameter;
52 ControllerName->Header.UsbUserStatusCode = UsbUserSuccess;
56 ControllerName->
Header.ActualBufferLength =
sizeof(USBUSER_CONTROLLER_UNICODE_NAME) +
73 DPRINT(
"USBPORT_GetSymbolicName: ... \n");
76 RootHubName = &
PdoExtension->CommonExtension.SymbolicLinkName;
84 LengthName = RootHubName->
Length;
139 DPRINT(
"USBPORT_RegisterDeviceInterface: DestinationString - %wZ\n",
148 IN PUSBUSER_CONTROLLER_UNICODE_NAME RootHubName,
157 DPRINT(
"USBPORT_UserGetRootHubName: ... \n");
161 Length = RootHubName->Header.RequestBufferLength -
162 sizeof(USBUSER_CONTROLLER_UNICODE_NAME);
192 RootHubName->Header.UsbUserStatusCode = UsbUserBufferTooSmall;
196 RootHubName->Header.UsbUserStatusCode = UsbUserInvalidParameter;
201 RootHubName->Header.UsbUserStatusCode = UsbUserSuccess;
205 RootHubName->
Header.ActualBufferLength =
sizeof(USBUSER_CONTROLLER_UNICODE_NAME) +
220 PUSBUSER_CONTROLLER_UNICODE_NAME ControllerName;
224 DPRINT(
"USBPORT_GetUnicodeName: ... \n");
227 DriverKey =
Irp->AssociatedIrp.SystemBuffer;
238 Length =
sizeof(USBUSER_CONTROLLER_UNICODE_NAME);
253 ControllerName->Header.RequestBufferLength =
Length;
258 ControllerName->
Header.UsbUserRequest = USBUSER_GET_CONTROLLER_DRIVER_KEY;
263 ControllerName->Header.UsbUserRequest = USBUSER_GET_ROOTHUB_SYMBOLIC_NAME;
267 if (ControllerName->Header.UsbUserStatusCode != UsbUserBufferTooSmall)
272 Length = ControllerName->Header.ActualBufferLength;
277 if (ControllerName->Header.UsbUserStatusCode != UsbUserSuccess)
283 ActualLength =
sizeof(
ULONG) + ControllerName->UnicodeName.Length;
295 ControllerName->UnicodeName.String,
296 ControllerName->UnicodeName.Length);
311 DPRINT1(
"USBPORT_PdoDeviceControl: UNIMPLEMENTED. FIXME. \n");
341 DPRINT(
"USBPORT_PdoInternalDeviceControl: IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO\n");
355 DPRINT(
"USBPORT_PdoInternalDeviceControl: IOCTL_INTERNAL_USB_GET_HUB_COUNT\n");
366 if (IoCtl == IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE)
368 DPRINT(
"USBPORT_PdoInternalDeviceControl: IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE\n");
379 if (IoCtl == IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION)
381 DPRINT(
"USBPORT_PdoInternalDeviceControl: IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION\n");
385 DPRINT(
"USBPORT_PdoInternalDeviceControl: INVALID INTERNAL DEVICE CONTROL\n");
405 DPRINT(
"USBPORT_FdoDeviceControl: Irp - %p\n",
Irp);
415 DPRINT(
"USBPORT_FdoDeviceControl: IOCTL_USB_DIAGNOSTIC_MODE_ON\n");
420 DPRINT(
"USBPORT_FdoDeviceControl: IOCTL_USB_DIAGNOSTIC_MODE_OFF\n");
425 DPRINT1(
"USBPORT_FdoDeviceControl: IOCTL_USB_GET_NODE_INFORMATION\n");
430 DPRINT1(
"USBPORT_FdoDeviceControl: IOCTL_GET_HCD_DRIVERKEY_NAME\n");
434 case IOCTL_USB_USER_REQUEST:
435 DPRINT1(
"USBPORT_FdoDeviceControl: IOCTL_USB_USER_REQUEST UNIMPLEMENTED. FIXME\n");
439 DPRINT1(
"USBPORT_FdoDeviceControl: Not supported IoControlCode - %x\n",
457 DPRINT1(
"USBPORT_FdoInternalDeviceControl: UNIMPLEMENTED. FIXME. \n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define NT_SUCCESS(StatCode)
VOID NTAPI USBPORT_UserGetRootHubName(IN PDEVICE_OBJECT FdoDevice, IN PUSBUSER_CONTROLLER_UNICODE_NAME RootHubName, IN PUSB_UNICODE_NAME UnicodeName)
NTSTATUS NTAPI USBPORT_FdoInternalDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
VOID NTAPI USBPORT_UserGetHcName(IN PDEVICE_OBJECT FdoDevice, IN PUSBUSER_CONTROLLER_UNICODE_NAME ControllerName, IN PUSB_UNICODE_NAME UnicodeName)
NTSTATUS NTAPI USBPORT_GetUnicodeName(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PULONG_PTR Information)
NTSTATUS NTAPI USBPORT_GetSymbolicName(IN PDEVICE_OBJECT RootHubPdo, IN PUNICODE_STRING DestinationString)
NTSTATUS NTAPI USBPORT_FdoDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_PdoInternalDeviceControl(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_PdoDeviceControl(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_IdleNotification(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
#define ExAllocatePoolWithTag(hernya, size, tag)
IN PDCB IN POEM_STRING IN PUNICODE_STRING UnicodeName
#define ExFreePoolWithTag(_P, _T)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
_Out_ _Inout_ POEM_STRING DestinationString
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IoCompleteRequest
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
#define STATUS_BUFFER_TOO_SMALL
FSRTL_ADVANCED_FCB_HEADER Header
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
struct _IO_STACK_LOCATION::@3974::@4013 Others
WCHAR DriverKeyName[ANYSIZE_ARRAY]
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
NTSTATUS NTAPI USBPORT_HandleSubmitURB(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp, IN PURB Urb)
#define URB_FROM_IRP(Irp)
#define IOCTL_INTERNAL_USB_SUBMIT_URB
#define IOCTL_USB_DIAGNOSTIC_MODE_ON
#define IOCTL_GET_HCD_DRIVERKEY_NAME
#define IOCTL_USB_DIAGNOSTIC_MODE_OFF
#define IOCTL_USB_GET_NODE_INFORMATION
#define IOCTL_INTERNAL_USB_GET_HUB_COUNT
#define IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO
#define USBPORT_FLAG_DIAGNOSTIC_MODE
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
@ DevicePropertyDriverKeyName