共用方式為


CBaseDispatch::GetIDsOfNames

 
Microsoft DirectShow 9.0

CBaseDispatch::GetIDsOfNames

The GetIDsOfNames method maps a set of names to a corresponding set of DISPIDs.

Syntax

  HRESULT GetIDsOfNames(
    REFIID riid,
    OLECHAR **rgszNames,
    UINT cNames,
    LCID lcid,
    DISPID *rgdispid
);

Parameters

riid

Reference to an interface identifier (IID) that specifies the interface.

rgszNames

Address of an array of wide-character strings that contain the names to be mapped.

cNames

Size of the array given by the rgszNames parameter.

lcid

Locale context in which to interpret the names. Can be NULL.

rgdispid

Pointer to an array that receives the DISPIDs. Each element of receives an identifier that corresponds to one of the names passed in the rgszNames parameter.

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Success.
E_OUTOFMEMORY Insufficient memory.
DISP_E_UNKNOWNNAME One or more of the names were not known.

Remarks

This method behaves like the IDispatch::GetIDsOfNames method, but the riid parameter specifies the interface on which to retrieve DISPIDs. (In the IDispatch version, the riid parameter is reserved.)

If the method returns DISP_E_UNKNOWNNAME, the returned DISPIDs contain DISPID_UNKNOWN for each entry that corresponds to an unknown name.

Requirements

**  Header:** Declared in Ctlutil.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also