1<html>
2
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css">
6<title>THPUtyCopyTHPFile</title>
7</head>
8
9<body>
10
11<h1>THPUtyCopyTHPFile</h1>
12
13<h2>C Specification</h2>
14
15<dl>
16<dd><pre><code>#include &lt;win32/thputilities.h&gt;</code></pre></dd>
17<dd><pre><code>s32 THPUtyCopyTHPFile(FILE*            ip,
18THPFileHeader*   fileHeader,
19FILE*            op);</code></pre></dd>
20</dl>
21
22<h2>Arguments</h2>
23<table border="1" cellpadding="3" cellspacing="0.1">
24  <tr>
25<td width="120" bgcolor="#ffffe8"><strong><em><CODE>ip</CODE></em></strong></td>
26<td width="520">File pointer to the copy source.</td>
27  </tr>
28  <tr>
29<td width="120" bgcolor="#ffffe8"><strong><em><CODE>fileHeader</CODE></em></strong></td>
30<td width="520">Pointer to the <code>THPFileHeader</code> structure. </td>
31  </tr>
32  <tr>
33<td width="120" bgcolor="#ffffe8"><strong><em><CODE>op</CODE></em></strong></td>
34<td width="520">File pointer to the copy destination.</td>
35  </tr>
36</table>
37
38<h2>Return Values</h2>
39<p>
40Returns one of the following codes:
41</p>
42
43<table border="1">
44  <tbody>
45    <tr align="center">
46<td>code</td>
47<td width=50>value</td>
48<td>description</td>
49    </tr>
50    <tr>
51<td><CODE>THP_ERROR_NOERROR</CODE></td>
52      <td align="center">0</td>
53<td>The function ended normally.</td>
54    </tr>
55    <tr>
56<td><CODE>THP_ERROR_FILEIO</CODE></td>
57      <td align="center">1</td>
58<td>Failed to read or write from file. </td>
59    </tr>
60    <tr>
61<td><CODE>THP_ERROR_DATA</CODE></td>
62      <td align="center">4</td>
63<td>The data is invalid. </td>
64    </tr>
65    <tr>
66<td><CODE>THP_ERROR_FATAL</CODE></td>
67      <td align="center">5</td>
68<td>Failed to allocate memory. </td>
69    </tr>
70  </tbody>
71</table>
72
73<h2>Description</h2>
74<p>
75This function copies the THP file specified by <code>ip</code> to <code>op</code>.
76</p>
77<p>
78For more information, see the <CODE>thputilities(D).lib</CODE> source code in <CODE>build/tools/thputilities/src/thputilities.c</CODE>.
79</p>
80
81<h2>See Also</h2>
82<p>
83None.
84</p>
85
86<h2>Revision History</h2>
87<P>03/01/2006 Initial version.</P>
88</body>
89</html>