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
Gestalt
function and its Open Transport selectors as described in "The Gestalt Selector and Response Bits". However, for normal applications, your calling theInitOpenTransport
function 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
InitOpenTransportUtilities
function.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
InitLibraryManager
function to initialize ASLM before calling theInitOpenTransport
function. To initialize ASLM, use theInitLibraryManager
function, described in the Apple Shared Library Manager Developer's Guide.For applications, Open Transport patches the
ExitToShell
trap when you call the functionInitOpenTransport
. The patch calls the functionCloseOpenTransport
if Open Transport is still active when your application quits.SEE ALSO
"The Gestalt Selector and Response Bits"."Initializing and Closing Open Transport".
The
CloseOpenTransport
function.