Platform SDK: Active Directory, ADSI, and Directory Services

IADsExtension::PrivateGetIDsOfNames

The IADsExtension::PrivateGetIDsOfNames method is called by the aggregator, ADSI, after ADSI determines that the extension is for supporting a dual or dispatch interface. The method could use the type information to get DISPID using IDispatch::GetIDsOfNames.

HRESULT IADsExtension::PrivateGetIDsOfNames(
  REFIID riid,
  OLECHAR *rgszNames,
  UINT cNames,
  LCID lcid,
  DISPID *rgDispid
);

Parameters

riid
Reserved for future use. It must be IID_NULL.
rgszNames
Passed-in array of names to be mapped.
cNames
Count of the names to be mapped.
lcid
The locale context in which to interpret the names.
rgDispid
Caller-allocated array, each element of which contains an identifier (ID) corresponding to one of the names passed in the rgszNames array. The first element represents the member name. The subsequent elements represent each of the member's parameters.

Return Values

The return values are the same as those of the standard IDispatch::GetIDsOfNames method. For other return values, see ADSI Error Codes.

Remarks

All the parameters have the same meaning as the corresponding ones in the standard IDispatch::GetIDsOfNames(). The extension component returns a unique identifier (rgDispID) for each method or property defined in the supported dual interfaces. The uniqueness is enforced within the extension component. The ADSI provider is responsible for ensuring the uniqueness of the DISPIDs of all extension objects and the aggregator (ADSI) itself. The rgDispID parameter must be between 1 and 16777215 (2^24-1), or -1 (DISPID_UNKNOWN).

Example Code [C++]

The following C/C++ code snippet shows a generic implementation of this method.

STDMETHOD(PrivateGetIDsOfNames)(REFIID riid, OLECHAR ** rgszNames, unsigned int cNames, LCID lcid, DISPID  * rgdispid)
{
  if (rgdispid == NULL)
  {
     return E_POINTER;
  }
  return  DispGetIDsOfNames(m_pTypeInfo, rgszNames, cNames, rgdispid);
}

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
  Windows 95/98: Requires Windows 95 or later (with DSClient).
  Header: Declared in Iads.h.

See Also

IADsExtension, IADsExtension::PrivateInvoke, IDispatch::GetIDsOfNames, ADSI Error Codes