1 /*---------------------------------------------------------------------------*
2 Project: Wii Connect 24 API demos
3 File: WiiNumber.c
4
5 Copyright 2006 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Log: WiiNumber.c,v $
14 Revision 1.1 2007/06/14 00:42:01 hirose_kazuki
15 Initial check in.
16
17
18 *---------------------------------------------------------------------------*/
19 #include <revolution.h>
20 #include <revolution/nand.h>
21 #include <revolution/nwc24.h>
22
23 /*---------------------------------------------------------------------------*
24 A simple demo to display the Wii Number.
25 *---------------------------------------------------------------------------*/
26
27 /*---------------------------------------------------------------------------*
28 Main
29 *---------------------------------------------------------------------------*/
main(void)30 int main(void)
31 {
32 NWC24Err err;
33 s32 result;
34 NWC24UserId wiiNumber;
35
36 result = NANDInit();
37 if ( result != NAND_RESULT_OK )
38 {
39 OSHalt("NANDInit() failed.\n");
40 }
41
42 (void)NWC24SuspendScheduler();
43
44 OSReport("*******************************************************\n");
45 OSReport(" A simple demo to display the Wii Number.\n");
46 OSReport("*******************************************************\n");
47
48 err = NWC24GetMyUserId(&wiiNumber);
49 if ( err != NWC24_OK )
50 {
51 OSReport("NWC24GetMyUserId(): Error %d\n", err);
52 OSHalt("Program failed.\n");
53 }
54
55 OSReport("Your Wii Number: %016lld\n\n", wiiNumber);
56 OSHalt("Program finished.\n");
57 return 0;
58 }
59
60 /*---------------------------------------------------------------------------*/
61
62
63