To pass an item as a handle:
declare remote procedure (class class-name as handle) = (return [,...] )
You can pass an item as a handle as one of two or more arguments or return types by entering the item argument in parentheses, followed by a comma if any arguments follow.
To pass an item as a handle with other arguments:
declare remote procedure (float, (class class-name as handle), integer) = (return [,...] )
To configure a KB for item passing as a handle:
An item can acquire a network handle in three ways. The third way is applicable only to GSI interfaces.
g2-register-on-network system procedure, described in the next section.
To obtain a network handle for an item manually, use this system procedure:
g2-register-on-network
(item-to-register:class item, icp-interface:class item)
->network-handle: integer
| Element | Description |
|---|---|
item-to-register
|
The item for which you need a network handle.
|
icp-interface
|
The network interface you are using.
|
![]() |
You cannot maintain network handles across interface activations. You must register items each time you activate a data interface object.
For more information on the network registering, and other system procedures, see the G2 System Procedures Reference Manual.
Example of Passing an Item as a Handle
The next diagram shows an example of how you declare a remote procedure with a float argument type, followed by a procedure class as a handle (in separate parentheses), with an integer return type value. The extra spaces in the example are for clarity and are not required.
![]() |