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.

116 lines
2.4 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. pdict.hxx
  5. Abstract:
  6. defines package details dictionary.
  7. Notes:
  8. History:
  9. VibhasC Sep-29-1996 Created.
  10. ----------------------------------------------------------------------------*/
  11. #ifndef __PDICT_HXX__
  12. #define __PDICT_HXX__
  13. /****************************************************************************
  14. * include files
  15. ***************************************************************************/
  16. extern "C"
  17. {
  18. #define INC_OLE2
  19. #include <windows.h>
  20. #include <stdio.h>
  21. #include <stdlib.h>
  22. #include <memory.h>
  23. #include <assert.h>
  24. }
  25. #include "dict.hxx"
  26. #include "message.hxx"
  27. /****************************************************************************
  28. * externs
  29. ***************************************************************************/
  30. extern int CompareClassIDKey( void *, void *);
  31. extern void PrintClassIDKey( void * );
  32. extern int CompareClassIDKey( void *, void *);
  33. extern void PrintClassIDKey( void * );
  34. class PDICT : public Dictionary
  35. {
  36. public:
  37. //
  38. // The dictionary constructor must be supplied with the
  39. // comparison and print routines.
  40. //
  41. PDICT() : Dictionary( )
  42. {
  43. }
  44. //
  45. // The resource dictionary must delete all the resources it allocated.
  46. //
  47. ~PDICT()
  48. {
  49. Clear();
  50. }
  51. //
  52. // Insert an interface entry into the dictionary based on iid.
  53. // The entry is assumed preallocated and is not allocated by this
  54. // dictionary.
  55. //
  56. PACKAGE_ENTRY * Insert( PACKAGE_ENTRY * pInterfaceId);
  57. //
  58. // Given an interface ID, search for it in the dictionary.
  59. //
  60. PACKAGE_ENTRY * Search( char * IID, DWORD Context );
  61. //
  62. // Get the first item in the dictionary.
  63. //
  64. PACKAGE_ENTRY * GetFirst();
  65. //
  66. // Get the next item in the dictionary. This method takes the last found
  67. // interface entry as a parameter and returns the next in the dictionary.
  68. // In conjunction with the GetFirst function, this function is useful for
  69. // listing all the items in the dictionary.
  70. // .
  71. //
  72. PACKAGE_ENTRY * GetNext( PACKAGE_ENTRY * pLastInterfaceEntry );
  73. //
  74. // Clear up the dictionary by deleting all the entries allocated.
  75. //
  76. void Clear();
  77. //
  78. // Comparison function...
  79. //
  80. virtual
  81. int Compare (pUserType pL, pUserType pR);
  82. };
  83. #endif // __PDICT_HXX__