IActiveScriptAuthor::GetScriptTextAttributes

Returns the text attributes for a script block.

Syntax

HRESULT GetScriptTextAttributes(  
    LPCOLESTR        pszCode,  
    ULONG            cch,  
    LPCOLESTR        pszDelimiter,  
    DWORD            dwFlags,  
    SOURCE_TEXT_ATTR *pattr);  
);  

Parameters

pszCode
[in, size_is(cch)] The text of the script block. This string does not have to be null terminated.

cch
[in] The size used for the pszCode and pattr parameters.

pszDelimiter
[in] The address of the end-of-script delimiter. When pszCode is parsed from a stream of text, the host typically uses a delimiter (such as two single quotation marks), to detect the end of the scriptlet. Set this parameter to NULL if there is no delimiter to identify the end of the script block.

dwFlags
[in] The flags that are associated with the text attributes of the script block. Can be a combination of the following values:

Constant Value Description
GETATTRTYPE_DEPSCAN 0x0001 Identify identifiers that have the SOURCETEXT_ATTR_IDENTIFIER attribute, and identify dot operators that have the SOURCETEXT_ATTR_MEMBERLOOKUP attribute.
GETATTRFLAG_THIS 0x0100 Identify the current object that has the SOURCETEXT_ATTR_THIS attribute.
GETATTRFLAG_HUMANTEXT 0x8000 Identify string content and comment text that has the SOURCETEXT_ATTR_HUMANTEXT attribute.

pattr
[in, out, size_is(cch)] The color information for the script block code.

Return Value

An HRESULT. Possible values include, but are not limited to, those in the following table.

Value Description
S_OK The method succeeded.

Remarks

See also

IActiveScriptAuthor Interface
SOURCE_TEXT_ATTR Enumeration