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.

85 lines
2.0 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // enumerators.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class Enumerators.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/25/1999 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef ENUMERATORS_H
  19. #define ENUMERATORS_H
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif
  23. #include <ole2.h>
  24. ///////////////////////////////////////////////////////////////////////////////
  25. //
  26. // CLASS
  27. //
  28. // Enumerators
  29. //
  30. // DESCRIPTION
  31. //
  32. // Processes the Enumerators table from the dictionary database.
  33. //
  34. ///////////////////////////////////////////////////////////////////////////////
  35. class Enumerators
  36. {
  37. public:
  38. Enumerators() throw ()
  39. : begin(NULL), next(NULL), end(NULL)
  40. { }
  41. ~Enumerators() throw ();
  42. HRESULT initialize(IUnknown* session) throw ();
  43. // Must be called exactly once for each attribute ID.
  44. // Attribute IDs must be passed in ascending order.
  45. HRESULT getEnumerators(
  46. LONG id,
  47. VARIANT* pNames,
  48. VARIANT* pValues
  49. ) throw ();
  50. protected:
  51. // Must be called exactly once for each attribute ID.
  52. // Attribute IDs must be passed in ascending order.
  53. HRESULT getEnumerators(
  54. LONG id,
  55. LPSAFEARRAY* pNames,
  56. LPSAFEARRAY* pValues
  57. ) throw ();
  58. private:
  59. // Stores one row from the Enumerators table.
  60. struct Enumeration
  61. {
  62. LONG enumerates;
  63. LONG value;
  64. BSTR name;
  65. };
  66. Enumeration* begin; // Begin of cached rows.
  67. Enumeration* next; // Next row to be processed.
  68. Enumeration* end; // End of cached rows.
  69. // Not implemented.
  70. Enumerators(const Enumerators&);
  71. Enumerators& operator=(const Enumerators&);
  72. };
  73. #endif // ENUMERATORS_H