Click here to return to the KiXtart HelpDesk main page...

KiXtart Command Reference

OLECALLFUNC

action

Accesses a method of an OLE Automation object that returns a value.

syntax

OLECALLFUNC (objecthandle, "methodname", “typelist”, “optionalargument1”, “optionalargument2” , …)

parameters

ObjectHandle

The handle of the object you want to access. This handle must have been obtained by a call to OLECreateObject, OLEGetObject, OLEGetSubObject, OLEGetProperty or OLECallFunc.

Methodname

The name of the method you want to access.

TypeList

TypeList is a casesensitive series of characters that define the type of each optional argument. Based on the type specified, KiXtart will convert the argument(s) to the correct type before calling the OLE function. This parameter can have the following values:

b

Boolean

c

Currency

D

Date

i

Short integer

I

Long integer

o

Object handle

r

4 byte real

R

8 byte real

Optionalargument

Optional string value representing an argument for the method. Note : all optional arguments must be specified as a string. The actual type of the argument is determined automatically by the corresponding TypeCharacter in TypeList.

returns

A string representing the return value of the function. If the call fails, @ERROR will be set to the relevant error code.