Leaked source code of windows server 2003
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.

114 lines
4.3 KiB

  1. /*****************************************************************************
  2. * (C) COPYRIGHT MICROSOFT CORPORATION, 2002
  3. *
  4. * AUTHOR: ByronC
  5. *
  6. * DATE: 4/14/2002
  7. *
  8. * @doc INTERNAL
  9. *
  10. * @module WiaDeviceKey.h - Definitions for <c WiaDeviceKey> |
  11. *
  12. * This file contains the class definitions for <c WiaDeviceKey>.
  13. *
  14. *****************************************************************************/
  15. //
  16. // Defines
  17. //
  18. #define WiaDeviceKey_UNINIT_SIG 0x556B7644
  19. #define WiaDeviceKey_INIT_SIG 0x496B7644
  20. #define WiaDeviceKey_TERM_SIG 0x546B7644
  21. #define WiaDeviceKey_DEL_SIG 0x446B7644
  22. #define IMG_DEVNODE_CLASS_REGPATH L"SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}"
  23. #define IMG_DEVINTERFACE_REGPATH L"SYSTEM\\CurrentControlSet\\Control\\DeviceClasses\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}"
  24. /*****************************************************************************
  25. *
  26. * @doc INTERNAL
  27. *
  28. * @class WiaDeviceKey | Finds the appropriate WIA Device registry key
  29. *
  30. * @comm
  31. * This class is used to return the device registry key from the DeviceID.
  32. *
  33. *****************************************************************************/
  34. class WiaDeviceKey
  35. {
  36. //@access Public members
  37. public:
  38. // @cmember Constructor
  39. WiaDeviceKey(const CSimpleStringWide &cswDeviceID);
  40. // @cmember Destructor
  41. virtual ~WiaDeviceKey();
  42. // @cmember Increment reference count
  43. virtual ULONG __stdcall AddRef();
  44. // @cmember Decrement reference count
  45. virtual ULONG __stdcall Release();
  46. // @cmember Returns the path to the device registry key relative to HKLM
  47. CSimpleStringWide getDeviceKeyPath();
  48. // @cmember Returns the path to the device event registry key relative to HKLM
  49. CSimpleStringWide getDeviceEventKeyPath(const GUID &guidEvent);
  50. //@access Private members
  51. private:
  52. // @cmember Procedure used in registry key enumeration searching for devices.
  53. static bool ProcessDeviceKeys(CSimpleReg::CKeyEnumInfo &enumInfo );
  54. // @cmember Procedure used in registry key enumeration searching for an event.
  55. static bool ProcessEventSubKey(CSimpleReg::CKeyEnumInfo &enumInfo);
  56. // @cmember Procedure used in registry key enumeration.
  57. //static bool ProcessDeviceClassKeys(CKeyEnumInfo &enumInfo );
  58. // @cmember Signature of class
  59. ULONG m_ulSig;
  60. // @cmember Ref count
  61. ULONG m_cRef;
  62. // @cmember The DeviceID whose key we are searching for
  63. CSimpleStringWide m_cswDeviceID;
  64. // @cmember The string path relative to HKLM where we start our search
  65. CSimpleStringWide m_cswRootPath;
  66. // @cmember The device key string path relative to HKLM
  67. CSimpleStringWide m_cswDeviceKeyPath;
  68. // @cmember String stored for use when searching for a specific event sub-key
  69. CSimpleStringWide m_cswEventGuidString;
  70. //
  71. // Comments for member variables
  72. //
  73. // @mdata ULONG | WiaDeviceKey | m_ulSig |
  74. // The signature for this class, used for debugging purposes.
  75. // Doing a <nl>"db [addr_of_class]"<nl> would yield one of the following
  76. // signatures for this class:
  77. // @flag WiaDeviceKey_UNINIT_SIG | 'DvkU' - Object has not been successfully
  78. // initialized
  79. // @flag WiaDeviceKey_INIT_SIG | 'DvkI' - Object has been successfully
  80. // initialized
  81. // @flag WiaDeviceKey_TERM_SIG | 'DvkT' - Object is in the process of
  82. // terminating.
  83. // @flag WiaDeviceKey_INIT_SIG | 'DvkD' - Object has been deleted
  84. // (destructor was called)
  85. //
  86. //
  87. // @mdata ULONG | WiaDeviceKey | m_cRef |
  88. // The reference count for this class. Used for lifetime
  89. // management.
  90. //
  91. // @mdata CSimpleStringWide | WiaDeviceKey | m_cswDeviceID |
  92. // The DeviceID whose key we are searching for.
  93. //
  94. // @mdata CSimpleStringWide | WiaDeviceKey | m_cswRootPath |
  95. // The string path relative to HKLM where we start our search. Typically,
  96. // this is either ...\Control\Class\DEV_CLASS_IMAGE or ...\Control\DeviceClasses\DEV_CLASS_IMAGE\PnPID
  97. //
  98. // @mdata CSimpleStringWide | WiaDeviceKey | m_cswDeviceKeyPath |
  99. // The device key string path relative to HKLM
  100. //
  101. };