-<h2>mach_port_extract_right</h2>\r<hr>\r<p>\r<strong>Function</strong> - Remove the specified right from the target task and return it to the caller.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t mach_port_extract_right</strong>\r <strong>(ipc_space_t</strong> <var>task</var>,\r <strong>mach_port_name_t</strong> <var>name</var>,\r <strong>mach_msg_type_name_t</strong> <var>desired_type</var>,\r <strong>mach_port_poly_t</strong> <var>*right</var>,\r <strong>mach_msg_type_name_</strong> <var>*acquired_type</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var> \r<dd>\r[in task send right]\rThe task holding the port right.\r<p>\r<dt> <var>name</var> \r<dd>\r[in scalar]\rThe task's name for the port right.\r<p>\r<dt> <var>desired_type</var> \r<dd>\r[in scalar]\rIPC type, specifying how the right should be extracted.\r<p>\r<dt> <var>right</var> \r<dd>\r[out random right]\rThe extracted right.\r<p>\r<dt> <var>acquired_type</var> \r<dd>\r[out scalar]\rThe type of the extracted right.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mach_port_extract_right</strong> function extracts a port\rright from the target \rtask and returns it to the caller as if the task sent the right\rvoluntarily, using\r<var>desired_type</var> as the disposition for the right. See <strong>mach_msg</strong>.\r<p>\rThe returned value of <var>acquired_type</var> will be\r<strong>MACH_MSG_TYPE_PORT_SEND</strong> if a send right is extracted, \r<strong>MACH_MSG_TYPE_PORT_RECEIVE</strong> if a \rreceive right is extracted, and <strong>MACH_MSG_TYPE_PORT_SEND_ONCE</strong> if a \rsend-once right is extracted.\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the port name\rparameter.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_NAME</strong>\r<dd>\r<var>name</var> did not denote a right.\r<p>\r<dt> <strong>KERN_INVALID_RIGHT</strong>\r<dd>\r<var>name</var> denoted an invalid right.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="mach_port_insert_right.html"><strong>mach_port_insert_right</strong></a>,\r<a href="mach_msg.html"><strong>mach_msg</strong></a>.\r
\ No newline at end of file
+<h2>mach_port_extract_right</h2>
+<hr>
+<p>
+<strong>Function</strong> - Remove the specified right from the target task and return it to the caller.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t mach_port_extract_right</strong>
+ <strong>(ipc_space_t</strong> <var>task</var>,
+ <strong>mach_port_name_t</strong> <var>name</var>,
+ <strong>mach_msg_type_name_t</strong> <var>desired_type</var>,
+ <strong>mach_port_poly_t</strong> <var>*right</var>,
+ <strong>mach_msg_type_name_</strong> <var>*acquired_type</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>task</var>
+<dd>
+[in task send right]
+The task holding the port right.
+<p>
+<dt> <var>name</var>
+<dd>
+[in scalar]
+The task's name for the port right.
+<p>
+<dt> <var>desired_type</var>
+<dd>
+[in scalar]
+IPC type, specifying how the right should be extracted.
+<p>
+<dt> <var>right</var>
+<dd>
+[out random right]
+The extracted right.
+<p>
+<dt> <var>acquired_type</var>
+<dd>
+[out scalar]
+The type of the extracted right.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>mach_port_extract_right</strong> function extracts a port
+right from the target
+task and returns it to the caller as if the task sent the right
+voluntarily, using
+<var>desired_type</var> as the disposition for the right. See <strong>mach_msg</strong>.
+<p>
+The returned value of <var>acquired_type</var> will be
+<strong>MACH_MSG_TYPE_PORT_SEND</strong> if a send right is extracted,
+<strong>MACH_MSG_TYPE_PORT_RECEIVE</strong> if a
+receive right is extracted, and <strong>MACH_MSG_TYPE_PORT_SEND_ONCE</strong> if a
+send-once right is extracted.
+<h3>NOTES</h3>
+<p>
+This interface is machine word length specific because of the port name
+parameter.
+<h3>RETURN VALUES</h3>
+<dl>
+<p>
+<dt> <strong>KERN_INVALID_NAME</strong>
+<dd>
+<var>name</var> did not denote a right.
+<p>
+<dt> <strong>KERN_INVALID_RIGHT</strong>
+<dd>
+<var>name</var> denoted an invalid right.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="mach_port_insert_right.html"><strong>mach_port_insert_right</strong></a>,
+<a href="mach_msg.html"><strong>mach_msg</strong></a>.