IADsExtension::Operate method (iads.h)

The IADsExtension::Operate method is invoked by the aggregator to perform the extended functionality. The method interprets the control code and input parameters according to the specifications of the provider. For more information, see the provider documentation.

Syntax

HRESULT Operate(
  [in] DWORD   dwCode,
  [in] VARIANT varData1,
  [in] VARIANT varData2,
  [in] VARIANT varData3
);

Parameters

[in] dwCode

A value of the ADSI extension control code. ADSI defines the following code value.

ADS_EXT_INITCREDENTIALS

Verifies user credentials in the extension object.

[in] varData1

Provider-supplied data the extension object will operate on. The value depends upon the control code value and is presently undefined.

[in] varData2

Provider-supplied data the extension object will operate on. The value depends upon the control code value and is presently undefined.

[in] varData3

Provider-supplied data the extension object will operate on. The value depends upon the control code value and is presently undefined.

Return value

This method supports the standard return values, as well as the following:

For more information about other return values, see ADSI Error Codes.

Remarks

The aggregator will ignore the E_FAIL and E_NOTIMPL return values.

Examples

The following C/C++ code example shows a generic implementation.

STDMETHOD(Operate)(ULONG dwCode, VARIANT varData1, VARIANT varData2, VARIANT varData3)
{
   HRESULT hr = S_OK;
   switch (dwCode) 
   {
      case ADS_EXT_INITCREDENTIALS:
      // Prompt for a credential.
      // MessageBox(NULL, "INITCRED", "ADsExt", MB_OK);

      break;
      default:
          hr = E_FAIL;
      break;
    }        
    return hr;
}

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header iads.h
DLL Activeds.dll

See also

ADSI Error Codes

IADsExtension