Important: The information in this document is obsolete and should not be used for new development.
InitOpenTransport
Initializes the parts of Open Transport for use by the application or code resource.C INTERFACE
OSStatus InitOpenTransport(void);C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
- function result
 - An error code. See Appendix B.
 DISCUSSION
Call this function before using other Open Transport functions.If you need to know whether Open Transport is present at start-up time, but you don't need to use it (e.g. an installer),you can use the
Gestaltfunction and its Open Transport selectors as described in "The Gestalt Selector and Response Bits". However, for normal applications, your calling theInitOpenTransportfunction is sufficient to test for the presence of Open Transport.To initialize only the parts of Open Transport that handle ports and implement the Open Transport utility functions call the
InitOpenTransportUtilitiesfunction.SPECIAL CONSIDERATIONS
You must make sure that your A5 world is correctly initialized for 68000 code resources.If your program uses the Apple Shared Library Manager (ASLM), you must call the
InitLibraryManagerfunction to initialize ASLM before calling theInitOpenTransportfunction. To initialize ASLM, use theInitLibraryManagerfunction, described in the Apple Shared Library Manager Developer's Guide.For applications, Open Transport patches the
ExitToShelltrap when you call the functionInitOpenTransport. The patch calls the functionCloseOpenTransportif Open Transport is still active when your application quits.SEE ALSO
"The Gestalt Selector and Response Bits"."Initializing and Closing Open Transport".
The
CloseOpenTransportfunction.