diff options
Diffstat (limited to 'private/ole2ui32/targtdev.cpp')
-rw-r--r-- | private/ole2ui32/targtdev.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/private/ole2ui32/targtdev.cpp b/private/ole2ui32/targtdev.cpp new file mode 100644 index 000000000..0dbbab08f --- /dev/null +++ b/private/ole2ui32/targtdev.cpp @@ -0,0 +1,32 @@ +/************************************************************************* +** +** OLE 2 Standard Utilities +** +** olestd.c +** +** This file contains utilities that are useful for dealing with +** target devices. +** +** (c) Copyright Microsoft Corp. 1992 All Rights Reserved +** +*************************************************************************/ + +#include "precomp.h" + +STDAPI_(BOOL) OleStdCompareTargetDevice( + DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight) +{ + if (ptdLeft == ptdRight) + // same address of td; must be same (handles NULL case) + return TRUE; + else if ((ptdRight == NULL) || (ptdLeft == NULL)) + return FALSE; + else if (ptdLeft->tdSize != ptdRight->tdSize) + // different sizes, not equal + return FALSE; + else if (memcmp(ptdLeft, ptdRight, ptdLeft->tdSize) != 0) + // not same target device, not equal + return FALSE; + + return TRUE; +} |