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 24 - Mappers Reference / Functions
Creating Mappers /


OTOpenMapper

Creates a synchronous mapper provider and returns a mapper reference.

C INTERFACE
MapperRef OTOpenMapper(OTConfiguration* config, 
                     OTOpenFlags oflag, 
                     OSErr* err);
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
config
A pointer to a configuration structure that specifies the mapper's characteristics. You obtain a value for the config parameter by calling the OTCreateConfiguration function. The OTOpenMapper function disposes of the configuration structure before returning.
oflag
Reserved; must be set to 0.
err
A pointer to the result code for this function.
function result
A reference that you can use when calling other mapper functions.
DISCUSSION
The OTOpenMapper function opens a mapper having the configuration specified by the config parameter. For additional informationon Mappers and configurations see "Getting Started With Open Transport" and the documentation provided for the mapper protocol you are using. The function returns a mapper reference, by which you refer to the created mapper when calling mapper functions. If the OTOpenMapper function fails, its return value is kOTInvalidMapperRef.

A mapper created by the OTOpenMapper function operates in synchronous mode, and does not block. To change the mapper's default modes of operation, you can call the OTSetAsynchronous and the OTSetBlocking function.

You can open multiple mappers using identical or different configurations. The different mappers can be distinguished by the mapper reference.

To delete a mapper, call the OTCloseProvider function. For additional information about a mapper's mode of operations, see "Setting Modes of Operation for Mappers".

SPECIAL CONSIDERATIONS
Because the OTOpenMapper function executes synchronously, you should only call this function at system task time.

The OTOpenMapper function destroys the configuration structure passed in the config parameter. If you want to use the same configuration to open additional mappers, you must copy the configuration structure by calling the OTCloneConfiguration function.

SEE ALSO
The OTAsyncOpenMapper function .

The OTSetAsynchronous function.

The OTSetBlocking function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998