Nasty gotcha: VarCmp vs VariantCompare
There are two functions for comparing
VARIANTs. One comes from the COM team, called
VarCmp. Assuming a successful comparison, it returns
This is consistent with the other
On the other hand, the
VariantCompare function comes from the shell, and it returns
So be careful which one you’re calling and how you’re testing the result.