| 445 | } |
| 446 | |
| 447 | int VariantUtilities::GetPropertyNameList(IDispatch* object_dispatch, |
| 448 | std::vector<std::wstring>* property_names) { |
| 449 | LOG(TRACE) << "Entering Script::GetPropertyNameList"; |
| 450 | |
| 451 | CComPtr<IDispatchEx> dispatchex; |
| 452 | HRESULT hr = object_dispatch->QueryInterface<IDispatchEx>(&dispatchex); |
| 453 | DISPID current_disp_id; |
| 454 | hr = dispatchex->GetNextDispID(fdexEnumAll, |
| 455 | DISPID_STARTENUM, |
| 456 | ¤t_disp_id); |
| 457 | while (hr == S_OK) { |
| 458 | CComBSTR member_name_bstr; |
| 459 | dispatchex->GetMemberName(current_disp_id, &member_name_bstr); |
| 460 | std::wstring member_name = member_name_bstr; |
| 461 | property_names->push_back(member_name); |
| 462 | hr = dispatchex->GetNextDispID(fdexEnumAll, |
| 463 | current_disp_id, |
| 464 | ¤t_disp_id); |
| 465 | } |
| 466 | return WD_SUCCESS; |
| 467 | } |
| 468 | |
| 469 | int VariantUtilities::GetArrayLength(IDispatch* array_dispatch, long* length) { |
| 470 | LOG(TRACE) << "Entering Script::GetArrayLength"; |