1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7<title>CancelConnectAsync</title> 8 </head> 9 <body> 10<h1><CODE>nn::ac::CTR::CancelConnectAsync</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14<a href="../../../nn/Result/Overview.html">Result</a> CancelConnectAsync(); 15</pre> 16 </div> 17<h2>Arguments</h2> 18 <div class="section"> 19<p>None.</p> 20 </div> 21<h2>Return Values</h2> 22<div class="section">The result.<br /> <br /> 23 <table class="arguments"> 24 <thead> 25 <tr> 26<th>Value</th> 27<td>Description</td> 28 </tr> 29 </thead> 30 <tr> 31<th><CODE>ResultSuccess</CODE></th> 32<td>Completed without error.</td> 33 </tr> 34 <tr> 35<th><CODE>ResultNotConnecting</CODE></th> 36<td>A connection is not being processed.</td> 37 </tr> 38 <tr> 39<th><CODE>ResultAlreadyConnecting</CODE></th> 40<td>A connection has already been processed and established.</td> 41 </tr> 42 <tr> 43<th>A value other than the above.</th> 44<td>Failed for reasons other than those given above.</td> 45 </tr> 46 </table> </div> 47<h2>Description</h2> 48 <div class="section"> 49<p>If an asynchronous automatic connection process is underway, cancels it.</p><p>When a process is canceled, this is indicated in the <CODE>Result</CODE> return value. The <a href="../../../nn/ac/CTR/GetLastErrorCode.html"><CODE>GetLastErrorCode</CODE></a> function can get error codes that are equivalent to those for failures that occur when processes are canceled. Use the <a href="../../../nn/Result/Overview.html"><CODE>Result</CODE></a> value to determine if the process was successfully canceled.<br /><br />If the process is successfully canceled or if the connection finishes processing before the cancellation request is received, the <a href="../../../nn/os/Event/Overview.html"><CODE>nn::os::Event</CODE></a> passed to the <a href="../../../nn/ac/CTR/ConnectAsync.html"><CODE>ConnectAsync</CODE></a> function is signaled. You can then call the <a href="../../../nn/ac/CTR/GetConnectResult.html"><CODE>GetConnectResult</CODE></a> function to determine whether the process was canceled. If another thread calls this function while the <a href="../../../nn/ac/CTR/Connect.html"><CODE>Connect</CODE></a> function is running, you can determine if the process was successfully canceled from the <a href="../../../nn/ac/CTR/Connect.html"><CODE>Connect</CODE></a> return value.</p><!-- write here --></div> 50<h2>Revision History</h2> 51 <div class="section"> 52 <dl class="history"> 53 <dt>2010/06/14</dt> 54<dd>Initial version.<br /> 55 </dd> 56 </dl> 57 </div> 58 <hr><p>CONFIDENTIAL</p></body> 59</html>