HasVariable method

Determines whether the input can provide the variable.

 

Syntax

HRESULT retVal = object.HasVariable(pwzVariableName, pwzVariableType, pfCanPreview);

Parameters

  • pwzVariableName [in]
    Type: LPCWSTR

    The case-sensitive variable name. See IOpenServiceActivityInput::GetVariable for a description of possible values.

  • pwzVariableType [in]
    Type: LPCWSTR

    A variable type. See IOpenServiceActivityInput::GetVariable for a description of possible values.

  • pfCanPreview [out]
    Type: BOOL

    TRUE if the named variable is available as the specified type; otherwise, FALSE.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description

The variable is unavailable.

E_INVALIDARG

The variable is undefined.

 

Remarks

Use this method before requesting a variable value to determine whether a variable is supported and available.

Note  The Accelerator platform requests the documentUrl variable for all calls to IOpenServiceActivity::CanExecute, IOpenServiceActivity::Execute, IOpenServiceActivity::CanPreview, and IOpenServiceActivity::Preview. The variable is checked against the value of homepageUrl specified by the Accelerator XML.

 

See also

IOpenServiceActivityInput::GetVariable