U_CHNINF

Return information about a channel

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall U_CHNINF(channel, [filename], [mode][, class])

channel

The channel about which to obtain information. (n)

filename

(optional) Returned with the name of the file open on the channel. (a)

mode

(optional) Returned with the I/O mode in which the file is open. (a)

class

(optional) Returned with the environment level that owns the channel if the channel is local or one of the following class values: (n)

0 = Channel is not in use (according to Toolkit).

–1 = Channel is global.

–2 = Channel is a Toolkit system channel.

U_CHNINF returns information about a channel. If channel is not in use, filename and mode will be returned blank.

In the following, U_CHNINF returns the name of the file open on the channel stored in chnl, the I/O mode for which the file is open, and the class of the channel (local, global, and so forth).

xcall u_chninf(chnl, filnam, iomode, class)

This example closes all global channels.

for chnl from 1 thru 32
  begin
    xcall u_chninf(chnl,,,class) 
    if (class.eq.-1)
      xcall u_close(chnl)
  end