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>THPUtyCreateTHP</title> 7</head> 8 9<body> 10 11<h1>THPUtyCreateTHP</h1> 12 13<h2>C Specification</h2> 14 15<dl> 16<dd><pre><code>#include <win32/thputilities.h></code></pre></dd> 17<dd><pre><code>s32 THPUtyCreateTHP(FILE* op, 18s32 fileFlag, 19void* filePtr, 20THPFileHeader* fileHeader, 21THPAudioHandle** audioHandleList);</code></pre></dd> 22</dl> 23 24<h2>Arguments</h2> 25<table border="1" cellpadding="3" cellspacing="0.1"> 26 <tr> 27<td width="120" bgcolor="#ffffe8"><strong><em><CODE>op</CODE></em></strong></td> 28<td width="520">File pointer to the output destination.</td> 29 </tr> 30 <tr> 31<td width="120" bgcolor="#ffffe8"><strong><em><CODE>fileFlag</CODE></em></strong></td> 32<td width="520">Flag that specifies the input data type.</td> 33 </tr> 34 <tr> 35<td width="120" bgcolor="#ffffe8"><strong><em><CODE>filePtr</CODE></em></strong></td> 36<td width="520">Pointer to input data appropriate for <code>fileFlag</code>.</td> 37 </tr> 38 <tr> 39<td width="120" bgcolor="#ffffe8"><strong><em><CODE>fileHeader</CODE></em></strong></td> 40<td width="520">Pointer to the <code>THPFileHeader</code> structure. </td> 41 </tr> 42 <tr> 43<td width="120" bgcolor="#ffffe8"><strong><em><CODE>audioHandleList</CODE></em></strong></td> 44<td width="520">Pointer list for <A href="../thpaudio/THPAudioHandle.html"><code>THPAudioHandle</code></A> structures.</td> 45 </tr> 46</table> 47 48<h2>Return Values</h2> 49<p> 50Returns one of the following codes: 51</p> 52 53<table border="1"> 54 <tbody> 55 <tr align="center"> 56<td>code</td> 57<td width=50>value</td> 58<td>description</td> 59 </tr> 60 <tr> 61<td><CODE>THP_ERROR_NOERROR</CODE></td> 62 <td align="center">0</td> 63<td>The function ended normally.</td> 64 </tr> 65 <tr> 66<td><CODE>THP_ERROR_FILEIO</CODE></td> 67 <td align="center">1</td> 68<td>Failed to read or write from file. </td> 69 </tr> 70 <tr> 71<td><CODE>THP_ERROR_THPFILE</CODE></td> 72 <td align="center">2</td> 73<td>The THP movie data is invalid. </td> 74 </tr> 75 <tr> 76<td><CODE>THP_ERROR_JPEGFILE</CODE></td> 77 <td align="center">3</td> 78<td>The JPEG data is invalid. </td> 79 </tr> 80 <tr> 81<td><CODE>THP_ERROR_DATA</CODE></td> 82 <td align="center">4</td> 83<td>The data is invalid. </td> 84 </tr> 85 <tr> 86<td><CODE>THP_ERROR_FATAL</CODE></td> 87 <td align="center">5</td> 88<td>Failed to allocate memory. </td> 89 </tr> 90 </tbody> 91</table> 92 93<h2>Description</h2> 94<p> 95This function creates THP movie data based on the information in <code>fileHeader</code> and outputs it to <code>op</code>. 96</p> 97<p> 98For more information, see the <CODE>thputilities(D).lib</CODE> source code in <CODE>build/tools/thputilities/src/thputilities.c</CODE>. 99</p> 100 101<h2>See Also</h2> 102<p> 103<A href="../thpaudio/THPAudioHandle.html"><code>THPAudioHandle</code></A> 104</p> 105 106<h2>Revision History</h2> 107<P>03/01/2006 Initial version.</P> 108</body> 109</html>