IADsExtension Interface

IADsExtension Interface

The IADsExtension interface is defined as follows:

IADsExtension : public IUnknown
        virtual HRESULT STDMETHODCALLTYPE Operate( 
            /* [in] */ DWORD dwCode,
            /* [in] */ VARIANT varData1,
            /* [in] */ VARIANT varData2,
            /* [in] */ VARIANT varData3) = 0;
        virtual HRESULT STDMETHODCALLTYPE PrivateGetIDsOfNames( 
            /* [in] */ REFIID riid,
            /* [in] */ OLECHAR **rgszNames,
            /* [in] */ unsigned int cNames,
            /* [in] */ LCID lcid,
            /* [out] */ DISPID *rgDispid) = 0;
        virtual HRESULT STDMETHODCALLTYPE PrivateInvoke( 
            /* [in] */ DISPID dispidMember,
            /* [in] */ REFIID riid,
            /* [in] */ LCID lcid,
            /* [in] */ WORD wFlags,
            /* [in] */ DISPPARAMS *pdispparams,
            /* [out] */ VARIANT *pvarResult,
            /* [out] */ EXCEPINFO *pexcepinfo,
            /* [out] */ unsigned int *puArgErr) = 0;

The aggregator (ADSI) calls the IADsExtension::Operate method. The extension should interpret the dwCode parameter and each varData parameter, according to the provider's documentation.

The aggregator (ADSI), calls the IADsExtension::PrivateGetIDsOfNames method. It is called after ADSI determines the extension to service the dispatch. The extension could use the type information for getting the DISPID, that is, using the DispGetIDsOfNames function.

ADSI normally calls the PrivateInvoke method after calling the PrivateGetIDsOfNames function. The extension should call the actual method that it implements. Alternatively, the extension can use type information and call the DispInvoke function.

All parameters have the same meaning as the parameters in the standard IDispatch::Invoke method.



© 2015 Microsoft