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.

32 lines
1012 B

  1. /*************************************************************************
  2. **
  3. ** OLE 2 Standard Utilities
  4. **
  5. ** olestd.c
  6. **
  7. ** This file contains utilities that are useful for dealing with
  8. ** target devices.
  9. **
  10. ** (c) Copyright Microsoft Corp. 1992 All Rights Reserved
  11. **
  12. *************************************************************************/
  13. #include "precomp.h"
  14. STDAPI_(BOOL) OleStdCompareTargetDevice(
  15. DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight)
  16. {
  17. if (ptdLeft == ptdRight)
  18. // same address of td; must be same (handles NULL case)
  19. return TRUE;
  20. else if ((ptdRight == NULL) || (ptdLeft == NULL))
  21. return FALSE;
  22. else if (ptdLeft->tdSize != ptdRight->tdSize)
  23. // different sizes, not equal
  24. return FALSE;
  25. else if (memcmp(ptdLeft, ptdRight, ptdLeft->tdSize) != 0)
  26. // not same target device, not equal
  27. return FALSE;
  28. return TRUE;
  29. }