Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 30 - AppleTalk Reference / AppleTalk Service Provider Reference
AppleTalk Service Functions / Obtaining Information About Zones


OTATalkGetMyZone

Obtains the AppleTalk zone name of the node on which your application is running.

C INTERFACE
OSStatus OTATalkGetMyZone(ATSvcRef ref, 
                     TNetbuf* zone);
C++ INTERFACE
TAppleTalkServices::GetMyZone(TNetbuf* zone)
PARAMETERS
ref
The reference value of your AppleTalk service provider.
zone
A TNetbuf structure that, on return, contains your application's AppleTalk local zone name.
function result
A result code. See Appendix B for more information.
DISCUSSION
The OTATalkGetMyZone function returns the name of your application's AppleTalk zone (as a Pascal string) in the buffer referenced by the zone parameter. The string can be up to 32 characters in length, so with the addition of a length byte, the buffer can have a maximum size of 33 bytes.

If you call this function asynchronously, Open Transport calls your application's notifier with a T_GETMYZONECOMPLETE completion event to signal the function's completion and uses your notifier's cookie parameter for the zone name. More precisely, the cookie parameter points to a TNetbuf structure that in turn points to a buffer containing the zone name.

Note
Using a Pascal string for the zone name is redundant since you can determine the length of the string from the len field of the TNetbuf structure, but the other zone-related calls use Pascal strings, so this call also uses them for consistency.
SEE ALSO
The OTATalkGetLocalZones function.

The OTATalkGetZoneList function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998