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 /


OTAsyncOpenAppleTalkServices

Opens an asynchronous AppleTalk service provider.

C INTERFACE
OSStatus OTAsyncOpenAppleTalkServices(OTConfiguration* cfig, 
                                         OTOpenFlags flags,
                                         OTNotifyProcPtr proc, 
                                        
C++ INTERFACE
None. C++ clients use the C interface to this function.

PARAMETERS
cfig
A pointer to a configuration structure that specifies the AppleTalk service provider's characteristics. You can obtain this pointer by using the constant kDefaultAppleTalkServicesPath for this parameter. This directs Open Transport to create an AppleTalk service provider on the default hardware port, which is the one selected in the AppleTalk control panel.
flags
Reserved. Set to 0.
proc
A pointer to your notifier function. Open Transport returns an AppleTalk service provider reference in your notifier's cookie parameter.
contextPtr
A pointer for your use. The AppleTalk service provider passes this value unchanged to your notifier function.
function result
See Discussion.
DISCUSSION
The OTAsyncOpenAppleTalkServices function opens an AppleTalk service provider and gives you a unique AppleTalk service provider reference for it. This function sets the mode of the AppleTalk service provider as asynchronous.

If you call this function, you must provide a pointer to a notifier function that Open Transport can call to notify you that the function has completed and to return other information that you might need.

When the OTAsyncOpenAppleTalkServices operation completes, Open Transport calls the notifier function identified in the proc parameter. Open Transport passes an AppleTalk service provider reference in your notifier's cookie parameter and passes the T_OPENCOMPLETE completion event as the event code. The reference value identifies the AppleTalk service provider that you have opened, and you need to supply it as a parameter when you call any AppleTalk service provider function.

To close the AppleTalk service provider, call the OTCloseProvider function, described in the chapter "Providers Reference" in this book.

SPECIAL CONSIDERATIONS
When you no longer need to use AppleTalk service provider functions, you must call the generic Open Transport function OTCloseProvider.

SEE ALSO
The OTOpenAppleTalkServices function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998