IOpenServiceActivityInput::GetVariable Method
Retrieves the value of the specified variable.
Syntax
HRESULT GetVariable( LPCWSTR pwzVariableName, LPCWSTR pwzVariableType, BSTR *pbstrVariableContent );
Parameters
- pwzVariableName
- [in] One of the following case-sensitive named variables.
documentTitle- The title of the document, if available.
documentUrl- The href of the document.
documentDomain- The domain name (including top-level domain) from the documents URL.
documentHost- The fully qualified domain from the documents URL.
selection- Currently selected text.
link- The href of the selected link.
linkText- The innerText of the selected link.
linkRel- The rel of the selected link.
linkType- The type of the selected link.
linkDomain- The domain name (including top-level domain) from the target URL.
linkHost- The fully qualified domain from the target URL.
- pwzVariableType
- [in] One of the following variable types, or NULL to accept the default type.
- text
- Default. The value is represented as plain text.
html- The value is represented as HTML. This variable type is supported only by variables having the value
selectionorlinkText.- pbstrVariableContent
- [out] The value of the variable.
Return Value
Returns one of the following values.
S_OK The operation completed successfully. S_OK The operation completed successfully. E_FAIL The operation failed. E_FAIL The operation failed. E_INVALIDARG The variable is undefined.
Remarks
Use GetType to determine the input context. Document variables are available for all three content types, but
selectionand link variables are available only when the input context is ActivityContentSelection and ActivityContentLink, respectively.Note The Accelerator platform requests thedocumentUrlvariable for all calls to CanExecute, Execute, CanPreview, and Preview. The variable is checked against the value of homepageUrl specified by the Accelerator XML.
See Also
IOpenServiceActivityInput::HasVariable