|Microsoft Windows Script Interfaces|
Indicates to the helper that a particular range of characters is a script block that is handled by the given script engine.
HRESULT DefineScriptBlock( ULONG ulCharOffset, ULONG cChars, IActiveScript* pas, BOOL fScriptlet, DWORD_PTR* pdwSourceContext );
[in] Location of the start of the script block.
[in] Number of characters in the script block.
[in] The script engine for this script block.
[in] Flag that indicates if the script block is a scriptlet.
[out] The source context for the script block.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
The method succeeded.
A smart host can use this method when its documents contain embedded script blocks. A language engine can use this method when its code contains embedded scripts for other languages.
The script engine is responsible for all syntax coloring and code context lookups in the script block.
The DefineScriptBlock method should be called after the text has been added (for example, using the IDebugDocumentHelper::AddDBCSText method) but before the script block has been parsed (for example, using the IActiveScriptParse ::ParseScriptText method).