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
Registering and Deleting Names /


OTDeleteName

Removes a previously registered entity name.

C INTERFACE
OSStatus OTDeleteName (MapperRef ref, 
                     TNetbuf* name);
C++ INTERFACE
TMapper::DeleteName(TNetbuf* name);
PARAMETERS
ref
The mapper reference of the mapper you are using to delete the name.
name
A TNetbuf structure describing the name to be removed. You must allocate a buffer that contains the name, set the name.buf field to point to the buffer, and set the name.len field to the length of the name.
function result
If the name is not found, the function returns the result kOTNoAddressErr.
DISCUSSION
If the mapper protocol defined using the config parameter to the OTOpenMapper or OTAsyncOpenMapper functions supports dynamic name and address registration, you can use the OTDeleteName function to delete a registered name.

If the mapper is in synchronous mode, the function does not return until the operation is complete. If the mapper is in asynchronous mode, the OTDeleteName function returns immediately. When the operation completes execution, the provider issues the T_DELNAMECOMPLETE event code. The cookie parameter to the notification routine has the value of the name parameter passed to the function. For more information on notifier functions and event codes see "Using Notifier Functions" and "Event Codes".

The OTRegisterName function you used to register the name returns an ID value for the registered name in its reply parameter. You might find it more convenient to use the OTDeleteNameByID function to delete a name using this ID value than to use the OTDeleteName function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998