OTAsyncOpenAppleTalkServices
Opens an asynchronous AppleTalk service provider.C INTERFACE
OSStatus OTAsyncOpenAppleTalkServices (OTConfiguration* cfig, OTOpenFlags flags, OTNotifyProcPtr proc, void* contextPtr);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
kDefaultAppleTalkServicesPathfor 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
cookieparameter.contextPtr- A pointer for your use. The AppleTalk service provider passes this value unchanged to your notifier function.
DESCRIPTION
TheOTAsyncOpenAppleTalkServicesfunction opens an AppleTalk service provider and gives you a unique AppleTalk service provider reference for it. This function sets the mode of all subsequently called AppleTalk service provider functions 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
OTAsyncOpenAppleTalkServicesfunction completes, Open Transport calls the notifier function identified in theprocparameter. Open Transport returns an AppleTalk service provider reference in your notifier'scookieparameter and returns theT_OPENCOMPLETEcompletion 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.
- WARNING
- The
OTAsyncOpenAppleTalkServicesfunction destroys the configuration structure returned by theOTCreateConfigurationfunction. You cannot use the same configuration structure to open multiple AppleTalk service providers. To obtain a valid copy of the configuration structure to use for opening another AppleTalk service provider, use theOTCloneConfigurationfunction.![]()
SPECIAL CONSIDERATIONS
When you no longer need to use AppleTalk service provider functions, you must call the generic Open Transport functionOTCloseProvider.COMPLETION EVENT CODES
T_OPENCOMPLETE0x20000007 The OTAsyncOpenAppleTalkServicesfunction has completed.SEE ALSO
To open a provider synchronously, use theOTOpenAppleTalkServicesfunction (page 11-14).You can make a subsequent synchronous request by calling the
OTSetSynchronousfunction, described in the chapter "Providers" in this book.To create a copy of the configuration structure used to open an AppleTalk service provider, use the
OTCloneConfigurationfunction, described in the chapter "Configuration Management" in this book.To close the AppleTalk service provider, call the
OTCloseProviderfunction, described in the chapter "Providers" in this book.