Upravit

Sdílet prostřednictvím


ITypeInfo::GetIDsOfNames method (oaidl.h)

Maps between member names and member IDs, and parameter names and parameter IDs.

Syntax

HRESULT GetIDsOfNames(
  [in]  LPOLESTR *rgszNames,
  [in]  UINT     cNames,
  [out] MEMBERID *pMemId
);

Parameters

[in] rgszNames

An array of names to be mapped.

[in] cNames

The count of the names to be mapped.

[out] pMemId

Caller-allocated array in which name mappings are placed.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
One or more of the arguments is not valid.
E_OUTOFMEMORY
Insufficient memory to complete the operation.

Remarks

The function GetIDsOfNames maps the name of a member (rgszNames[0]) and its parameters (rgszNames[1] ...rgszNames[cNames- 1]) to the ID of the member (pMemId[0]), and to the IDs of the specified parameters (pMemId[1] ... pMemId[cNames- 1]). The IDs of parameters are 0 for the first parameter in the member function's argument list, 1 for the second, and so on.

If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.

Requirements

Requirement Value
Target Platform Windows
Header oaidl.h

See also

ITypeInfo