1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libmspack: mschm_decompressor Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">libmspack
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">mschm_decompressor Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A decompressor for .CHM (Microsoft HTMLHelp) files.
<a href="structmschm__decompressor.html#details">More...</a></p>
<p><code>#include <<a class="el" href="mspack_8h_source.html">mspack.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:ab42830f8ef4b434654e50a283852f0a1"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1">open</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, const char *filename)</td></tr>
<tr class="memdesc:ab42830f8ef4b434654e50a283852f0a1"><td class="mdescLeft"> </td><td class="mdescRight">Opens a CHM helpfile and reads its contents. <a href="#ab42830f8ef4b434654e50a283852f0a1">More...</a><br/></td></tr>
<tr class="separator:ab42830f8ef4b434654e50a283852f0a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a21c15034a3ae43acf6c817728fa566f1"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1">close</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *chm)</td></tr>
<tr class="memdesc:a21c15034a3ae43acf6c817728fa566f1"><td class="mdescLeft"> </td><td class="mdescRight">Closes a previously opened CHM helpfile. <a href="#a21c15034a3ae43acf6c817728fa566f1">More...</a><br/></td></tr>
<tr class="separator:a21c15034a3ae43acf6c817728fa566f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaeb393cbab926a072719f14c0fbe29d6"><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#aaeb393cbab926a072719f14c0fbe29d6">extract</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__file.html">mschmd_file</a> *file, const char *filename)</td></tr>
<tr class="memdesc:aaeb393cbab926a072719f14c0fbe29d6"><td class="mdescLeft"> </td><td class="mdescRight">Extracts a file from a CHM helpfile. <a href="#aaeb393cbab926a072719f14c0fbe29d6">More...</a><br/></td></tr>
<tr class="separator:aaeb393cbab926a072719f14c0fbe29d6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adc4595f636c976e7c2713f09963e9147"><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#adc4595f636c976e7c2713f09963e9147">last_error</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self)</td></tr>
<tr class="memdesc:adc4595f636c976e7c2713f09963e9147"><td class="mdescLeft"> </td><td class="mdescRight">Returns the error code set by the most recently called method. <a href="#adc4595f636c976e7c2713f09963e9147">More...</a><br/></td></tr>
<tr class="separator:adc4595f636c976e7c2713f09963e9147"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2efa8bb3ce3908506595500e9e3087a7"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7">fast_open</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, const char *filename)</td></tr>
<tr class="memdesc:a2efa8bb3ce3908506595500e9e3087a7"><td class="mdescLeft"> </td><td class="mdescRight">Opens a CHM helpfile quickly. <a href="#a2efa8bb3ce3908506595500e9e3087a7">More...</a><br/></td></tr>
<tr class="separator:a2efa8bb3ce3908506595500e9e3087a7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abeeb6197f7f9ba92f226dc2dc07ed85e"><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e">fast_find</a> )(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *chm, const char *filename, struct <a class="el" href="structmschmd__file.html">mschmd_file</a> *f_ptr, int f_size)</td></tr>
<tr class="memdesc:abeeb6197f7f9ba92f226dc2dc07ed85e"><td class="mdescLeft"> </td><td class="mdescRight">Finds file details quickly. <a href="#abeeb6197f7f9ba92f226dc2dc07ed85e">More...</a><br/></td></tr>
<tr class="separator:abeeb6197f7f9ba92f226dc2dc07ed85e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A decompressor for .CHM (Microsoft HTMLHelp) files. </p>
<p>All fields are READ ONLY.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="mspack_8h.html#a5829a2023927ad4dc8bd452f3b294851" title="Creates a new CHM decompressor. ">mspack_create_chm_decompressor()</a>, <a class="el" href="mspack_8h.html#a50c0799f5c1a128672c024a05c79cac8" title="Destroys an existing CHM decompressor. ">mspack_destroy_chm_decompressor()</a> </dd></dl>
</div><h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a21c15034a3ae43acf6c817728fa566f1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* mschm_decompressor::close)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *chm)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Closes a previously opened CHM helpfile. </p>
<p>This closes a CHM helpfile, frees the <a class="el" href="structmschmd__header.html" title="A structure which represents a CHM helpfile. ">mschmd_header</a> and all <a class="el" href="structmschmd__file.html" title="A structure which represents a file stored in a CHM helpfile. ">mschmd_file</a> structures associated with it (if any). This works on both helpfiles opened with <a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a> and helpfiles opened with <a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7" title="Opens a CHM helpfile quickly. ">fast_open()</a>.</p>
<p>The CHM header pointer is now invalid and cannot be used again. All <a class="el" href="structmschmd__file.html" title="A structure which represents a file stored in a CHM helpfile. ">mschmd_file</a> pointers referencing that CHM are also now invalid, and cannot be used again.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
<tr><td class="paramname">chm</td><td>the CHM helpfile to close </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>, <a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7" title="Opens a CHM helpfile quickly. ">fast_open()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aaeb393cbab926a072719f14c0fbe29d6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* mschm_decompressor::extract)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__file.html">mschmd_file</a> *file, const char *filename)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Extracts a file from a CHM helpfile. </p>
<p>This extracts a file from a CHM helpfile and writes it to the given filename. The filename of the file, <a class="el" href="structmscabd__file.html#a181b45655523f55ed114b51249d305f8" title="The filename of the file. ">mscabd_file::filename</a>, is not used by <a class="el" href="structmschm__decompressor.html#aaeb393cbab926a072719f14c0fbe29d6" title="Extracts a file from a CHM helpfile. ">extract()</a>, but can be used by the caller as a guide for constructing an appropriate filename.</p>
<p>This method works both with files found in the <a class="el" href="structmschmd__header.html#aecdd3b5e84606785e9620a70e8f0d0ed" title="A list of all non-system files in the CHM helpfile. ">mschmd_header::files</a> and <a class="el" href="structmschmd__header.html#ac38b56f77e2a44d998e57ba9301e39d5" title="A list of all system files in the CHM helpfile. ">mschmd_header::sysfiles</a> list and <a class="el" href="structmschmd__file.html" title="A structure which represents a file stored in a CHM helpfile. ">mschmd_file</a> structures generated on the fly by <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
<tr><td class="paramname">file</td><td>the file to be decompressed </td></tr>
<tr><td class="paramname">filename</td><td>the filename of the file being written to </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error code, or MSPACK_ERR_OK if successful </dd></dl>
</div>
</div>
<a class="anchor" id="abeeb6197f7f9ba92f226dc2dc07ed85e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* mschm_decompressor::fast_find)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, struct <a class="el" href="structmschmd__header.html">mschmd_header</a> *chm, const char *filename, struct <a class="el" href="structmschmd__file.html">mschmd_file</a> *f_ptr, int f_size)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds file details quickly. </p>
<p>Instead of reading all CHM helpfile headers and building a list of files, <a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7" title="Opens a CHM helpfile quickly. ">fast_open()</a> and <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a> are intended for finding file details only when they are needed. The CHM file format includes an on-disk file index to allow this.</p>
<p>Given a case-sensitive filename, <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a> will search the on-disk index for that file.</p>
<p>If the file was found, the caller-provided <a class="el" href="structmschmd__file.html" title="A structure which represents a file stored in a CHM helpfile. ">mschmd_file</a> structure will be filled out like so:</p>
<ul>
<li>section: the correct value for the found file</li>
<li>offset: the correct value for the found file</li>
<li>length: the correct value for the found file</li>
<li>all other structure elements: NULL or 0</li>
</ul>
<p>If the file was not found, MSPACK_ERR_OK will still be returned as the result, but the caller-provided structure will be filled out like so:</p>
<ul>
<li>section: NULL</li>
<li>offset: 0</li>
<li>length: 0</li>
<li>all other structure elements: NULL or 0</li>
</ul>
<p>This method is intended to be used in conjunction with CHM helpfiles opened with <a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7" title="Opens a CHM helpfile quickly. ">fast_open()</a>, but it also works with helpfiles opened using the regular <a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
<tr><td class="paramname">chm</td><td>the CHM helpfile to search for the file </td></tr>
<tr><td class="paramname">filename</td><td>the filename of the file to search for </td></tr>
<tr><td class="paramname">f_ptr</td><td>a pointer to a caller-provded <a class="el" href="structmschmd__file.html" title="A structure which represents a file stored in a CHM helpfile. ">mschmd_file</a> structure </td></tr>
<tr><td class="paramname">f_size</td><td><code>sizeof(struct mschmd_file)</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error code, or MSPACK_ERR_OK if successful </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>, <a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1" title="Closes a previously opened CHM helpfile. ">close()</a>, <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a>, <a class="el" href="structmschm__decompressor.html#aaeb393cbab926a072719f14c0fbe29d6" title="Extracts a file from a CHM helpfile. ">extract()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a2efa8bb3ce3908506595500e9e3087a7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="structmschmd__header.html">mschmd_header</a>*(* mschm_decompressor::fast_open)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, const char *filename)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens a CHM helpfile quickly. </p>
<p>If the file opened is a valid CHM helpfile, only essential headers will be read. A <a class="el" href="structmschmd__header.html" title="A structure which represents a CHM helpfile. ">mschmd_header</a> structure will be still be returned, as with <a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>, but the <a class="el" href="structmschmd__header.html#aecdd3b5e84606785e9620a70e8f0d0ed" title="A list of all non-system files in the CHM helpfile. ">mschmd_header::files</a> field will be NULL. No files details will be automatically read. The <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a> method must be used to obtain file details.</p>
<p>In the case of an error occuring, NULL is returned and the error code is available from <a class="el" href="structmschm__decompressor.html#adc4595f636c976e7c2713f09963e9147" title="Returns the error code set by the most recently called method. ">last_error()</a>.</p>
<p>The filename pointer should be considered "in use" until <a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1" title="Closes a previously opened CHM helpfile. ">close()</a> is called on the CHM helpfile.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
<tr><td class="paramname">filename</td><td>the filename of the CHM helpfile. This is passed directly to <a class="el" href="structmspack__system.html#a1a85cac5eeb55db6a432fe3824aa04a3" title="Opens a file for reading, writing, appending or updating. ">mspack_system::open()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to a <a class="el" href="structmschmd__header.html" title="A structure which represents a CHM helpfile. ">mschmd_header</a> structure, or NULL on failure </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>, <a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1" title="Closes a previously opened CHM helpfile. ">close()</a>, <a class="el" href="structmschm__decompressor.html#abeeb6197f7f9ba92f226dc2dc07ed85e" title="Finds file details quickly. ">fast_find()</a>, <a class="el" href="structmschm__decompressor.html#aaeb393cbab926a072719f14c0fbe29d6" title="Extracts a file from a CHM helpfile. ">extract()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="adc4595f636c976e7c2713f09963e9147"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* mschm_decompressor::last_error)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the error code set by the most recently called method. </p>
<p>This is useful for <a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a> and <a class="el" href="structmschm__decompressor.html#a2efa8bb3ce3908506595500e9e3087a7" title="Opens a CHM helpfile quickly. ">fast_open()</a>, which do not return an error code directly.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the most recent error code </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structmschm__decompressor.html#ab42830f8ef4b434654e50a283852f0a1" title="Opens a CHM helpfile and reads its contents. ">open()</a>, <a class="el" href="structmschm__decompressor.html#aaeb393cbab926a072719f14c0fbe29d6" title="Extracts a file from a CHM helpfile. ">extract()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ab42830f8ef4b434654e50a283852f0a1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="structmschmd__header.html">mschmd_header</a>*(* mschm_decompressor::open)(struct <a class="el" href="structmschm__decompressor.html">mschm_decompressor</a> *self, const char *filename)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens a CHM helpfile and reads its contents. </p>
<p>If the file opened is a valid CHM helpfile, all headers will be read and a <a class="el" href="structmschmd__header.html" title="A structure which represents a CHM helpfile. ">mschmd_header</a> structure will be returned, with a full list of files.</p>
<p>In the case of an error occuring, NULL is returned and the error code is available from <a class="el" href="structmschm__decompressor.html#adc4595f636c976e7c2713f09963e9147" title="Returns the error code set by the most recently called method. ">last_error()</a>.</p>
<p>The filename pointer should be considered "in use" until <a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1" title="Closes a previously opened CHM helpfile. ">close()</a> is called on the CHM helpfile.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmschm__decompressor.html" title="A decompressor for .CHM (Microsoft HTMLHelp) files. ">mschm_decompressor</a> instance being called </td></tr>
<tr><td class="paramname">filename</td><td>the filename of the CHM helpfile. This is passed directly to <a class="el" href="structmspack__system.html#a1a85cac5eeb55db6a432fe3824aa04a3" title="Opens a file for reading, writing, appending or updating. ">mspack_system::open()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to a <a class="el" href="structmschmd__header.html" title="A structure which represents a CHM helpfile. ">mschmd_header</a> structure, or NULL on failure </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structmschm__decompressor.html#a21c15034a3ae43acf6c817728fa566f1" title="Closes a previously opened CHM helpfile. ">close()</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="mspack_8h_source.html">mspack.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
|