ProvideX V8.20 > Language Reference > 2. Directives
70
DEF OBJECT Directive
       Define Object
Formats
1. Invisible Object: DEF OBJECT obj_id, obj_name$ [;LICENSE=key]
[;FINALIZE=method] [,ERR=stmtref]
2. Visible Object: DEF OBJECT obj_id,@(col,ln,wth,ht) {, |=}obj_name$
[;LICENSE=key] [;FINALIZE=method] [,ERR=stmtref]
Where:
@(col,ln,
Numeric expressions. Column and line coordinates for top left corner,
wth,ht)
width in number of columns and height in number of lines.
obj_id
Numeric variable that will be used to save the object reference.
Optional license key. See Using Licensed Objects, p.71.
key
Optional finalize method. See Finalize Method, p.72.
method
obj_name$     String expression identifying the object to be referenced, as well as
any object specific parameters. See Object Name Contents, below.
stmtref
Optional program line number or label to transfer control to.
Description
The DEF OBJECT directive is used primarily to create a new instance of a specified
COM object by placing a reference to the object obj_name$ into the supplied
numeric variable obj_id. This is a feature of the ProvideX Event Handling Interface
and Component Object Model (COM). (This directive is also used for implementation
of the ProvideX *SYSTEM and *XML interfaces).
Object Name Contents
The DEF OBJECT obj_name$ string may contain one of the following:
*
Asterisk displays all registered COM controls on system.
CLSID
Hexadecimal class identifier for object in the format
{hhhhhhhh-hhhh-hhhh-hhhhhhhhhhhh}.
progID
Programmatic identifier name; e.g., Word.Document.
[DESIGN]filename.XML Indicates that a previously saved OLE/ActiveX control
definition should be loaded from the specified .XML file.
[DCOM]server;name
Indicates that the object is located on a remote system. server
parameter is optional, and can be specified either by name,
or by IP address. If not supplied then the object is considered
local. name parameter is the CLSID or progID for the object.
[FILE]x:\filename
Indicates that the object should be created using the
specified file name. An example of this would be a
Microsoft Word document file.
[GLOBAL]name
Indicates that a reference to an object exposed by the use of
PvxMakeGlobal should be obtained. The name parameter
is the name used to expose the object.