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.

47 lines
870 B

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: strlist.hxx
  7. //
  8. // Contents: CStrList header
  9. //
  10. // Classes: CStrList
  11. //
  12. //---------------------------------------------------------------
  13. #ifndef __STRLIST_HXX__
  14. #define __STRLIST_HXX__
  15. #include "drt.hxx"
  16. struct SStrEntry
  17. {
  18. SStrEntry *pseNext, *psePrev;
  19. union
  20. {
  21. void *pv;
  22. unsigned long dw;
  23. } user;
  24. OLECHAR atc[1]; // Actually contains the whole string
  25. };
  26. class CStrList
  27. {
  28. public:
  29. CStrList(void);
  30. ~CStrList(void);
  31. SStrEntry *Add(OLECHAR *ptcs);
  32. void Remove(SStrEntry *pse);
  33. SStrEntry *Find(OLECHAR *ptcs);
  34. void Empty(void);
  35. SStrEntry *GetHead(void) { return _pseHead; }
  36. private:
  37. SStrEntry *_pseHead;
  38. };
  39. #endif // #ifndef __STRLIST_HXX__