Retrieves the name of a member.
HRESULT GetMemberName( DISPID id, BSTR *pbstrName );
Returns one of the following values:
S_OK | Success. |
DISP_E_UNKNOWNNAME | The name was not known. |
HRESULT hr; BSTR bstrName; DISPID dispid; IDispatch *pdex; // Assign to pdex hr = pdex->GetNextDispID(fdexEnumAll, DISPID_STARTENUM, &dispid); while (hr != S_FALSE) { pdex->GetMemberName(
dispid, &bstrName)
; if (!wcscmp(bstrName, OLESTR("Bar"))) return TRUE; SysFreeString(bstrName); hr = pdexObj->GetNextDispID(fdexEnumAll, dispid, &dispid); }
IDispatchEx Interface | IDispatchEx::GetDispID | IDispatchEx::GetNextDispID