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.

25 lines
609 B

  1. #include "private.h"
  2. #include "varutil.h"
  3. #include "varcomp.h"
  4. //+---------------------------------------------------------------------------
  5. //
  6. // CicVarCmp
  7. //
  8. //----------------------------------------------------------------------------
  9. HRESULT CicVarCmp(VARIANT *pvar1, VARIANT *pvar2)
  10. {
  11. if (V_VT(pvar1) != V_VT(pvar2))
  12. return S_FALSE;
  13. FCmp comp = VariantCompare.GetComparator( (VARENUM) pvar1->vt );
  14. if (!comp)
  15. return S_FALSE;
  16. if (!comp( (PROPVARIANT const &)*pvar1, (PROPVARIANT const &)*pvar2 ))
  17. return S_OK;
  18. return S_FALSE;
  19. }