Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1995
  4. * TITLE: USBINFO.CPP
  5. * VERSION: 1.0
  6. * AUTHOR: jsenior
  7. * DATE: 10/28/1998
  8. *
  9. ********************************************************************************
  10. *
  11. * CHANGE LOG:
  12. *
  13. * DATE REV DESCRIPTION
  14. * ---------- ------- ----------------------------------------------------------
  15. * 10/28/1998 jsenior Original implementation.
  16. *
  17. *******************************************************************************/
  18. #include "UsbItem.h"
  19. #include "debug.h"
  20. UsbConfigInfo::UsbConfigInfo() : devInst(0), usbFailure(0), status(0),
  21. problemNumber(0)
  22. {
  23. }
  24. UsbConfigInfo::UsbConfigInfo(
  25. const UsbString& Desc, const UsbString& Class, DWORD Failure,
  26. ULONG Status, ULONG Problem) : devInst(0), deviceDesc(Desc),
  27. deviceClass(Class), usbFailure(Failure), status(Status),
  28. problemNumber(Problem)
  29. {
  30. }
  31. UsbDeviceInfo::UsbDeviceInfo() : connectionInfo(0),
  32. configDesc(0), configDescReq(0), isHub(FALSE)
  33. {
  34. ZeroMemory(&hubInfo, sizeof(USB_NODE_INFORMATION));
  35. }
  36. /*UsbDeviceInfo::UsbDeviceInfo(const UsbDeviceInfo& UDI) : hubName(UDI.hubName),
  37. isHub(UDI.isHub), hubInfo(UDI.hubInfo), configDesc(UDI.configDesc),
  38. {
  39. if (UDI.connectionInfo) {
  40. char *tmp = new char[CONNECTION_INFO_SIZE];
  41. AddChunk(tmp);
  42. connectionInfo = (PUSB_NODE_CONNECTION_INFORMATION) tmp;
  43. memcpy(connectionInfo, UDI.connectionInfo, CONNECTION_INFO_SIZE);
  44. }
  45. else
  46. connectionInfo = 0;
  47. } */
  48. UsbDeviceInfo::~UsbDeviceInfo()
  49. {
  50. if (configDesc) {
  51. LocalFree(configDescReq);
  52. }
  53. if (connectionInfo) {
  54. LocalFree(connectionInfo);
  55. }
  56. }