ZCOM C I/F Library Routines

 

PTFIND (3X)

PARAMETERS

 

zap

ZCOM address of the terminal. It can be any

 

terminal ZLU within the group to be searched.

 

If using method 1, only its MUX number is

 

used (its port number, hence its group, may be

 

different from the target terminal).

zskeyp

ptfind search key. The search key is set up by

 

the caller program before this routine is called.

 

It consists of a search mode, which indicates

 

the method to be used and the data (mode

 

dependent) used in searching. If bit

 

ZCOM_PTFIND_NAVL (0x8000) is set, ptfind

 

searches the non-available terminals as well.

 

When using this function in a 32-bit program

 

that is running on a 64-bit system, you must

 

be especially careful to zero out the zskeyp

 

structure before using it. Otherwise, your

 

application may experience ZCOM error -84

 

(ZEBPTR), “User buffer access error”.

zptt (Return

A pointer to a buffer into which the ZCOM

Param)

physical terminal table data will be placed.

 

Note that if the physical terminal is not found

 

(i.e., ierr != 0), then no data is moved into zptt.

len

Length in bytes of zptt buffer.

RETURN VALUE

Routine ptfind returns 0 if successful. Otherwise, if the physical terminal

 

is not found, ZENOTM (-75)is returned.

EXAMPLE

#include

<zcom/zcomsys.h>

 

#include

<zcom/zcomcall.h>

 

int32

ierr;

 

zaddr_type

zaddr;

 

zskey_type

zskey;

 

zptt_type

zptt;

 

int32

len;

if (ierr = ptfind (&zaddr, &zskey, &zptt, len)) { /* error return code */

}

Chapter 4

165