On 11/16/21 3:29 PM, Gabriel Ivăncescu wrote:
/* try toString() first */
memcpy(buf, L"toString", sizeof(L"toString"));
name = buf;
hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, &name, 1, 0, &dispid);
if(SUCCEEDED(hres) && dispid != DISPID_UNKNOWN) {
DISPPARAMS params = { &strv, NULL, 0, 0 };
hres = IDispatch_Invoke(disp, dispid, &IID_NULL, lcid, DISPATCH_METHOD, ¶ms, &strv, NULL, NULL);
if(SUCCEEDED(hres)) {
if(V_VT(&strv) == VT_BSTR) {
nsAString_Init(nsstr, V_BSTR(&strv));
SysFreeString(V_BSTR(&strv));
break;
}
VariantClear(&strv);
}
}
Why do we need it in addition to DISPID_VALUE?
Thanks,
Jacek