mach_ports_lookup.html   [plain text]

<strong>Function</strong> - Provide caller with an array of the target task's well-known ports.
<strong>kern_return_t   mach_ports_lookup</strong>
                <strong>(task_t</strong>                             <var>target_task</var>,
                 <strong>mach_port_array_t</strong>                <var>init_port_set</var>,
                 <strong>mach_msg_type_number_t</strong>         <var>init_port_count</var><strong>);</strong>
<dt> <var>target_task</var> 
[in task send right]
The task whose currently registered ports are to be 
<dt> <var>init_port_set</var> 
[out pointer to dynamic array of registered send rights]
The returned
array of ports.
<dt> <var>init_port_count</var> 
[out scalar]
The number of returned port rights.
The <strong>mach_ports_lookup</strong> function returns an array of
the well-known system 
ports that are currently registered for the specified task. 
Note that the task holds 
only send rights for the ports.
Registered ports are those ports that are used by the run-time
system to initialize a task.  To register system ports for a task, 
use the <strong>mach_ports_register</strong> function.
Only generic errors apply.
<a href="mach_ports_register.html"><strong>mach_ports_register</strong></a>.