Directory Services |
The IADsExtension::PrivateInvoke method is normally called by ADSI after the IADsExtension::PrivateGetIDsOfNames method. This method can either have a custom implementation or it can delegate the operation to IDispatch::DispInvoke method.
HRESULT PrivateInvoke( DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pvarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr );
Value | Meaning |
---|---|
DISPATCH_METHOD | The member is invoked as a method. If a property has the same name, both this and the DISPATCH_PROPERTYGET flag may be set. |
DISPATCH_PROPERTYGET | The member is retrieved as a property or data member. |
DISPATCH_PROPERTYPUT | The member is changed as a property or data member. |
DISPATCH_PROPERTYPUTREF | The member is changed by a reference assignment, rather than a value assignment. This flag is valid only when the property accepts a reference to an object. |
This method supports the standard return values, as well as the following:
For other return values, see ADSI Error Codes.
Return Code | Description |
---|---|
S_OK | Success. |
DISP_E_BADPARAMCOUNT | The number of elements provided to DISPPARAMS is different from the number of arguments that the method or property accepts. |
DISP_E_BADVARTYPE | One of the arguments in rgvarg is not a valid variant type. |
DISP_E_EXCEPTION | The application needs to raise an exception. In this case, the structure passed in pExcepInfo should be filled in. |
DISP_E_MEMBERNOTFOUND | The requested member does not exist, or the call to PrivateInvoke tried to set the value of a read-only property. |
DISP_E_NONAMEDARGS | This implementation does not support named arguments. |
DISP_E_OVERFLOW | One of the arguments in rgvarg could not be coerced to the specified type. |
DISP_E_PARAMNOTFOUND | One of the parameter DISPIDs does not correspond to a parameter on the method. In this case, puArgErr should be set to the first argument that contains the error. |
DISP_E_TYPEMISMATCH | One or more of the arguments could not be coerced. The index within rgvarg of the first parameter with the incorrect type is returned in the puArgErr parameter. |
DISP_E_UNKNOWNINTERFACE | The interface identifier passed in riid is not IID_NULL. |
DISP_E_UNKNOWNLCID | The member being invoked interprets string arguments according to the LCID, and the LCID is not recognized. If the LCID is not needed to interpret arguments, this error should not be returned. |
DISP_E_PARAMNOTOPTIONAL | A required parameter was omitted. |
The following implementation of IADsExtension::PrivateInvoke delegates the operation to the DispInvoke() method.
STDMETHOD(PrivateInvoke)( DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, UINT * puArgErr) { return DispInvoke((IHelloWorld*)this, m_pTypeInfo, dispidMember, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr); }
There is no applicable Visual Basic code for this.
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::PrivateGetIDsOfNames, DispInvoke, ADSI Error Codes