GetLocalZones
Boolean async; 0=await completion; 1=immediate return GetLocalZones returns a list of all the zone names on the local network-that is, the network that includes the node on which your application is running.
thePBptr is a pointer to an XPPParamBlock structure. The relevant fields are as follows:
¨ ioResult short 2 16 Result code
Æ csCode short 2 26 Routine selector; always xCall
Æ xppSubCode short 2 28 Routine selector; zipGetMyZone
Æ xppTimeOut char 1 30 Retry interval in seconds
Æ xppRetry char 1 31 Retry count
Æ zipBuffPtr long 4 34 Pointer to data buffer
Æ zipLastFlag char 1 40 Nonzero if no more names
Æ zipInfoField 70 bytes 70 42 For use by ZIP; first word set to 0
async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
noBrideErr (-93) No Router is available
reqFailed (-1096) Request to contact router failed; retry count
exceeded
tooManyReqs (-1097) Too many concurrent requests
noDataArea (-1104) Too many outstanding ATP calls
Notes: The ioResult field returns the result of the function. If you call the function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode and xppSubCode fields are routine selectors
and are automatically set by the high-level language interface to xCall and
zipGetLocalZones for this function. The xppTimeOut field specifies the
attempts to obtain the data. A value of 3 or 4 for the xppTimeOut field
generally gives good results. The xppRetry field specifies the number of
the reqFailed (request failed) result code. A value of 3 or 4 for the
xppRetry field usually works well.
The zipBuffPtr field is a pointer to a 578-byte data buffer that you must allocate. ZIP returns the zone names into this buffer as a packed array of
high-level language strings. The zipNumZones parameter returns the number of zone names that ZIP placed in the data buffer.
names for your network. If the zipLastFlag field is still 0 when the
GetLocalZones function has completed execution, you must empty the data buffer pointed to by the zipBuffPtr parameter and immediately call the
zipInfoField parameter. The zipInfoField parameter is a 70-byte data
buffer that you must allocate for use by ZIP. You must set the first word of
this buffer to 0 before you call the GetLocalZones function the first time, and you must not change the contents of this field thereafter.