1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
8<title>DWC_GetMyAID</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__main_8h_1e5406bc54caef00d5715b1995d467531"></a>
14<h1 align="left">DWC_GetMyAID</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE>u8 <a href=DWC_GetMyAID.html#dwc__main_8h_1e5406bc54caef00d5715b1995d467531>DWC_GetMyAID</a>(void);</CODE></PRE></dd>
22</dl>
23
24<h2>Arguments</h2>
25
26<p>None.</p>
27
28<h2>Return Values</h2>
29
30<p>Returns one's own AID.<br>Returns zero if this function is called when the FriendsMatch Library is not running.</p>
31
32<H2>Description</H2>
33<p>Obtains the user's own AID.</p><p>The AID is a numeric value between zero and the number of devices making up the network minus one. It is used to identify each host in the mesh network. For example, if four people have completed matchmaking, there are four devices: 0, 1, 2, and 3. If the person with AID = 1 leaves the network, the remaining devices are 0, 2, and 3.</p><p>Use this function after the matchmaking completion callback (<a href=DWCMatchedSCCallback.html#dwc__match_8h_169fa2126df86bf98f54258f5ccab9beb><CODE>DWCMatchedSCCallback</CODE></a>) succeeds and the local host has connected to another player at least once. If the local host has not yet established a connection with any other player, the return value will be undefined. Make sure not to use the returned value in this case.</p><p>There is one exception to the above restriction. As long as the host has been started as a server by the <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a> function, this function will start returning a valid value some time after <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a> is called, even if the host has not yet established a connection with any other player. Even when these hosts have not yet established a connection with any other player, hosts that have called <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a> can use this function as long as the <a href=DWC_GetNumConnectionHost.html#dwc__main_8h_1563f5011844cdc82781955484e977329><CODE>DWC_GetNumConnectionHost</CODE></a> function returns 1. To use this function without first connecting to another player, periodically check that <a href=DWC_GetNumConnectionHost.html#dwc__main_8h_1563f5011844cdc82781955484e977329><CODE>DWC_GetNumConnectionHost</CODE></a> returns 1.</p><p>Hosts that have called <a href=DWC_SetupGameServer.html#dwc__main_8h_1230f0bb02b234d806cc51470e67647f1><CODE>DWC_SetupGameServer</CODE></a> but not yet connected to any other player have this status: <br>�One player connected.<br>�Local host's AID is 0.<br>No other connection function can know the actual connected player count or the local host's AID until a connection with another player has been established.</p>
34
35<H2>Revision History</H2>
36<DL>
37
38<DT><para>2.0.0</DT>
39<DD>Added an explanation of the states in which this function can be used.</DD>
40
41</DL>
42<hr><p>CONFIDENTIAL</p></body>
43</html>
44