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 26 - Ports Reference / Functions
Getting Information About Ports /


OTGetIndexedPort

Iterates through the ports available on your computer.

C INTERFACE
Boolean OTGetIndexedPort(OTPortRecord* record, 
                                         size_t index);
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
record
A pointer to a port structure that contains, on return, information about a specific port on your computer.
index
An index number.
function result
See Discussion.
DISCUSSION
The OTGetIndexedPort function returns information about the ports available on your local system. To iterate through all the ports on your computer, call the function repeatedly, incrementing the index parameter each time (starting with 0) until the function returns false. Each time the function returns true, it fills in the port structure that you provide with information about a specific port..

You must allocate the port structure; the function fills this structure with information about the port indicated by the index parameter. If the function returns false, the contents of the structure are not significant.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998