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 20 - Initializing and Closing Open Transport Reference / Functions
Initializing and Closing Open Transport /


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 the InitOpenTransport 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 the InitOpenTransport function. To initialize ASLM, use the InitLibraryManager function, described in the Apple Shared Library Manager Developer's Guide.

For applications, Open Transport patches the ExitToShell trap when you call the function InitOpenTransport. The patch calls the function CloseOpenTransport 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998