IScriptDef Interface

Meta Data Services Programming

Meta Data Services Programming

IScriptDef Interface

IScriptDef is derived from IUnknown, IDispatch, and IRepositoryDispatch.

The IScriptDef interface allows the user to associate a Microsoft® ActiveX® script definition with a method without requiring the user to create an aggregation wrapper.

When to Use

Use the IScriptDef interface to:

  • Define a method on an interface.

  • Define a method on a base interface, overriding the base interface method.

  • Define a validation rule for a property on an interface.

  • Define a validation rule for a property on a base interface, overriding the base interface validation rule.
Properties
Properties Description
Body The storage for the body of the script. A variable length string, not to exceed 64 KB in length.
Language The storage for the language the script is written in. Valid values are Microsoft JScript® and Microsoft Visual Basic® Scripting Edition (VBScript).

This string is a maximum of 255 characters.


Methods
Method Description
ValidateScript Validates a script's syntax. It returns S_OK if the script can be executed; otherwise it returns a script engine specific error.

Collections
Collection Description
UsingClasses Collection of classes for which this script is used
UsingInterfaces Collection of interfaces for which this script is used
UsingMembers Collection of members for which this script is used

See Also

Defining Script Objects

MethodDef Object