GetInterface method

The GetInterface method retrieves target-specific instances of Action Interfaces that are used to control the target.

Syntax

HRESULT GetInterface(
  [in]            BSTR ProgID,
  [in, optional]  VARIANT Args,
  [in, out]       VARIANT MonikerSuffix,
  [out, retval]   IAction **ppInterface
);

Parameters

  • ProgID [in]
    The WDTF ProgID of the requested interface.

  • Args [in, optional]
    Optional extra arguments that you can use to define additional targets to attach to the returned interface.

    This parameter is not currently implemented. Set Args to a VARIANT that contains VT_EMPTY.

  • MonikerSuffix [in, out]
    An optional moniker that defines more options about how the interface should be instantiated.

    This parameter is not yet implemented. Set MonikerSuffix to a VARIANT that contains VT_EMPTY.

  • ppInterface [out, retval]
    The address of a variable that will receive the instantiated action interface.

Return value

GetInterface returns a standard HRESULT value.

Remarks

The GetInterface method is the most useful in the WDTF object model. GetInterface enables you to simply locate a target-specific implementation of an action interface without caring about the specifics of the target.

To write a WDTF scenario, you must understand both the syntax and the semantics of the requested action interface.

For more information about the GetInterface method, see Controlling Targets.

For detailed descriptions of the interfaces that WDTF includes, see Action Interfaces.

For a code example that demonstrates the GetInterface method, see ITarget::Eval.

See also

Action Interfaces

IAction

ITarget

ITarget::Eval

 

 

Send comments about this topic to Microsoft

Build date: 1/12/2012