Please enable JavaScript to view this site.

ESL Documentation

Object Inquiry Built-in Function

Return the window handle associated with an object or the address pointer of a structure.

handle of {OBJECT_NAME|STRUCTURE_NAME}

OBJECT_NAME

A string value representing the identifier for an object. The object cannot be a key or a sense region.

STRUCTURE_NAME

A specific instance of a structure.

Description

This function returns an integer value that is either;

The Windows handle (or identifier) for the object, or

The address pointer to a structure.

This value can be passed to external functions or subroutines that can use the value.

Note that the consequences of an external function or subroutine using this value are the responsibility of the developer. ESL does not guarantee proper operation when this handle is used by external code. (For instance, the code must not delete the window.)

As structures are passed to external subroutines and functions using an address pointer (i.e. By Reference), this built-in function is only needed when an external routine requires a structure to include a pointer to another structure. As structures can move in the ESL's address space, it is essential the "handle of" is called prior to the structure containing the address is passed to the external routine.

Example

 

subroutine MySubr(integer: Handle) library "mylib"

 integer PrimaryHandle

 ...

 copy (handle of Primary) to PrimaryHandle

 call MySubr(PrimaryHandle)