Directory Services |
The IADsExtension::PrivateGetIDsOfNames method is called by the aggregator, ADSI, after ADSI determines that the extension is used to support a dual or dispatch interface. The method can use the type data to get DISPID using IDispatch::GetIDsOfNames.
HRESULT PrivateGetIDsOfNames( REFIID riid, OLECHAR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispid );
The return values are the same as those of the standard IDispatch::GetIDsOfNames method. For more information about other return values, see ADSI Error Codes.
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 must ensure 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).
The following C/C++ code example 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); }
There is no applicable Visual Basic code example for this method.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.
IADsExtension, IADsExtension::PrivateInvoke, IDispatch::GetIDsOfNames, ADSI Error Codes