Next Previous Up Top Contents Index

4.12 The OLE-AUTOMATION module

get-property

Function

Summary

Returns the value of a property of a dispinterface.

Signature

get-property disp-interface property #key default locale index 
  => value 

Arguments

disp-interface
An instance of <LPDISPATCH>.

property
An instance of <string> or <disp-id>.

The class <disp-id> is defined as type-union(<integer>, <machine-word>). Usually, a dispatch ID value will be an <integer>, but occasionally it will not fit.

default
An instance of <object>.

locale
An instance of <integer>. Default value: $LOCALE-USER-DEFAULT.

Values

value
An instance of <object>.

Description

Returns the value of a property of a dispinterface.

The disp-interface argument is an instance of <LPDISPATCH>.

The property argument is either the name of the property (an instance of <string>), or the DISPID number. If the property is to be referenced more than once, it is much more efficient to use get-id-of-name to map the name to a DISPID just once.

For accessing an indexed property, use the index keyword option to specify either a single index or a <sequence> of index values. If the designated property is not supported, and the default keyword option is specified, the value passed with that keyword is returned. This is useful for querying stock properties. Otherwise, the function signals an error. For some servers, the default value will also be used for an out-of-range index.

You can also use this function on the left-hand side of an assignment to set the value of a property.


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index