Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 2.73 KB

iadsextension-interface.md

File metadata and controls

60 lines (46 loc) · 2.73 KB
title description ms.assetid ms.tgt_platform keywords ms.topic ms.date
IADsExtension Interface
This article contains the C++ code definition of the IADsExtension interface and discussion of its methods.
fa94cc55-1ab2-4b6e-a3b6-8c20542adb42
multiple
IADsExtension ADSI ,using
ADSI ADSI ,example code C/C++ ,using IADsExtension
extensions ADSI ,IADsExtension
reference
05/31/2018

IADsExtension Interface

The IADsExtension interface is defined as follows:

IADsExtension : public IUnknown
    {
    public:
        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.