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.

125 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. WiaWrappers.h
  5. Abstract:
  6. Author:
  7. Hakki T. Bostanci (hakkib) 06-Apr-2000
  8. Revision History:
  9. --*/
  10. #ifndef _WIAWRAPPERS_H_
  11. #define _WIAWRAPPERS_H_
  12. //////////////////////////////////////////////////////////////////////////
  13. //
  14. //
  15. //
  16. class CWiaDevCap : public WIA_DEV_CAP
  17. {
  18. public:
  19. CWiaDevCap()
  20. {
  21. ZeroMemory(this, sizeof(*this));
  22. }
  23. ~CWiaDevCap()
  24. {
  25. SysFreeString(bstrName);
  26. SysFreeString(bstrDescription);
  27. SysFreeString(bstrIcon);
  28. SysFreeString(bstrCommandline);
  29. }
  30. public:
  31. bool operator ==(const CWiaDevCap &rhs)
  32. {
  33. return
  34. ulFlags == rhs.ulFlags &&
  35. guid == rhs.guid &&
  36. wcssafecmp(bstrName, rhs.bstrName) == 0 &&
  37. wcssafecmp(bstrDescription, rhs.bstrDescription) == 0 &&
  38. wcssafecmp(bstrIcon, rhs.bstrIcon) == 0 &&
  39. wcssafecmp(bstrCommandline, rhs.bstrCommandline) == 0;
  40. }
  41. bool operator !=(const CWiaDevCap &rhs)
  42. {
  43. return !(*this == rhs);
  44. }
  45. };
  46. //////////////////////////////////////////////////////////////////////////
  47. //
  48. //
  49. //
  50. class CWiaFormatInfo : public WIA_FORMAT_INFO
  51. {
  52. public:
  53. CWiaFormatInfo()
  54. {
  55. guidFormatID = GUID_NULL;
  56. lTymed = TYMED_NULL;
  57. }
  58. CWiaFormatInfo(
  59. const GUID *pguidFormatID,
  60. LONG _lTymed
  61. )
  62. {
  63. guidFormatID = pguidFormatID ? *pguidFormatID : GUID_NULL;
  64. lTymed = _lTymed;
  65. }
  66. public:
  67. bool operator ==(const CWiaFormatInfo &rhs)
  68. {
  69. return
  70. lTymed == rhs.lTymed &&
  71. guidFormatID == rhs.guidFormatID;
  72. }
  73. bool operator !=(const CWiaFormatInfo &rhs)
  74. {
  75. return !(*this == rhs);
  76. }
  77. };
  78. //////////////////////////////////////////////////////////////////////////
  79. //
  80. //
  81. //
  82. class CWiaDataTransferInfo : public WIA_DATA_TRANSFER_INFO
  83. {
  84. public:
  85. CWiaDataTransferInfo(
  86. ULONG _ulSection,
  87. ULONG _ulBufferSize,
  88. BOOL _bDoubleBuffer
  89. )
  90. {
  91. ulSize = sizeof(WIA_DATA_TRANSFER_INFO);
  92. ulSection = _ulSection;
  93. ulBufferSize = _ulBufferSize;
  94. bDoubleBuffer = _bDoubleBuffer;
  95. ulReserved1 = 0;
  96. ulReserved2 = 0;
  97. ulReserved3 = 0;
  98. }
  99. };
  100. #endif //_WIAWRAPPERS_H_