Important: The information in this document is obsolete and should not be used for new development.
GetMyZone
TheGetMyZonefunction returns the zone name of the node on which your application is running.
FUNCTION GetMyZone (thePBptr: XPPParmBlkPtr; async: Boolean): OSErr;
thePBptr- A pointer to an XPP parameter block.
async- A Boolean that indicates whether the function should be executed asynchronously or synchronously. Specify
TRUEfor asynchronous execution.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> csCode Integer Always xCallfor this function.--> xppSubCode Integer Always zipGetMyZonefor
this function.--> xppTimeout Byte The retry interval in seconds. --> xppRetry Byte The retry count. --> zipBuffPtr Ptr A pointer to data buffer. --> zipInfoField PACKED ARRAY A data buffer for use by ZIP; first word set to 0.
Field Description
- xppSubCode
- A routine selector. This field is automatically set by the MPW interface to
zipGetMyZonefor this function.- xppTimeout
- The amount of time, in seconds, that the .ATP driver should wait between attempts to obtain the data. A value of 3 or 4 seconds for the
xppTimeoutfield is usually sufficient.- xppRetry
- The number of times the .ATP driver should attempt to obtain the data before returning the request failed (
reqFailed) result code.
A value of 3 or 4 is usually sufficient.- zipBuffPtr
- A pointer to a 33-byte data buffer that you must allocate. ZIP returns the zone name into this buffer as a Pascal string.
- zipInfoField
- A 70-byte data buffer that you must allocate and initialize for use by ZIP. You must set the first word of this buffer to 0 before you call the
GetMyZonefunction.DESCRIPTION
Before you callGetMyZone, you must allocate a buffer that is 33 bytes in size and set thezipBuffPtrparameter block field to point to this buffer. ZIP writes the zone name that it retrieves to this buffer that you supply. You must also supply a buffer that is 70 bytes in size as the value of thezipInfoFieldfield. This buffer is for ZIP to use. An applica-
tion running on a node on either an extended or a nonextended network can use this function to retrieve the node's zone name.SPECIAL CONSIDERATIONS
The memory that you allocate for the parameter block and the two buffers required
by theGetMyZonefunction belongs to the .XPP driver until the function completes execution. You can reuse the memory or dispose of it after the operation completes.ASSEMBLY-LANGUAGE INFORMATION
To execute theGetMyZonefunction from assembly language, call the_Control
trap macro with a value ofxCallin thecsCodefield of the parameter block and
a value ofzipGetMyZonein thexppSubCodefield of the parameter block. To
execute this function from assembly language, you must also specify the .XPP driver
reference number.RESULT CODES
noErr 0 No error noBridgeErr -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 SEE ALSO
For theXPPParamBlockdata type, see "The XPP Parameter Block for ZIP" beginning on page 4-10.To get the correct reference number for the .XPP driver, you can use the Device Manager's
OpenDriverfunction, which returns the driver reference number. For information about theOpenDriverfunction, see the chapter "Device Manager" in
Inside Macintosh: Devices.