219 {
220 VARTYPE safearray_vartype;
221
222
223 if (
FAILED(SafeArrayGetVartype(safearray, &safearray_vartype)))
224 return 1;
225
226
227 if (
Type() != safearray_vartype)
228 return (
Type() < safearray_vartype) ? (-1) : 1;
229
230 ScopedSafearray scoped_safearray(safearray);
231 int compare_result = 0;
233 case VT_BOOL:
234 compare_result = CompareAgainstSafearray<VT_BOOL>(
235 vector_, scoped_safearray, ignore_case);
236 break;
237 case VT_I1:
238 compare_result = CompareAgainstSafearray<VT_I1>(vector_, scoped_safearray,
239 ignore_case);
240 break;
241 case VT_UI1:
242 compare_result = CompareAgainstSafearray<VT_UI1>(
243 vector_, scoped_safearray, ignore_case);
244 break;
245 case VT_I2:
246 compare_result = CompareAgainstSafearray<VT_I2>(vector_, scoped_safearray,
247 ignore_case);
248 break;
249 case VT_UI2:
250 compare_result = CompareAgainstSafearray<VT_UI2>(
251 vector_, scoped_safearray, ignore_case);
252 break;
253 case VT_I4:
254 compare_result = CompareAgainstSafearray<VT_I4>(vector_, scoped_safearray,
255 ignore_case);
256 break;
257 case VT_UI4:
258 compare_result = CompareAgainstSafearray<VT_UI4>(
259 vector_, scoped_safearray, ignore_case);
260 break;
261 case VT_I8:
262 compare_result = CompareAgainstSafearray<VT_I8>(vector_, scoped_safearray,
263 ignore_case);
264 break;
265 case VT_UI8:
266 compare_result = CompareAgainstSafearray<VT_UI8>(
267 vector_, scoped_safearray, ignore_case);
268 break;
269 case VT_R4:
270 compare_result = CompareAgainstSafearray<VT_R4>(vector_, scoped_safearray,
271 ignore_case);
272 break;
273 case VT_R8:
274 compare_result = CompareAgainstSafearray<VT_R8>(vector_, scoped_safearray,
275 ignore_case);
276 break;
277 case VT_DATE:
278 compare_result = CompareAgainstSafearray<VT_DATE>(
279 vector_, scoped_safearray, ignore_case);
280 break;
281 case VT_BSTR:
282 compare_result = CompareAgainstSafearray<VT_BSTR>(
283 vector_, scoped_safearray, ignore_case);
284 break;
285 case VT_DISPATCH:
286 compare_result = CompareAgainstSafearray<VT_DISPATCH>(
287 vector_, scoped_safearray, ignore_case);
288 break;
289 case VT_UNKNOWN:
290 compare_result = CompareAgainstSafearray<VT_UNKNOWN>(
291 vector_, scoped_safearray, ignore_case);
292 break;
293
294
295
296
297
298
299
300
301
302
303
304 default:
305 compare_result = 1;
307 break;
308 }
309
310 scoped_safearray.Release();
311 return compare_result;
312}
#define BASE_UNREACHABLE()