284{
285 DISPID id, public_prop_id, public_prop2_id, public_func_id, public_sub_id, defvalget_id, gs_getter_id;
286 DISPID named_args[5] = {DISPID_PROPERTYPUT};
293
294 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
295 ok(
hres ==
S_OK,
"Could not get IDispatchEx iface: %08x\n",
hres);
296
298 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &public_prop_id);
301
303 hres = IDispatchEx_GetDispID(dispex,
str, 0, &
id);
306 ok(public_prop_id ==
id,
"id = %d\n", public_prop_id);
307
309 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &public_prop2_id);
312
314 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &defvalget_id);
317 ok(defvalget_id == DISPID_VALUE,
"id = %d\n", defvalget_id);
318
320 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &
id);
323 ok(
id == -1,
"id = %d\n",
id);
324
326 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &
id);
329
333
336 dp.cArgs = dp.cNamedArgs = 1;
341
342 dp.cArgs = dp.cNamedArgs = 0;
347
348 dp.cArgs = dp.cNamedArgs = 0;
353
354 dp.cArgs = dp.cNamedArgs = 0;
359
360 dp.cArgs = 1;
364
368 dp.cArgs = dp.cNamedArgs = 1;
372
373 dp.cArgs = dp.cNamedArgs = 0;
378
381 dp.cArgs = dp.cNamedArgs = 1;
384
387 dp.cArgs = dp.cNamedArgs = 1;
390
391 dp.cArgs = dp.cNamedArgs = 0;
396
399 dp.cArgs = dp.cNamedArgs = 1;
402
403 dp.cArgs = dp.cNamedArgs = 0;
408
411 dp.cArgs = dp.cNamedArgs = 1;
414
417 dp.cArgs = 1;
418 dp.cNamedArgs = 0;
422
424 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &public_func_id);
426 ok(
hres ==
S_OK,
"GetDispID(publicFunction) failed: %08x\n",
hres);
427 ok(public_func_id != -1,
"public_func_id = -1\n");
428
430 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &public_sub_id);
433 ok(public_sub_id != -1,
"public_func_id = -1\n");
434
435 dp.cArgs = dp.cNamedArgs = 0;
440
441 dp.cArgs = dp.cNamedArgs = 0;
445
446 dp.cArgs = dp.cNamedArgs = 0;
451
452 dp.cArgs = dp.cNamedArgs = 0;
456
457 dp.cArgs = dp.cNamedArgs = 0;
461
462 dp.cArgs = dp.cNamedArgs = 0;
466
469 dp.cArgs = dp.cNamedArgs = 1;
472
473 dp.cArgs = dp.cNamedArgs = 0;
478
479 dp.cArgs = dp.cNamedArgs = 0;
484
485 dp.cArgs = dp.cNamedArgs = 0;
490
491 dp.cArgs = dp.cNamedArgs = 0;
495
496 dp.cArgs = dp.cNamedArgs = 0;
500
502 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &
id);
505 ok(
id == -1,
"id = %d\n",
id);
506
508 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive|fdexNameEnsure, &
id);
510 ok(
id == -1,
"id = %d\n",
id);
511 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameEnsure, &
id);
513 ok(
id == -1,
"id = %d\n",
id);
515
517 hres = IDispatchEx_GetDispID(dispex,
str, 0x80000000|fdexNameCaseInsensitive, &public_prop_id);
520
521 id = 0xdeadbeef;
523 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseSensitive, &
id);
526 ok(
id == public_prop_id,
"id = %d, expected %d\n",
id, public_prop_id);
527
528 id = 0xdeadbeef;
530 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseSensitive, &
id);
533 ok(
id == public_prop_id,
"id = %d, expected %d\n",
id, public_prop_id);
534
536 hres = IDispatchEx_GetDispID(dispex,
str, fdexNameCaseInsensitive, &gs_getter_id);
538 ok(
hres ==
S_OK,
"GetDispID(publicFunction) failed: %08x\n",
hres);
539 ok(gs_getter_id != -1,
"gs_getter_id = -1\n");
540
543 dp.cNamedArgs = 0;
544 dp.cArgs = 1;
549
552
555 dp.cArgs = 1;
560
564 dp.cArgs = 1;
568
569 IDispatchEx_Release(dispex);
570}
#define DISP_E_PARAMNOTOPTIONAL