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.

54 lines
984 B

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1998 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * Driver-specific data
  8. *
  9. * Abstract:
  10. *
  11. * This module gives drivers a way to attach private data to GDI+
  12. * objects.
  13. *
  14. * Created:
  15. *
  16. * 3/18/1999 agodfrey
  17. *
  18. \**************************************************************************/
  19. #include "precomp.hpp"
  20. DpDriverDataList::~DpDriverDataList()
  21. {
  22. DpDriverData *p=head;
  23. while (p)
  24. {
  25. DpDriverData *tmp = p->next;
  26. delete p;
  27. p = tmp;
  28. }
  29. }
  30. void DpDriverDataList::Add(DpDriverData *dd, DpDriver *owner)
  31. {
  32. dd->owner = owner;
  33. dd->next = head;
  34. head = dd;
  35. }
  36. DpDriverData *DpDriverDataList::GetData(DpDriver *owner)
  37. {
  38. DpDriverData *p=head;
  39. while (p)
  40. {
  41. if (p->owner == owner)
  42. {
  43. return p;
  44. }
  45. p = p->next;
  46. }
  47. return NULL;
  48. }