ITypeInfo::GetIDsOfNames Function

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

HRESULT GetIDsOfNames(  
  OLECHAR FAR* FAR  *rgszNames,  
  unsigned int  cNames,          
  MEMBERID FAR  *pMemId          
);

rgszNames

Passed-in pointer to an array of names to be mapped.

cNames

Count of the names to be mapped.

pMemId

Caller-allocated array in which name mappings are placed.

The return value obtained from the returned HRESULT is one of the following:

Return value

Meaning

S_OK

Success.

STG_E_INSUFFICIENTMEMORY

Out of memory.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

One or more of the arguments is invalid.

DISP_E_UNKNOWNNAME

One or more of the names could not be found.

DISP_E_UNKNOWNLCID

The locale identifier (LCID) could not be found in the OLE DLLs.

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.

Show: