Compartilhar via


DispGetIDsOfNames (Windows CE 5.0)

Send Feedback

This function uses type information to convert a set of names to DISPIDs.

HRESULT DispGetIDsOfNames(ItypeInfo* ptinfo,OLECHAR FAR* FAR* rgszNames,unsigned intcNames,DISPID FAR* rgdispid );

Parameters

  • ptinfo
    [in] Pointer to the type information for an interface. This type information is specific to one interface and language code, so it is not necessary to pass an interface identifier (IID) or LCID to this function.

  • rgszNames
    [in] Array of name strings that can be the same array passed to DispInvoke in the DISPPARAMS structure.

    If cNames is greater than 1, the first name is interpreted as a method name and subsequent names are interpreted as parameters to that method.

  • cNames
    [in] Number of elements in rgszNames.

  • rgdispid
    [out] Pointer to an array of DISPIDs to be filled in by this function.

    The first identifier corresponds to the method name. Subsequent identifiers are interpreted as parameters to the method.

Return Values

Returns the HRESULT values shown in the following table.

Value Description
S_OK The interface is supported.
E_INVALIDARG An argument is invalid.
DISP_E_UNKNOWNNAME One or more given names were not known.

The returned array of DISPIDs contains DISPID_UNKNOWN for each entry that corresponds to an unknown name.

Other return codes Any ITypeInfo::Invoke error can be returned.

Remarks

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Example

This code from the Lines sample file Points.cpp implements the member function GetIDsOfNames for the CPoints class using DispGetIDsOfNames.

STDMETHODIMP
CPoints::GetIDsOfNames(
  REFIID riid,
  char FAR* FAR* rgszNames,
  UINT cNames,
  LCID lcid,
  DISPID FAR* rgdispid)
{
  return DispGetIDsOfNames(m_ptinfo, rgszNames, cNames, rgdispid);
}

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also

Automation Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.