Jacek Caban (@jacek) commented about dlls/jscript/dispex.c:
- jsdisp = to_jsdisp(disp);
- if(jsdisp && jsdisp->ctx == ctx)
return jsdisp_propget_name(jsdisp, name, val);- if(!(str = SysAllocString(name)))
return E_OUTOFMEMORY;- hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- if(FAILED(hres))
dispex = NULL;- if(dispex)
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &dispid);- else
hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, &str, 1, 0, &dispid);- SysFreeString(str);
- if(SUCCEEDED(hres) && dispid == DISPID_UNKNOWN)
hres = DISP_E_UNKNOWNNAME;
Why is `DISPID_UNKNOWN` handling needed here? Why is it special comparing to all other cases?