1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>SOInit</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../CSS/rex.css">
8</HEAD>
9<BODY>
10<H1>SOInit</H1>
11
12<H2>Syntax</H2>
13<DL>
14	<DD><PRE><CODE>#include &lt;revolution/so.h&gt;</CODE></PRE>
15	<DD><PRE><CODE>int SOInit( const <a href="SOLibraryConfig.html">SOLibraryConfig</a>* config )</CODE></PRE>
16</DL>
17
18<H2>Description</H2>
19<P>
20	Initializes the SO library. Call this function once before calling any function provided by the SO library.<br>Calling the <CODE>SOInit</CODE> function does not involve actual communication processing.
21</P>
22
23<H2>Arguments</H2>
24<TABLE border="1" cellpadding="3" cellspacing="0.1">
25	<TR>
26		<TH><em>config</em></TH>
27		<TD>
28			Specifies a pointer to the <a href="SOLibraryConfig.html">SOLibraryConfig</a> structure that defined the function called by the SO library during allocation or deallocation of the dynamic work buffer.
29		</TD>
30	</TR>
31</TABLE>
32
33<h2>Return Values</h2>
34<TABLE border="1" cellpadding="3" cellspacing="0.1">
35	<TR>
36		<TH>0</TH>
37		<TD>
38			Process succeeded.
39		</TD>
40	</TR>
41	<TR>
42		<TH>SO_EALREADY</TH>
43		<TD>
44			It has already been initialized with the <CODE>SOInit</CODE> function.
45		</TD>
46	</TR>
47	<TR>
48		<TH>SO_EINVAL</TH>
49		<TD>
50			Either the pointer specified in <CODE><strong><em>config</em></strong></CODE> is invalid, or the function pointers specified in each field of <CODE><strong><em>config</em></strong></CODE> are invalid.
51		</TD>
52	</TR>
53	<TR>
54		<TH>SO_ENOMEM</TH>
55		<TD>
56			Cannot allocate the required amount of memory for processing.
57		</TD>
58	</TR>
59</TABLE>
60<P style="background-color:ffe8ff;padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:4px;">
61	<strong>Note: </strong> Error codes other than those described above might be returned following subsequent library or console firmware updates. To deal with unexpected errors during development, treat all negative return values other than those described above as fatal errors, and either halt program execution or perform similar error handling.
62</P>
63
64<H2>See Also</H2>
65<P>
66	<CODE>
67		<a href="SOFinish.html">SOFinish</a><br>
68		<a href="SOStartup.html">SOStartup</a><br>
69		<a href="SOStartup.html">SOStartupEx</a><br>
70		<a href="SOLibraryConfig.html">SOLibraryConfig</a><br>
71	</CODE>
72</P>
73
74<H2>Revision History</H2>
75<P>
76	2008/05/19 Revised notes for error codes. <br>2007/01/31 Initial version.<br>
77</P>
78
79<hr><p>CONFIDENTIAL</p></body>
80</HTML>
81