This function returns 0 for success, in which case result contains the result of the comparison.
Otherwise, this function returns the following:
SLAPI_VIRTUALATTRS_LOOP_DETECTED (failed to evaluate a virtual attribute).
SLAPI_VIRTUAL_NOT_FOUND (type not recognized by any virtual attribute and not a real attr in entry).
ENOMEM (memory error).