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<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>CARDSetAttributes</TITLE>
9</HEAD>
10<BODY>
11<H1>CARDSetAttributes</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15  <PRE><code>#include &lt;revolution/card.h&gt;
16
17#define CARD_ATTR_PUBLIC        0x04u  // Any program can read the file
18#define CARD_ATTR_NO_COPY       0x08u  // IPL cannot copy the file
19#define CARD_ATTR_NO_MOVE       0x10u  // IPL cannot move the file
20
21s32 CARDSetAttributes( s32 chan, s32 fileNo, u8 attr );</CODE></PRE>
22</DL>
23<H2>Arguments</H2>
24<TABLE border="1" cellpadding="3" cellspacing="0.1">
25  <TBODY>
26    <TR>
27<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>chan</CODE></STRONG></EM></TD>
28<TD width="520">EXI channel number.</TD>
29    </TR>
30    <TR>
31<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><em><strong><code>fileNo</code></strong></em></CODE></STRONG></EM></TD>
32<TD width="520">File entry number.</TD>
33    </TR>
34    <TR>
35<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>attr</CODE></EM></STRONG></CODE></STRONG></EM></TD>
36<TD width="520">Attributes to set.</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40<H2>Return Values</H2>
41<P>One of the following codes:</P>
42<P><CODE>CARD_RESULT_FATAL_ERROR<BR> CARD_RESULT_NOCARD<BR> CARD_RESULT_NOFILE<BR> CARD_RESULT_NOPERM<BR> CARD_RESULT_BUSY<BR> CARD_RESULT_READY</CODE></P>
43<H2>Description</H2>
44<P>Synchronously sets file attributes using a file number.</P>
45<P>Only the <code>CARD_ATTR_PUBLIC</code> bit is set to a memory card file created by <code><a href="CARDCreate.html">CARDCreate</a></code>/<code><a href="CARDCreateAsync.html">CARDCreateAsync</a></code>. <strong>The <code>CARD_ATTR_PUBLIC</code> must not be turned off by a game program.</strong></P>
46
47<P>A game program can set <code>CARD_ATTR_NO_COPY</code> and/or <code>CARD_ATTR_NO_MOVE</code> bits if required.<strong> A game program must not modify any other bits.</strong></P>
48<p>
49This function may put the current thread to sleep. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
50</p>
51<P><STRONG><B>Note:</B></STRONG> This function is provided for debugging purposes. Applications should not use this function.</P>
52<H2>See Also</H2>
53<P><a target="contents" href="toc.html">Card Functions</a><br> <a href="CARDGetAttributes.html"><code>CARDGetAttributes</code></a><br> <a href="CARDSetAttributesAsync.html"><code>CARDSetAttributesAsync</code></a></P>
54<H2>Revision History</H2>
55<P>2007/09/25 Added information on the sleep status of threads.<br>2006/03/01 Initial version.</P>
56<hr><p>CONFIDENTIAL</p></body>
57</HTML>