Platform SDK: Active Directory, ADSI, and Directory Services |
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 );
The return values are the same as those of the standard IDispatch::GetIDsOfNames method. For 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 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).
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); }
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.
IADsExtension, IADsExtension::PrivateInvoke, IDispatch::GetIDsOfNames, ADSI Error Codes