]> wimlib.net Git - wimlib/blob - doc/html/wimlib_8h.html
Initial commit (current version is wimlib 0.6.2)
[wimlib] / doc / html / wimlib_8h.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>wimlib: wimlib.h File Reference</title>
7
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10
11 <link href="search/search.css" rel="stylesheet" type="text/css"/>
12 <script type="text/javascript" src="jquery.js"></script>
13 <script type="text/javascript" src="search/search.js"></script>
14 <script type="text/javascript">
15   $(document).ready(function() { searchBox.OnSelectItem(0); });
16 </script>
17
18 </head>
19 <body>
20 <div id="top"><!-- do not remove this div! -->
21
22
23 <div id="titlearea">
24 <table cellspacing="0" cellpadding="0">
25  <tbody>
26  <tr style="height: 56px;">
27   
28   
29   <td style="padding-left: 0.5em;">
30    <div id="projectname">wimlib
31    
32    </div>
33    
34   </td>
35   
36   
37   
38  </tr>
39  </tbody>
40 </table>
41 </div>
42
43 <!-- Generated by Doxygen 1.8.0 -->
44 <script type="text/javascript">
45 var searchBox = new SearchBox("searchBox", "search",false,'Search');
46 </script>
47   <div id="navrow1" class="tabs">
48     <ul class="tablist">
49       <li><a href="index.html"><span>Main&#160;Page</span></a></li>
50       <li class="current"><a href="files.html"><span>Files</span></a></li>
51       <li>
52         <div id="MSearchBox" class="MSearchBoxInactive">
53         <span class="left">
54           <img id="MSearchSelect" src="search/mag_sel.png"
55                onmouseover="return searchBox.OnSearchSelectShow()"
56                onmouseout="return searchBox.OnSearchSelectHide()"
57                alt=""/>
58           <input type="text" id="MSearchField" value="Search" accesskey="S"
59                onfocus="searchBox.OnSearchFieldFocus(true)" 
60                onblur="searchBox.OnSearchFieldFocus(false)" 
61                onkeyup="searchBox.OnSearchFieldChange(event)"/>
62           </span><span class="right">
63             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
64           </span>
65         </div>
66       </li>
67     </ul>
68   </div>
69   <div id="navrow2" class="tabs2">
70     <ul class="tablist">
71       <li><a href="files.html"><span>File&#160;List</span></a></li>
72       <li><a href="globals.html"><span>Globals</span></a></li>
73     </ul>
74   </div>
75 <!-- window showing the filter options -->
76 <div id="MSearchSelectWindow"
77      onmouseover="return searchBox.OnSearchSelectShow()"
78      onmouseout="return searchBox.OnSearchSelectHide()"
79      onkeydown="return searchBox.OnSearchSelectKey(event)">
80 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
81
82 <!-- iframe showing the search results (closed by default) -->
83 <div id="MSearchResultsWindow">
84 <iframe src="javascript:void(0)" frameborder="0" 
85         name="MSearchResults" id="MSearchResults">
86 </iframe>
87 </div>
88
89 </div>
90 <div class="header">
91   <div class="summary">
92 <a href="#define-members">Defines</a> &#124;
93 <a href="#typedef-members">Typedefs</a> &#124;
94 <a href="#enum-members">Enumerations</a> &#124;
95 <a href="#func-members">Functions</a>  </div>
96   <div class="headertitle">
97 <div class="title">wimlib.h File Reference</div>  </div>
98 </div><!--header-->
99 <div class="contents">
100 <div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
101 <code>#include &lt;stddef.h&gt;</code><br/>
102 <code>#include &lt;stdbool.h&gt;</code><br/>
103 </div>
104 <p><a href="wimlib_8h_source.html">Go to the source code of this file.</a></p>
105 <table class="memberdecls">
106 <tr><td colspan="2"><h2><a name="define-members"></a>
107 Defines</h2></td></tr>
108 <tr class="memitem:a2e4cb1e44b40191234889705e3680622"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a2e4cb1e44b40191234889705e3680622">WIMLIB_MOUNT_FLAG_READWRITE</a>&#160;&#160;&#160;0x1</td></tr>
109 <tr class="memdesc:a2e4cb1e44b40191234889705e3680622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mount the WIM read-write.  <a href="#a2e4cb1e44b40191234889705e3680622"></a><br/></td></tr>
110 <tr class="memitem:a8b1f4c3c91727e1c77130ad4970eb4fe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a8b1f4c3c91727e1c77130ad4970eb4fe">WIMLIB_MOUNT_FLAG_DEBUG</a>&#160;&#160;&#160;0x2</td></tr>
111 <tr class="memdesc:a8b1f4c3c91727e1c77130ad4970eb4fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">For debugging only.  <a href="#a8b1f4c3c91727e1c77130ad4970eb4fe"></a><br/></td></tr>
112 <tr class="memitem:ac6c58eaa35aab1ada4764786bc379316"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ac6c58eaa35aab1ada4764786bc379316">WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td></tr>
113 <tr class="memdesc:ac6c58eaa35aab1ada4764786bc379316"><td class="mdescLeft">&#160;</td><td class="mdescRight">Include an integrity table in the new WIM being written during the unmount.  <a href="#ac6c58eaa35aab1ada4764786bc379316"></a><br/></td></tr>
114 <tr class="memitem:a714d1722c8a7ca735228622b36a2686f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a714d1722c8a7ca735228622b36a2686f">WIMLIB_UNMOUNT_FLAG_COMMIT</a>&#160;&#160;&#160;0x2</td></tr>
115 <tr class="memdesc:a714d1722c8a7ca735228622b36a2686f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unless this flag is given, changes to a mounted WIM are discarded.  <a href="#a714d1722c8a7ca735228622b36a2686f"></a><br/></td></tr>
116 <tr class="memitem:a8872d952cd82da473169f149e3c1edef"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td></tr>
117 <tr class="memdesc:a8872d952cd82da473169f149e3c1edef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Include an integrity table in the new WIM file.  <a href="#a8872d952cd82da473169f149e3c1edef"></a><br/></td></tr>
118 <tr class="memitem:a3677fc92a7cef0be997f0b46cf86aafc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a>&#160;&#160;&#160;0x2</td></tr>
119 <tr class="memdesc:a3677fc92a7cef0be997f0b46cf86aafc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print progress information when writing the integrity table.  <a href="#a3677fc92a7cef0be997f0b46cf86aafc"></a><br/></td></tr>
120 <tr class="memitem:a7eca1bdfed42090113489710811cad84"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a7eca1bdfed42090113489710811cad84">WIMLIB_ADD_IMAGE_FLAG_BOOT</a>&#160;&#160;&#160;0x1</td></tr>
121 <tr class="memdesc:a7eca1bdfed42090113489710811cad84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark the image being added as the bootable image of the WIM.  <a href="#a7eca1bdfed42090113489710811cad84"></a><br/></td></tr>
122 <tr class="memitem:ab3845f7a365ff9a07f74e1b812d91eaf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ab3845f7a365ff9a07f74e1b812d91eaf">WIMLIB_EXPORT_FLAG_BOOT</a>&#160;&#160;&#160;0x1</td></tr>
123 <tr class="memdesc:ab3845f7a365ff9a07f74e1b812d91eaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">See documentation for <a class="el" href="wimlib_8h.html#af49355f807099e8d1fd7e60e6005a339" title="Copies an image, or all the images, from a WIM file, into another WIM file.">wimlib_export_image()</a>.  <a href="#ab3845f7a365ff9a07f74e1b812d91eaf"></a><br/></td></tr>
124 <tr class="memitem:a5e75328028ae5154a5e84ba666eb024f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td></tr>
125 <tr class="memdesc:a5e75328028ae5154a5e84ba666eb024f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify the integrity of the WIM if an integrity table is present.  <a href="#a5e75328028ae5154a5e84ba666eb024f"></a><br/></td></tr>
126 <tr class="memitem:ab0f497006447480fc69cf0d0b1846be7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ab0f497006447480fc69cf0d0b1846be7">WIMLIB_OPEN_FLAG_SHOW_PROGRESS</a>&#160;&#160;&#160;0x2</td></tr>
127 <tr class="memdesc:ab0f497006447480fc69cf0d0b1846be7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print progress information when verifying integrity table.  <a href="#ab0f497006447480fc69cf0d0b1846be7"></a><br/></td></tr>
128 <tr class="memitem:ad69901bf7b1e99e40366ef14c4a1940b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ad69901bf7b1e99e40366ef14c4a1940b">WIM_NO_IMAGE</a>&#160;&#160;&#160;0</td></tr>
129 <tr class="memdesc:ad69901bf7b1e99e40366ef14c4a1940b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to indicate that no WIM image is currently selected.  <a href="#ad69901bf7b1e99e40366ef14c4a1940b"></a><br/></td></tr>
130 <tr class="memitem:a3145442fb4d62fe894961fa7555e9b8d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d">WIM_ALL_IMAGES</a>&#160;&#160;&#160;(-1)</td></tr>
131 <tr class="memdesc:a3145442fb4d62fe894961fa7555e9b8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to specify all images in the WIM.  <a href="#a3145442fb4d62fe894961fa7555e9b8d"></a><br/></td></tr>
132 <tr><td colspan="2"><h2><a name="typedef-members"></a>
133 Typedefs</h2></td></tr>
134 <tr class="memitem:a8d4f2d1c1110b4519054e55d26b73775"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a></td></tr>
135 <tr class="memdesc:a8d4f2d1c1110b4519054e55d26b73775"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque structure that represents a WIM file.  <a href="#a8d4f2d1c1110b4519054e55d26b73775"></a><br/></td></tr>
136 <tr><td colspan="2"><h2><a name="enum-members"></a>
137 Enumerations</h2></td></tr>
138 <tr class="memitem:ab928fd5c63d88cabe44248aa80cd89cd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cd">wim_link_type</a> { <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda92a57ffc9dd3ffe3c7ffe8a510248f6b">WIM_LINK_TYPE_HARD</a> =  0, 
139 <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda46930507983a8f19967b4ce70096cbc4">WIM_LINK_TYPE_SYMBOLIC</a> =  1, 
140 <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590">WIM_LINK_TYPE_NONE</a> =  2
141  }</td></tr>
142 <tr class="memdesc:ab928fd5c63d88cabe44248aa80cd89cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the way in which identical files are linked when extracting image(s) from the WIM.  <a href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cd">More...</a><br/></td></tr>
143 <tr class="memitem:a918227f354c41d79fe04227ef4236dc3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3">wim_compression_type</a> { <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a227d9907ab3a1c74c73663fd3a3788cb">WIM_COMPRESSION_TYPE_INVALID</a> =  -1, 
144 <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d">WIM_COMPRESSION_TYPE_NONE</a> =  0, 
145 <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1">WIM_COMPRESSION_TYPE_LZX</a> =  1, 
146 <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b">WIM_COMPRESSION_TYPE_XPRESS</a> =  2
147  }</td></tr>
148 <tr class="memdesc:a918227f354c41d79fe04227ef4236dc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the compression type of a WIM file.  <a href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3">More...</a><br/></td></tr>
149 <tr class="memitem:adbc3c5b05b4cf56b81b9c947f3489cb3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3">wimlib_error_code</a> { <br/>
150 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aa4bae7ea2b9570922043fbfd17a8c98c">WIMLIB_ERR_SUCCESS</a> =  0, 
151 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3afc905e18a1006ec4b6dc9f50545347e6">WIMLIB_ERR_COMPRESSED_LOOKUP_TABLE</a>, 
152 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a>, 
153 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae871c4c1f4cb403a6865ed8fd53cf8c6">WIMLIB_ERR_DELETE_STAGING_DIR</a>, 
154 <br/>
155 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3abae4b9232cbaa851ab859a603b7da8b9">WIMLIB_ERR_FORK</a>, 
156 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f9ce102f70c7eb8413ca9e2e1e68e5c">WIMLIB_ERR_FUSE</a>, 
157 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a4904c625f4cc7cf22b2d8e8d975b9ac3">WIMLIB_ERR_FUSERMOUNT</a>, 
158 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab39d4d9d0164721e9d9b1ebe76fa1af4">WIMLIB_ERR_IMAGE_COUNT</a>, 
159 <br/>
160 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a53622e3573c79fbd3415b22d686f0e32">WIMLIB_ERR_IMAGE_NAME_COLLISION</a>, 
161 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae09c379ce896a926c198382b5abd146c">WIMLIB_ERR_INTEGRITY</a>, 
162 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab00472ac204ded42b9281674c88df470">WIMLIB_ERR_INVALID_CHUNK_SIZE</a>, 
163 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae986e4bb4242d5b504431dd3afe230f3">WIMLIB_ERR_INVALID_COMPRESSION_TYPE</a>, 
164 <br/>
165 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a>, 
166 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3abf075122c97df6c119f68ec2ff3f23ef">WIMLIB_ERR_INVALID_HEADER_SIZE</a>, 
167 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a>, 
168 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a27059fce595541a9317064c53f7a795b">WIMLIB_ERR_INVALID_INTEGRITY_TABLE</a>, 
169 <br/>
170 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a>, 
171 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a>, 
172 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab0834a780138563bbe1abb596ef744de">WIMLIB_ERR_LINK</a>, 
173 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f7333fcfe6e6da478bd03e8e11f3674">WIMLIB_ERR_MKDIR</a>, 
174 <br/>
175 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3af07f0e13ff2fc210f4032f38cd525dc6">WIMLIB_ERR_MQUEUE</a>, 
176 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a>, 
177 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ac12f8ffc5380e07bb8db74ae59a6c367">WIMLIB_ERR_NOTDIR</a>, 
178 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5c913db1f7317bfdf6ba5a8bc0a50df3">WIMLIB_ERR_NOT_A_WIM_FILE</a>, 
179 <br/>
180 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5f054f1a9c88f225dd2b34d188c773fa">WIMLIB_ERR_NO_FILENAME</a>, 
181 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a>, 
182 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a4af11de62a3fc0778325341cdfad22a3">WIMLIB_ERR_OPENDIR</a>, 
183 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a>, 
184 <br/>
185 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5a04d4829ff13a775dc70bc456fc1b85">WIMLIB_ERR_RENAME</a>, 
186 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a25572961411c800d61c9fe7afaf99257">WIMLIB_ERR_SPLIT</a>, 
187 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a6b3d64e2851d6bae6fb47eec35f3a6fc">WIMLIB_ERR_STAT</a>, 
188 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aee3c028a9b33d020312343fddfe9febe">WIMLIB_ERR_TIMEOUT</a>, 
189 <br/>
190 &#160;&#160;<a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7a8347db84e4b9656cef81ee16da25fe">WIMLIB_ERR_UNKNOWN_VERSION</a>, 
191 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aaa41915cef472931ace2c8392c9809ac">WIMLIB_ERR_UNSUPPORTED</a>, 
192 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879">WIMLIB_ERR_WRITE</a>, 
193 <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a19a89e814cdebed5629332de6b26d5a6">WIMLIB_ERR_XML</a>
194 <br/>
195  }</td></tr>
196 <tr class="memdesc:adbc3c5b05b4cf56b81b9c947f3489cb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Possible values of the error code returned by many functions in wimlib.  <a href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3">More...</a><br/></td></tr>
197 <tr><td colspan="2"><h2><a name="func-members"></a>
198 Functions</h2></td></tr>
199 <tr class="memitem:a27ff93a6c6e9df370a6aa1eff753bb43"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a27ff93a6c6e9df370a6aa1eff753bb43">wimlib_add_image</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, const char *dir, const char *name, const char *description, const char *flags_element, int flags)</td></tr>
200 <tr class="memdesc:a27ff93a6c6e9df370a6aa1eff753bb43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an image to a WIM file from a directory tree on disk.  <a href="#a27ff93a6c6e9df370a6aa1eff753bb43"></a><br/></td></tr>
201 <tr class="memitem:a75acbea33e2faf398d58865fb764b91e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a75acbea33e2faf398d58865fb764b91e">wimlib_create_new_wim</a> (int ctype, <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> **wim_ret)</td></tr>
202 <tr class="memdesc:a75acbea33e2faf398d58865fb764b91e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a WIMStruct for a new WIM file.  <a href="#a75acbea33e2faf398d58865fb764b91e"></a><br/></td></tr>
203 <tr class="memitem:ac47d66568b267b7b107fffeb2cdfd25c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ac47d66568b267b7b107fffeb2cdfd25c">wimlib_delete_image</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
204 <tr class="memdesc:ac47d66568b267b7b107fffeb2cdfd25c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes an image, or all images, from a WIM file.  <a href="#ac47d66568b267b7b107fffeb2cdfd25c"></a><br/></td></tr>
205 <tr class="memitem:af49355f807099e8d1fd7e60e6005a339"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#af49355f807099e8d1fd7e60e6005a339">wimlib_export_image</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *src_wim, int src_image, <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *dest_wim, const char *dest_name, const char *dest_description, int flags)</td></tr>
206 <tr class="memdesc:af49355f807099e8d1fd7e60e6005a339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies an image, or all the images, from a WIM file, into another WIM file.  <a href="#af49355f807099e8d1fd7e60e6005a339"></a><br/></td></tr>
207 <tr class="memitem:a6a681ff211ec60f05a6ac5f743b17f65"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a6a681ff211ec60f05a6ac5f743b17f65">wimlib_extract_image</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
208 <tr class="memdesc:a6a681ff211ec60f05a6ac5f743b17f65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts an image, or all images, from a WIM file.  <a href="#a6a681ff211ec60f05a6ac5f743b17f65"></a><br/></td></tr>
209 <tr class="memitem:a63ae979394ba582d7c3a4e0132f209c7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a63ae979394ba582d7c3a4e0132f209c7">wimlib_extract_xml_data</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, FILE *fp)</td></tr>
210 <tr class="memdesc:a63ae979394ba582d7c3a4e0132f209c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts the XML data for a WIM file to a file stream.  <a href="#a63ae979394ba582d7c3a4e0132f209c7"></a><br/></td></tr>
211 <tr class="memitem:a36a722a1651ff46b2f5a11a445c6fd73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a36a722a1651ff46b2f5a11a445c6fd73">wimlib_free</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
212 <tr class="memdesc:a36a722a1651ff46b2f5a11a445c6fd73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees all memory allocated for a WIMStruct and closes all files associated with it.  <a href="#a36a722a1651ff46b2f5a11a445c6fd73"></a><br/></td></tr>
213 <tr class="memitem:ae4cd7e230f7c76b98f9505b5858ab8b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ae4cd7e230f7c76b98f9505b5858ab8b1">wimlib_get_boot_idx</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
214 <tr class="memdesc:ae4cd7e230f7c76b98f9505b5858ab8b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds which image in a WIM is bootable.  <a href="#ae4cd7e230f7c76b98f9505b5858ab8b1"></a><br/></td></tr>
215 <tr class="memitem:a0ed735afc24bd8ee0aad106066f27df0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a0ed735afc24bd8ee0aad106066f27df0">wimlib_get_compression_type</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
216 <tr class="memdesc:a0ed735afc24bd8ee0aad106066f27df0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the compression type used in the WIM.  <a href="#a0ed735afc24bd8ee0aad106066f27df0"></a><br/></td></tr>
217 <tr class="memitem:a8f883a95dd091f4566eeb2a097542bc9"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a8f883a95dd091f4566eeb2a097542bc9">wimlib_get_compression_type_string</a> (int ctype)</td></tr>
218 <tr class="memdesc:a8f883a95dd091f4566eeb2a097542bc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a compression type enumeration value into a string.  <a href="#a8f883a95dd091f4566eeb2a097542bc9"></a><br/></td></tr>
219 <tr class="memitem:a4cad466851acb2f24ba4af35b27003b7"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a4cad466851acb2f24ba4af35b27003b7">wimlib_get_error_string</a> (enum <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3">wimlib_error_code</a> code)</td></tr>
220 <tr class="memdesc:a4cad466851acb2f24ba4af35b27003b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an error code into a string describing it.  <a href="#a4cad466851acb2f24ba4af35b27003b7"></a><br/></td></tr>
221 <tr class="memitem:a6ce758e0a3842cd8cde827f29dce539a"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a6ce758e0a3842cd8cde827f29dce539a">wimlib_get_image_description</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
222 <tr class="memdesc:a6ce758e0a3842cd8cde827f29dce539a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the description of the specified image.  <a href="#a6ce758e0a3842cd8cde827f29dce539a"></a><br/></td></tr>
223 <tr class="memitem:a43aae473e66cb05a502fee8f59e95953"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a43aae473e66cb05a502fee8f59e95953">wimlib_get_image_name</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
224 <tr class="memdesc:a43aae473e66cb05a502fee8f59e95953"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the specified image.  <a href="#a43aae473e66cb05a502fee8f59e95953"></a><br/></td></tr>
225 <tr class="memitem:a9438157c8b2f3576c52bd82b2a873c33"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a9438157c8b2f3576c52bd82b2a873c33">wimlib_get_num_images</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
226 <tr class="memdesc:a9438157c8b2f3576c52bd82b2a873c33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of images contained in the WIM.  <a href="#a9438157c8b2f3576c52bd82b2a873c33"></a><br/></td></tr>
227 <tr class="memitem:a56fb949c6316fe44263074eda41b1e9e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a56fb949c6316fe44263074eda41b1e9e">wimlib_has_integrity_table</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
228 <tr class="memdesc:a56fb949c6316fe44263074eda41b1e9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the WIM has an integrity table.  <a href="#a56fb949c6316fe44263074eda41b1e9e"></a><br/></td></tr>
229 <tr class="memitem:af7122e05c58edd9091a3fa89b044957c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#af7122e05c58edd9091a3fa89b044957c">wimlib_image_name_in_use</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, const char *name)</td></tr>
230 <tr class="memdesc:af7122e05c58edd9091a3fa89b044957c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if an image name is already used by some image in the WIM.  <a href="#af7122e05c58edd9091a3fa89b044957c"></a><br/></td></tr>
231 <tr class="memitem:aa6c0a2c2b896530718bd23e433b07e46"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46">wimlib_mount</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image, const char *dir, int flags)</td></tr>
232 <tr class="memdesc:aa6c0a2c2b896530718bd23e433b07e46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mounts an image in a WIM file on a directory read-only or read-write.  <a href="#aa6c0a2c2b896530718bd23e433b07e46"></a><br/></td></tr>
233 <tr class="memitem:a16e1b87c7ab9eeadc0523a2477bfb0f6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a16e1b87c7ab9eeadc0523a2477bfb0f6">wimlib_open_wim</a> (const char *wim_file, int flags, <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> **wim_ret)</td></tr>
234 <tr class="memdesc:a16e1b87c7ab9eeadc0523a2477bfb0f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a WIM file and creates a <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for it.  <a href="#a16e1b87c7ab9eeadc0523a2477bfb0f6"></a><br/></td></tr>
235 <tr class="memitem:ab8648f8386379f2b2930b877e4efd6ca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ab8648f8386379f2b2930b877e4efd6ca">wimlib_overwrite</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int flags)</td></tr>
236 <tr class="memdesc:ab8648f8386379f2b2930b877e4efd6ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overwrites the file that the WIM was originally read from, with changes made.  <a href="#ab8648f8386379f2b2930b877e4efd6ca"></a><br/></td></tr>
237 <tr class="memitem:aec658496a01b1ca9dfd97eb9b9a92bb8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#aec658496a01b1ca9dfd97eb9b9a92bb8">wimlib_overwrite_xml_and_header</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int flags)</td></tr>
238 <tr class="memdesc:aec658496a01b1ca9dfd97eb9b9a92bb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the header and XML data of the WIM file, without the need to write out the entire WIM to a temporary file as in <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a>.  <a href="#aec658496a01b1ca9dfd97eb9b9a92bb8"></a><br/></td></tr>
239 <tr class="memitem:ac5e1163a26407030eb617d0e5aca7cc7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ac5e1163a26407030eb617d0e5aca7cc7">wimlib_print_available_images</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
240 <tr class="memdesc:ac5e1163a26407030eb617d0e5aca7cc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints information about one image, or all images, contained in a WIM.  <a href="#ac5e1163a26407030eb617d0e5aca7cc7"></a><br/></td></tr>
241 <tr class="memitem:a1be7f226c22dbdf3a87c6d887ae34fb0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a1be7f226c22dbdf3a87c6d887ae34fb0">wimlib_print_files</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
242 <tr class="memdesc:a1be7f226c22dbdf3a87c6d887ae34fb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the full paths to all files contained in an image, or all images, in a WIM file.  <a href="#a1be7f226c22dbdf3a87c6d887ae34fb0"></a><br/></td></tr>
243 <tr class="memitem:aaa13ab4498e560d947f77ab944fd0b9f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#aaa13ab4498e560d947f77ab944fd0b9f">wimlib_print_header</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
244 <tr class="memdesc:aaa13ab4498e560d947f77ab944fd0b9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints detailed information from the header of a WIM file.  <a href="#aaa13ab4498e560d947f77ab944fd0b9f"></a><br/></td></tr>
245 <tr class="memitem:aa6b855c5f6cf59498d1bf4f8da2fcc52"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#aa6b855c5f6cf59498d1bf4f8da2fcc52">wimlib_print_lookup_table</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
246 <tr class="memdesc:aa6b855c5f6cf59498d1bf4f8da2fcc52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the lookup table of a WIM file.  <a href="#aa6b855c5f6cf59498d1bf4f8da2fcc52"></a><br/></td></tr>
247 <tr class="memitem:a837aed1a79e6b3de82dc82ef14a1cc00"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a837aed1a79e6b3de82dc82ef14a1cc00">wimlib_print_metadata</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image)</td></tr>
248 <tr class="memdesc:a837aed1a79e6b3de82dc82ef14a1cc00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the metadata of the specified image in a WIM file.  <a href="#a837aed1a79e6b3de82dc82ef14a1cc00"></a><br/></td></tr>
249 <tr class="memitem:a22f2fdae09266e8a45a6418afeaee10f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a22f2fdae09266e8a45a6418afeaee10f">wimlib_print_wim_information</a> (const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim)</td></tr>
250 <tr class="memdesc:a22f2fdae09266e8a45a6418afeaee10f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints some basic information about a WIM file.  <a href="#a22f2fdae09266e8a45a6418afeaee10f"></a><br/></td></tr>
251 <tr class="memitem:a18e40a559010bdf64279268e1a8bab84"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a18e40a559010bdf64279268e1a8bab84">wimlib_resolve_image</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, const char *image_name_or_num)</td></tr>
252 <tr class="memdesc:a18e40a559010bdf64279268e1a8bab84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translates a string specifying the name or number of an image in the WIM into the number of the image.  <a href="#a18e40a559010bdf64279268e1a8bab84"></a><br/></td></tr>
253 <tr class="memitem:ae93da6be8e7ca228ef788a486d3a3c90"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ae93da6be8e7ca228ef788a486d3a3c90">wimlib_set_boot_idx</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int boot_idx)</td></tr>
254 <tr class="memdesc:ae93da6be8e7ca228ef788a486d3a3c90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets which image in the WIM is marked as bootable.  <a href="#ae93da6be8e7ca228ef788a486d3a3c90"></a><br/></td></tr>
255 <tr class="memitem:a537d600a9f1e36413cb6566260944187"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a537d600a9f1e36413cb6566260944187">wimlib_set_image_descripton</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image, const char *description)</td></tr>
256 <tr class="memdesc:a537d600a9f1e36413cb6566260944187"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the description of an image in the WIM.  <a href="#a537d600a9f1e36413cb6566260944187"></a><br/></td></tr>
257 <tr class="memitem:a04cff2065ef690929b4fa1d1b91a9f91"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a04cff2065ef690929b4fa1d1b91a9f91">wimlib_set_image_name</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int image, const char *name)</td></tr>
258 <tr class="memdesc:a04cff2065ef690929b4fa1d1b91a9f91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the name of an image in the WIM.  <a href="#a04cff2065ef690929b4fa1d1b91a9f91"></a><br/></td></tr>
259 <tr class="memitem:a61ebe33de7cce54fdeb70b80d8bcaf7c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a61ebe33de7cce54fdeb70b80d8bcaf7c">wimlib_set_link_type</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, int link_type)</td></tr>
260 <tr class="memdesc:a61ebe33de7cce54fdeb70b80d8bcaf7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the link type to use when extracting files from a WIM.  <a href="#a61ebe33de7cce54fdeb70b80d8bcaf7c"></a><br/></td></tr>
261 <tr class="memitem:a956a20eabacceda5230e346ee5cd387f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a956a20eabacceda5230e346ee5cd387f">wimlib_set_memory_allocator</a> (void *(*malloc_func)(size_t), void(*free_func)(void *), void *(*realloc_func)(void *, size_t))</td></tr>
262 <tr class="memdesc:a956a20eabacceda5230e346ee5cd387f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the functions that wimlib uses to allocate and free memory.  <a href="#a956a20eabacceda5230e346ee5cd387f"></a><br/></td></tr>
263 <tr class="memitem:a49c39d3c9aa74ac63e1f97da97c20959"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a49c39d3c9aa74ac63e1f97da97c20959">wimlib_set_print_errors</a> (bool show_messages)</td></tr>
264 <tr class="memdesc:a49c39d3c9aa74ac63e1f97da97c20959"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether wimlib is to print error messages to <code>stderr</code> when a function fails or not.  <a href="#a49c39d3c9aa74ac63e1f97da97c20959"></a><br/></td></tr>
265 <tr class="memitem:a86ac437c91a3a4000e0745ae859d2a13"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a86ac437c91a3a4000e0745ae859d2a13">wimlib_set_verbose</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, bool verbose)</td></tr>
266 <tr class="memdesc:a86ac437c91a3a4000e0745ae859d2a13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether wimlib is to be verbose when extracting files from a WIM or when creating an image from a directory (i.e.  <a href="#a86ac437c91a3a4000e0745ae859d2a13"></a><br/></td></tr>
267 <tr class="memitem:ab2a5fd17df52da1517835a05ee9b4965"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#ab2a5fd17df52da1517835a05ee9b4965">wimlib_set_output_dir</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, const char *dir)</td></tr>
268 <tr class="memdesc:ab2a5fd17df52da1517835a05ee9b4965"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets and creates the directory to which files are to be extracted when extracting files from the WIM.  <a href="#ab2a5fd17df52da1517835a05ee9b4965"></a><br/></td></tr>
269 <tr class="memitem:a2e0ba93652ac9372b56f9a67e3dbf1a1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a2e0ba93652ac9372b56f9a67e3dbf1a1">wimlib_unmount</a> (const char *dir, int flags)</td></tr>
270 <tr class="memdesc:a2e0ba93652ac9372b56f9a67e3dbf1a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unmounts a WIM image that was mounted using <a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46" title="Mounts an image in a WIM file on a directory read-only or read-write.">wimlib_mount()</a>.  <a href="#a2e0ba93652ac9372b56f9a67e3dbf1a1"></a><br/></td></tr>
271 <tr class="memitem:a968b46d4decee0ff73504ad9b212734e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e">wimlib_write</a> (<a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *wim, const char *path, int image, int flags)</td></tr>
272 <tr class="memdesc:a968b46d4decee0ff73504ad9b212734e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the WIM to a file.  <a href="#a968b46d4decee0ff73504ad9b212734e"></a><br/></td></tr>
273 </table>
274 <hr/><h2>Define Documentation</h2>
275 <a class="anchor" id="a3145442fb4d62fe894961fa7555e9b8d"></a>
276 <div class="memitem">
277 <div class="memproto">
278       <table class="memname">
279         <tr>
280           <td class="memname">#define <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d">WIM_ALL_IMAGES</a>&#160;&#160;&#160;(-1)</td>
281         </tr>
282       </table>
283 </div>
284 <div class="memdoc">
285
286 <p>Used to specify all images in the WIM. </p>
287
288 </div>
289 </div>
290 <a class="anchor" id="ad69901bf7b1e99e40366ef14c4a1940b"></a>
291 <div class="memitem">
292 <div class="memproto">
293       <table class="memname">
294         <tr>
295           <td class="memname">#define <a class="el" href="wimlib_8h.html#ad69901bf7b1e99e40366ef14c4a1940b">WIM_NO_IMAGE</a>&#160;&#160;&#160;0</td>
296         </tr>
297       </table>
298 </div>
299 <div class="memdoc">
300
301 <p>Used to indicate that no WIM image is currently selected. </p>
302
303 </div>
304 </div>
305 <a class="anchor" id="a7eca1bdfed42090113489710811cad84"></a>
306 <div class="memitem">
307 <div class="memproto">
308       <table class="memname">
309         <tr>
310           <td class="memname">#define <a class="el" href="wimlib_8h.html#a7eca1bdfed42090113489710811cad84">WIMLIB_ADD_IMAGE_FLAG_BOOT</a>&#160;&#160;&#160;0x1</td>
311         </tr>
312       </table>
313 </div>
314 <div class="memdoc">
315
316 <p>Mark the image being added as the bootable image of the WIM. </p>
317
318 </div>
319 </div>
320 <a class="anchor" id="ab3845f7a365ff9a07f74e1b812d91eaf"></a>
321 <div class="memitem">
322 <div class="memproto">
323       <table class="memname">
324         <tr>
325           <td class="memname">#define <a class="el" href="wimlib_8h.html#ab3845f7a365ff9a07f74e1b812d91eaf">WIMLIB_EXPORT_FLAG_BOOT</a>&#160;&#160;&#160;0x1</td>
326         </tr>
327       </table>
328 </div>
329 <div class="memdoc">
330
331 <p>See documentation for <a class="el" href="wimlib_8h.html#af49355f807099e8d1fd7e60e6005a339" title="Copies an image, or all the images, from a WIM file, into another WIM file.">wimlib_export_image()</a>. </p>
332
333 </div>
334 </div>
335 <a class="anchor" id="a8b1f4c3c91727e1c77130ad4970eb4fe"></a>
336 <div class="memitem">
337 <div class="memproto">
338       <table class="memname">
339         <tr>
340           <td class="memname">#define <a class="el" href="wimlib_8h.html#a8b1f4c3c91727e1c77130ad4970eb4fe">WIMLIB_MOUNT_FLAG_DEBUG</a>&#160;&#160;&#160;0x2</td>
341         </tr>
342       </table>
343 </div>
344 <div class="memdoc">
345
346 <p>For debugging only. </p>
347 <p>(This passes the <code>-d</code> flag to <code>fuse_main()</code>). </p>
348
349 </div>
350 </div>
351 <a class="anchor" id="a2e4cb1e44b40191234889705e3680622"></a>
352 <div class="memitem">
353 <div class="memproto">
354       <table class="memname">
355         <tr>
356           <td class="memname">#define <a class="el" href="wimlib_8h.html#a2e4cb1e44b40191234889705e3680622">WIMLIB_MOUNT_FLAG_READWRITE</a>&#160;&#160;&#160;0x1</td>
357         </tr>
358       </table>
359 </div>
360 <div class="memdoc">
361
362 <p>Mount the WIM read-write. </p>
363
364 </div>
365 </div>
366 <a class="anchor" id="a5e75328028ae5154a5e84ba666eb024f"></a>
367 <div class="memitem">
368 <div class="memproto">
369       <table class="memname">
370         <tr>
371           <td class="memname">#define <a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td>
372         </tr>
373       </table>
374 </div>
375 <div class="memdoc">
376
377 <p>Verify the integrity of the WIM if an integrity table is present. </p>
378
379 </div>
380 </div>
381 <a class="anchor" id="ab0f497006447480fc69cf0d0b1846be7"></a>
382 <div class="memitem">
383 <div class="memproto">
384       <table class="memname">
385         <tr>
386           <td class="memname">#define <a class="el" href="wimlib_8h.html#ab0f497006447480fc69cf0d0b1846be7">WIMLIB_OPEN_FLAG_SHOW_PROGRESS</a>&#160;&#160;&#160;0x2</td>
387         </tr>
388       </table>
389 </div>
390 <div class="memdoc">
391
392 <p>Print progress information when verifying integrity table. </p>
393
394 </div>
395 </div>
396 <a class="anchor" id="ac6c58eaa35aab1ada4764786bc379316"></a>
397 <div class="memitem">
398 <div class="memproto">
399       <table class="memname">
400         <tr>
401           <td class="memname">#define <a class="el" href="wimlib_8h.html#ac6c58eaa35aab1ada4764786bc379316">WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td>
402         </tr>
403       </table>
404 </div>
405 <div class="memdoc">
406
407 <p>Include an integrity table in the new WIM being written during the unmount. </p>
408 <p>Ignored for read-only mounts. </p>
409
410 </div>
411 </div>
412 <a class="anchor" id="a714d1722c8a7ca735228622b36a2686f"></a>
413 <div class="memitem">
414 <div class="memproto">
415       <table class="memname">
416         <tr>
417           <td class="memname">#define <a class="el" href="wimlib_8h.html#a714d1722c8a7ca735228622b36a2686f">WIMLIB_UNMOUNT_FLAG_COMMIT</a>&#160;&#160;&#160;0x2</td>
418         </tr>
419       </table>
420 </div>
421 <div class="memdoc">
422
423 <p>Unless this flag is given, changes to a mounted WIM are discarded. </p>
424 <p>Ignored for read-only mounts. </p>
425
426 </div>
427 </div>
428 <a class="anchor" id="a8872d952cd82da473169f149e3c1edef"></a>
429 <div class="memitem">
430 <div class="memproto">
431       <table class="memname">
432         <tr>
433           <td class="memname">#define <a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a>&#160;&#160;&#160;0x1</td>
434         </tr>
435       </table>
436 </div>
437 <div class="memdoc">
438
439 <p>Include an integrity table in the new WIM file. </p>
440
441 </div>
442 </div>
443 <a class="anchor" id="a3677fc92a7cef0be997f0b46cf86aafc"></a>
444 <div class="memitem">
445 <div class="memproto">
446       <table class="memname">
447         <tr>
448           <td class="memname">#define <a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a>&#160;&#160;&#160;0x2</td>
449         </tr>
450       </table>
451 </div>
452 <div class="memdoc">
453
454 <p>Print progress information when writing the integrity table. </p>
455
456 </div>
457 </div>
458 <hr/><h2>Typedef Documentation</h2>
459 <a class="anchor" id="a8d4f2d1c1110b4519054e55d26b73775"></a>
460 <div class="memitem">
461 <div class="memproto">
462       <table class="memname">
463         <tr>
464           <td class="memname">typedef struct <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a></td>
465         </tr>
466       </table>
467 </div>
468 <div class="memdoc">
469
470 <p>Opaque structure that represents a WIM file. </p>
471
472 </div>
473 </div>
474 <hr/><h2>Enumeration Type Documentation</h2>
475 <a class="anchor" id="a918227f354c41d79fe04227ef4236dc3"></a>
476 <div class="memitem">
477 <div class="memproto">
478       <table class="memname">
479         <tr>
480           <td class="memname">enum <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3">wim_compression_type</a></td>
481         </tr>
482       </table>
483 </div>
484 <div class="memdoc">
485
486 <p>Specifies the compression type of a WIM file. </p>
487 <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
488 <tr><td valign="top"><em><a class="anchor" id="a918227f354c41d79fe04227ef4236dc3a227d9907ab3a1c74c73663fd3a3788cb"></a>WIM_COMPRESSION_TYPE_INVALID</em>&nbsp;</td><td>
489 <p>An invalid compression type. </p>
490 </td></tr>
491 <tr><td valign="top"><em><a class="anchor" id="a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d"></a>WIM_COMPRESSION_TYPE_NONE</em>&nbsp;</td><td>
492 <p>The WIM does not include any compressed resources. </p>
493 </td></tr>
494 <tr><td valign="top"><em><a class="anchor" id="a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1"></a>WIM_COMPRESSION_TYPE_LZX</em>&nbsp;</td><td>
495 <p>Compressed resources in the WIM use LZX compression. </p>
496 </td></tr>
497 <tr><td valign="top"><em><a class="anchor" id="a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b"></a>WIM_COMPRESSION_TYPE_XPRESS</em>&nbsp;</td><td>
498 <p>Compressed resources in the WIM use XPRESS compression. </p>
499 </td></tr>
500 </table>
501 </dd>
502 </dl>
503
504 </div>
505 </div>
506 <a class="anchor" id="ab928fd5c63d88cabe44248aa80cd89cd"></a>
507 <div class="memitem">
508 <div class="memproto">
509       <table class="memname">
510         <tr>
511           <td class="memname">enum <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cd">wim_link_type</a></td>
512         </tr>
513       </table>
514 </div>
515 <div class="memdoc">
516
517 <p>Specifies the way in which identical files are linked when extracting image(s) from the WIM. </p>
518 <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
519 <tr><td valign="top"><em><a class="anchor" id="ab928fd5c63d88cabe44248aa80cd89cda92a57ffc9dd3ffe3c7ffe8a510248f6b"></a>WIM_LINK_TYPE_HARD</em>&nbsp;</td><td>
520 <p>Hard link identical files when extracting files from the WIM. </p>
521 </td></tr>
522 <tr><td valign="top"><em><a class="anchor" id="ab928fd5c63d88cabe44248aa80cd89cda46930507983a8f19967b4ce70096cbc4"></a>WIM_LINK_TYPE_SYMBOLIC</em>&nbsp;</td><td>
523 <p>Symbolic link identical files when extracting files from the WIM. </p>
524 </td></tr>
525 <tr><td valign="top"><em><a class="anchor" id="ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590"></a>WIM_LINK_TYPE_NONE</em>&nbsp;</td><td>
526 <p>Do not create links when extracting identical files from the WIM (default). </p>
527 </td></tr>
528 </table>
529 </dd>
530 </dl>
531
532 </div>
533 </div>
534 <a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3"></a>
535 <div class="memitem">
536 <div class="memproto">
537       <table class="memname">
538         <tr>
539           <td class="memname">enum <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3">wimlib_error_code</a></td>
540         </tr>
541       </table>
542 </div>
543 <div class="memdoc">
544
545 <p>Possible values of the error code returned by many functions in wimlib. </p>
546 <p>See the documentation for each wimlib function to see specifically what error codes can be returned by a given function, and what they mean. </p>
547 <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
548 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3aa4bae7ea2b9570922043fbfd17a8c98c"></a>WIMLIB_ERR_SUCCESS</em>&nbsp;</td><td>
549 </td></tr>
550 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3afc905e18a1006ec4b6dc9f50545347e6"></a>WIMLIB_ERR_COMPRESSED_LOOKUP_TABLE</em>&nbsp;</td><td>
551 </td></tr>
552 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854"></a>WIMLIB_ERR_DECOMPRESSION</em>&nbsp;</td><td>
553 </td></tr>
554 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ae871c4c1f4cb403a6865ed8fd53cf8c6"></a>WIMLIB_ERR_DELETE_STAGING_DIR</em>&nbsp;</td><td>
555 </td></tr>
556 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3abae4b9232cbaa851ab859a603b7da8b9"></a>WIMLIB_ERR_FORK</em>&nbsp;</td><td>
557 </td></tr>
558 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a9f9ce102f70c7eb8413ca9e2e1e68e5c"></a>WIMLIB_ERR_FUSE</em>&nbsp;</td><td>
559 </td></tr>
560 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a4904c625f4cc7cf22b2d8e8d975b9ac3"></a>WIMLIB_ERR_FUSERMOUNT</em>&nbsp;</td><td>
561 </td></tr>
562 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ab39d4d9d0164721e9d9b1ebe76fa1af4"></a>WIMLIB_ERR_IMAGE_COUNT</em>&nbsp;</td><td>
563 </td></tr>
564 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a53622e3573c79fbd3415b22d686f0e32"></a>WIMLIB_ERR_IMAGE_NAME_COLLISION</em>&nbsp;</td><td>
565 </td></tr>
566 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ae09c379ce896a926c198382b5abd146c"></a>WIMLIB_ERR_INTEGRITY</em>&nbsp;</td><td>
567 </td></tr>
568 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ab00472ac204ded42b9281674c88df470"></a>WIMLIB_ERR_INVALID_CHUNK_SIZE</em>&nbsp;</td><td>
569 </td></tr>
570 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ae986e4bb4242d5b504431dd3afe230f3"></a>WIMLIB_ERR_INVALID_COMPRESSION_TYPE</em>&nbsp;</td><td>
571 </td></tr>
572 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1"></a>WIMLIB_ERR_INVALID_DENTRY</em>&nbsp;</td><td>
573 </td></tr>
574 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3abf075122c97df6c119f68ec2ff3f23ef"></a>WIMLIB_ERR_INVALID_HEADER_SIZE</em>&nbsp;</td><td>
575 </td></tr>
576 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34"></a>WIMLIB_ERR_INVALID_IMAGE</em>&nbsp;</td><td>
577 </td></tr>
578 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a27059fce595541a9317064c53f7a795b"></a>WIMLIB_ERR_INVALID_INTEGRITY_TABLE</em>&nbsp;</td><td>
579 </td></tr>
580 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9"></a>WIMLIB_ERR_INVALID_PARAM</em>&nbsp;</td><td>
581 </td></tr>
582 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64"></a>WIMLIB_ERR_INVALID_RESOURCE_SIZE</em>&nbsp;</td><td>
583 </td></tr>
584 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ab0834a780138563bbe1abb596ef744de"></a>WIMLIB_ERR_LINK</em>&nbsp;</td><td>
585 </td></tr>
586 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a9f7333fcfe6e6da478bd03e8e11f3674"></a>WIMLIB_ERR_MKDIR</em>&nbsp;</td><td>
587 </td></tr>
588 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3af07f0e13ff2fc210f4032f38cd525dc6"></a>WIMLIB_ERR_MQUEUE</em>&nbsp;</td><td>
589 </td></tr>
590 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308"></a>WIMLIB_ERR_NOMEM</em>&nbsp;</td><td>
591 </td></tr>
592 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3ac12f8ffc5380e07bb8db74ae59a6c367"></a>WIMLIB_ERR_NOTDIR</em>&nbsp;</td><td>
593 </td></tr>
594 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a5c913db1f7317bfdf6ba5a8bc0a50df3"></a>WIMLIB_ERR_NOT_A_WIM_FILE</em>&nbsp;</td><td>
595 </td></tr>
596 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a5f054f1a9c88f225dd2b34d188c773fa"></a>WIMLIB_ERR_NO_FILENAME</em>&nbsp;</td><td>
597 </td></tr>
598 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62"></a>WIMLIB_ERR_OPEN</em>&nbsp;</td><td>
599 </td></tr>
600 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a4af11de62a3fc0778325341cdfad22a3"></a>WIMLIB_ERR_OPENDIR</em>&nbsp;</td><td>
601 </td></tr>
602 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad"></a>WIMLIB_ERR_READ</em>&nbsp;</td><td>
603 </td></tr>
604 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a5a04d4829ff13a775dc70bc456fc1b85"></a>WIMLIB_ERR_RENAME</em>&nbsp;</td><td>
605 </td></tr>
606 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a25572961411c800d61c9fe7afaf99257"></a>WIMLIB_ERR_SPLIT</em>&nbsp;</td><td>
607 </td></tr>
608 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a6b3d64e2851d6bae6fb47eec35f3a6fc"></a>WIMLIB_ERR_STAT</em>&nbsp;</td><td>
609 </td></tr>
610 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3aee3c028a9b33d020312343fddfe9febe"></a>WIMLIB_ERR_TIMEOUT</em>&nbsp;</td><td>
611 </td></tr>
612 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a7a8347db84e4b9656cef81ee16da25fe"></a>WIMLIB_ERR_UNKNOWN_VERSION</em>&nbsp;</td><td>
613 </td></tr>
614 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3aaa41915cef472931ace2c8392c9809ac"></a>WIMLIB_ERR_UNSUPPORTED</em>&nbsp;</td><td>
615 </td></tr>
616 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879"></a>WIMLIB_ERR_WRITE</em>&nbsp;</td><td>
617 </td></tr>
618 <tr><td valign="top"><em><a class="anchor" id="adbc3c5b05b4cf56b81b9c947f3489cb3a19a89e814cdebed5629332de6b26d5a6"></a>WIMLIB_ERR_XML</em>&nbsp;</td><td>
619 </td></tr>
620 </table>
621 </dd>
622 </dl>
623
624 </div>
625 </div>
626 <hr/><h2>Function Documentation</h2>
627 <a class="anchor" id="a27ff93a6c6e9df370a6aa1eff753bb43"></a>
628 <div class="memitem">
629 <div class="memproto">
630       <table class="memname">
631         <tr>
632           <td class="memname">int <a class="el" href="wimlib_8h.html#a27ff93a6c6e9df370a6aa1eff753bb43">wimlib_add_image</a> </td>
633           <td>(</td>
634           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
635           <td class="paramname"><em>wim</em>, </td>
636         </tr>
637         <tr>
638           <td class="paramkey"></td>
639           <td></td>
640           <td class="paramtype">const char *&#160;</td>
641           <td class="paramname"><em>dir</em>, </td>
642         </tr>
643         <tr>
644           <td class="paramkey"></td>
645           <td></td>
646           <td class="paramtype">const char *&#160;</td>
647           <td class="paramname"><em>name</em>, </td>
648         </tr>
649         <tr>
650           <td class="paramkey"></td>
651           <td></td>
652           <td class="paramtype">const char *&#160;</td>
653           <td class="paramname"><em>description</em>, </td>
654         </tr>
655         <tr>
656           <td class="paramkey"></td>
657           <td></td>
658           <td class="paramtype">const char *&#160;</td>
659           <td class="paramname"><em>flags_element</em>, </td>
660         </tr>
661         <tr>
662           <td class="paramkey"></td>
663           <td></td>
664           <td class="paramtype">int&#160;</td>
665           <td class="paramname"><em>flags</em>&#160;</td>
666         </tr>
667         <tr>
668           <td></td>
669           <td>)</td>
670           <td></td><td></td>
671         </tr>
672       </table>
673 </div>
674 <div class="memdoc">
675
676 <p>Adds an image to a WIM file from a directory tree on disk. </p>
677 <p>The directory tree is read immediately for the purpose of constructing a directory entry tree in-memory. Also, all files are read to calculate their SHA1 message digests. However, because the directory tree may contain a very large amount of data, the files themselves are not read into memory permanently, and instead references to their paths saved. This means that the directory tree must not be modified, other than by adding entirely new files or directories, before executing a call to <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a> or <a class="el" href="wimlib_8h.html#ab8648f8386379f2b2930b877e4efd6ca" title="Overwrites the file that the WIM was originally read from, with changes made.">wimlib_overwrite()</a>. Otherwise, <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a> may fail or incorrect files may be included in the WIM written by <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a>.</p>
678 <dl class="params"><dt><b>Parameters:</b></dt><dd>
679   <table class="params">
680     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file to which the image will be added. </td></tr>
681     <tr><td class="paramname">dir</td><td>A path to a directory in the outside filesystem. It will become the root directory for the WIM image. </td></tr>
682     <tr><td class="paramname">name</td><td>The name to give the image. This must be non-<code>NULL</code>. </td></tr>
683     <tr><td class="paramname">description</td><td>The description to give the image. This parameter may be left <code>NULL</code>, in which case no description is given to the image. </td></tr>
684     <tr><td class="paramname">flags_element</td><td>What to put in the &lt;FLAGS&gt; element for the image's XML data. This parameter may be left <code>NULL</code>, in which case no &lt;FLAGS&gt; element is given to the image. </td></tr>
685     <tr><td class="paramname">flags</td><td>If set to <a class="el" href="wimlib_8h.html#a7eca1bdfed42090113489710811cad84" title="Mark the image being added as the bootable image of the WIM.">WIMLIB_ADD_IMAGE_FLAG_BOOT</a>, change the image in <em>wim</em> marked as bootable to the one being added. Otherwise, leave the boot index unchanged.</td></tr>
686   </table>
687   </dd>
688 </dl>
689 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
690 <dl class="retval"><dt><b>Return values:</b></dt><dd>
691   <table class="retval">
692     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a53622e3573c79fbd3415b22d686f0e32">WIMLIB_ERR_IMAGE_NAME_COLLISION</a></td><td>There is already an image named <em>name</em> in <em>w</em>. </td></tr>
693     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a></td><td><em>dir</em> was <code>NULL</code>, <em>name</em> was <code>NULL</code>, or <em>name</em> was the empty string. </td></tr>
694     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
695     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ac12f8ffc5380e07bb8db74ae59a6c367">WIMLIB_ERR_NOTDIR</a></td><td><em>dir</em> is not a directory. </td></tr>
696     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>Failed to open a file or directory in the directory tree rooted at <em>dir</em>. </td></tr>
697     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>Failed to read a file in the directory tree rooted at <em>dir</em>. </td></tr>
698     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a6b3d64e2851d6bae6fb47eec35f3a6fc">WIMLIB_ERR_STAT</a></td><td>Failed obtain the metadata for a file or directory in the directory tree rooted at <em>dir</em>. </td></tr>
699   </table>
700   </dd>
701 </dl>
702
703 </div>
704 </div>
705 <a class="anchor" id="a75acbea33e2faf398d58865fb764b91e"></a>
706 <div class="memitem">
707 <div class="memproto">
708       <table class="memname">
709         <tr>
710           <td class="memname">int <a class="el" href="wimlib_8h.html#a75acbea33e2faf398d58865fb764b91e">wimlib_create_new_wim</a> </td>
711           <td>(</td>
712           <td class="paramtype">int&#160;</td>
713           <td class="paramname"><em>ctype</em>, </td>
714         </tr>
715         <tr>
716           <td class="paramkey"></td>
717           <td></td>
718           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> **&#160;</td>
719           <td class="paramname"><em>wim_ret</em>&#160;</td>
720         </tr>
721         <tr>
722           <td></td>
723           <td>)</td>
724           <td></td><td></td>
725         </tr>
726       </table>
727 </div>
728 <div class="memdoc">
729
730 <p>Creates a WIMStruct for a new WIM file. </p>
731 <dl class="params"><dt><b>Parameters:</b></dt><dd>
732   <table class="params">
733     <tr><td class="paramname">ctype</td><td>The type of compression to be used in the new WIM file. Must be <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d" title="The WIM does not include any compressed resources.">WIM_COMPRESSION_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1" title="Compressed resources in the WIM use LZX compression.">WIM_COMPRESSION_TYPE_LZX</a>, or <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b" title="Compressed resources in the WIM use XPRESS compression.">WIM_COMPRESSION_TYPE_XPRESS</a>. </td></tr>
734     <tr><td class="paramname">wim_ret</td><td>On success, a pointer to an opaque <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the new WIM file is written to the memory location pointed to by this paramater. The <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> must be freed using using FREE() when finished with it. </td></tr>
735   </table>
736   </dd>
737 </dl>
738 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
739 <dl class="retval"><dt><b>Return values:</b></dt><dd>
740   <table class="retval">
741     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae986e4bb4242d5b504431dd3afe230f3">WIMLIB_ERR_INVALID_COMPRESSION_TYPE</a></td><td><em>ctype</em> was not <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d" title="The WIM does not include any compressed resources.">WIM_COMPRESSION_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1" title="Compressed resources in the WIM use LZX compression.">WIM_COMPRESSION_TYPE_LZX</a>, or <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b" title="Compressed resources in the WIM use XPRESS compression.">WIM_COMPRESSION_TYPE_XPRESS</a>. </td></tr>
742     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
743   </table>
744   </dd>
745 </dl>
746
747 </div>
748 </div>
749 <a class="anchor" id="ac47d66568b267b7b107fffeb2cdfd25c"></a>
750 <div class="memitem">
751 <div class="memproto">
752       <table class="memname">
753         <tr>
754           <td class="memname">int <a class="el" href="wimlib_8h.html#ac47d66568b267b7b107fffeb2cdfd25c">wimlib_delete_image</a> </td>
755           <td>(</td>
756           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
757           <td class="paramname"><em>wim</em>, </td>
758         </tr>
759         <tr>
760           <td class="paramkey"></td>
761           <td></td>
762           <td class="paramtype">int&#160;</td>
763           <td class="paramname"><em>image</em>&#160;</td>
764         </tr>
765         <tr>
766           <td></td>
767           <td>)</td>
768           <td></td><td></td>
769         </tr>
770       </table>
771 </div>
772 <div class="memdoc">
773
774 <p>Deletes an image, or all images, from a WIM file. </p>
775 <p>All file resources referenced by the image(s) being deleted are removed from the WIM if they are not referenced by any other images in the WIM.</p>
776 <dl class="params"><dt><b>Parameters:</b></dt><dd>
777   <table class="params">
778     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file that contains the image(s) being deleted. </td></tr>
779     <tr><td class="paramname">image</td><td>The number of the image to delete, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to delete all images. </td></tr>
780   </table>
781   </dd>
782 </dl>
783 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
784 <dl class="retval"><dt><b>Return values:</b></dt><dd>
785   <table class="retval">
786     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>Could not decompress the metadata resource for <em>image</em>. </td></tr>
787     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for <em>image</em> in the WIM is invalid. </td></tr>
788     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not exist in the WIM and is not <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>. </td></tr>
789     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for <em>image</em> in the WIM is invalid. </td></tr>
790     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
791     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>Could not read the metadata resource for <em>image</em> from the WIM. </td></tr>
792   </table>
793   </dd>
794 </dl>
795
796 </div>
797 </div>
798 <a class="anchor" id="af49355f807099e8d1fd7e60e6005a339"></a>
799 <div class="memitem">
800 <div class="memproto">
801       <table class="memname">
802         <tr>
803           <td class="memname">int <a class="el" href="wimlib_8h.html#af49355f807099e8d1fd7e60e6005a339">wimlib_export_image</a> </td>
804           <td>(</td>
805           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
806           <td class="paramname"><em>src_wim</em>, </td>
807         </tr>
808         <tr>
809           <td class="paramkey"></td>
810           <td></td>
811           <td class="paramtype">int&#160;</td>
812           <td class="paramname"><em>src_image</em>, </td>
813         </tr>
814         <tr>
815           <td class="paramkey"></td>
816           <td></td>
817           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
818           <td class="paramname"><em>dest_wim</em>, </td>
819         </tr>
820         <tr>
821           <td class="paramkey"></td>
822           <td></td>
823           <td class="paramtype">const char *&#160;</td>
824           <td class="paramname"><em>dest_name</em>, </td>
825         </tr>
826         <tr>
827           <td class="paramkey"></td>
828           <td></td>
829           <td class="paramtype">const char *&#160;</td>
830           <td class="paramname"><em>dest_description</em>, </td>
831         </tr>
832         <tr>
833           <td class="paramkey"></td>
834           <td></td>
835           <td class="paramtype">int&#160;</td>
836           <td class="paramname"><em>flags</em>&#160;</td>
837         </tr>
838         <tr>
839           <td></td>
840           <td>)</td>
841           <td></td><td></td>
842         </tr>
843       </table>
844 </div>
845 <div class="memdoc">
846
847 <p>Copies an image, or all the images, from a WIM file, into another WIM file. </p>
848 <dl class="params"><dt><b>Parameters:</b></dt><dd>
849   <table class="params">
850     <tr><td class="paramname">src_wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file that contains the image(s) being exported. </td></tr>
851     <tr><td class="paramname">src_image</td><td>The image to export from <em>src_wim</em>. Can be the number of an image, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to export all images. </td></tr>
852     <tr><td class="paramname">dest_wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM filethat will receive the images being exported. </td></tr>
853     <tr><td class="paramname">dest_name</td><td>The name to give the exported image in the new WIM file. If left <code>NULL</code>, the name from <em>src_wim</em> is used. This parameter must be left <code>NULL</code> if <em>src_image</em> is <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> and <em>src_wim</em> contains more than one image; in that case, the names are all taken from the <em>src_wim</em>. </td></tr>
854     <tr><td class="paramname">dest_description</td><td>The description to give the exported image in the new WIM file. If left <code>NULL</code>, the description from the <em>src_wim</em> is used. This parameter must be left <code>NULL</code> if <em>src_image</em> is <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> and <em>src_wim</em> contains more than one image; in that case, the descriptions are all taken from <em>src_wim</em>. </td></tr>
855     <tr><td class="paramname">flags</td><td><a class="el" href="wimlib_8h.html#ab3845f7a365ff9a07f74e1b812d91eaf" title="See documentation for wimlib_export_image().">WIMLIB_EXPORT_FLAG_BOOT</a> if the image being exported is to be made bootable, or 0 if which image is marked as bootable in the destination WIM is to be left unchanged. If <em>src_image</em> is <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> and there are multiple images in <em>src_wim</em>, specifying <a class="el" href="wimlib_8h.html#ab3845f7a365ff9a07f74e1b812d91eaf" title="See documentation for wimlib_export_image().">WIMLIB_EXPORT_FLAG_BOOT</a> is valid only if one of the exported images is currently marked as bootable in <em>src_wim</em>; if that is the case, then that image is marked as bootable in the destination WIM.</td></tr>
856   </table>
857   </dd>
858 </dl>
859 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
860 <dl class="retval"><dt><b>Return values:</b></dt><dd>
861   <table class="retval">
862     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>Could not decompress the metadata resource for <em>src_image</em> in <em>src_wim</em> </td></tr>
863     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a53622e3573c79fbd3415b22d686f0e32">WIMLIB_ERR_IMAGE_NAME_COLLISION</a></td><td>One or more of the names being given to an exported image was already in use in the destination WIM. </td></tr>
864     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for <em>src_image</em> in <em>src_wim</em> is invalid. </td></tr>
865     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>src_image</em> does not exist in <em>src_wim</em>. </td></tr>
866     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a></td><td><a class="el" href="wimlib_8h.html#ab3845f7a365ff9a07f74e1b812d91eaf" title="See documentation for wimlib_export_image().">WIMLIB_EXPORT_FLAG_BOOT</a> was specified in <em>flags</em>, <em>src_image</em> was <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>, <em>src_wim</em> contains multiple images, and no images in <em>src_wim</em> are marked as bootable; or <em>dest_name</em> and/or <em>dest_description</em> were non-<code>NULL</code>, <em>src_image</em> was <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>, and <em>src_wim</em> contains multiple images. </td></tr>
867     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for <em>src_image</em> in <em>src_wim</em> is invalid. </td></tr>
868     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
869     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>Could not read the metadata resource for <em>src_image</em> from <em>src_wim</em>. </td></tr>
870   </table>
871   </dd>
872 </dl>
873
874 </div>
875 </div>
876 <a class="anchor" id="a6a681ff211ec60f05a6ac5f743b17f65"></a>
877 <div class="memitem">
878 <div class="memproto">
879       <table class="memname">
880         <tr>
881           <td class="memname">int <a class="el" href="wimlib_8h.html#a6a681ff211ec60f05a6ac5f743b17f65">wimlib_extract_image</a> </td>
882           <td>(</td>
883           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
884           <td class="paramname"><em>wim</em>, </td>
885         </tr>
886         <tr>
887           <td class="paramkey"></td>
888           <td></td>
889           <td class="paramtype">int&#160;</td>
890           <td class="paramname"><em>image</em>&#160;</td>
891         </tr>
892         <tr>
893           <td></td>
894           <td>)</td>
895           <td></td><td></td>
896         </tr>
897       </table>
898 </div>
899 <div class="memdoc">
900
901 <p>Extracts an image, or all images, from a WIM file. </p>
902 <p>The output directory must have been previously set with <a class="el" href="wimlib_8h.html#ab2a5fd17df52da1517835a05ee9b4965" title="Sets and creates the directory to which files are to be extracted when extracting files from the WIM...">wimlib_set_output_dir()</a>.</p>
903 <p>The link type used for extracted files is that specified by a previous call to <a class="el" href="wimlib_8h.html#a61ebe33de7cce54fdeb70b80d8bcaf7c" title="Sets the link type to use when extracting files from a WIM.">wimlib_set_link_type()</a>, or <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590" title="Do not create links when extracting identical files from the WIM (default).">WIM_LINK_TYPE_NONE</a> by default.</p>
904 <dl class="params"><dt><b>Parameters:</b></dt><dd>
905   <table class="params">
906     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
907     <tr><td class="paramname">image</td><td>The image to extract. Can be the number of an image, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to specify that all images are to be extracted.</td></tr>
908   </table>
909   </dd>
910 </dl>
911 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
912 <dl class="retval"><dt><b>Return values:</b></dt><dd>
913   <table class="retval">
914     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>Could not decompress a resource (file or metadata) for <em>image</em> in <em>wim</em>. </td></tr>
915     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for <em>image</em> in <em>wim</em> is invalid. </td></tr>
916     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>A resource (file or metadata) for <em>image</em> in <em>wim</em> is invalid. </td></tr>
917     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab0834a780138563bbe1abb596ef744de">WIMLIB_ERR_LINK</a></td><td>Failed to create a symbolic link or a hard link. </td></tr>
918     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f7333fcfe6e6da478bd03e8e11f3674">WIMLIB_ERR_MKDIR</a></td><td>Failed create a needed directory. </td></tr>
919     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
920     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ac12f8ffc5380e07bb8db74ae59a6c367">WIMLIB_ERR_NOTDIR</a></td><td><a class="el" href="wimlib_8h.html#ab2a5fd17df52da1517835a05ee9b4965" title="Sets and creates the directory to which files are to be extracted when extracting files from the WIM...">wimlib_set_output_dir()</a> has not been successfully called on <em>wim</em>. </td></tr>
921     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>Could not open one of the files being extracted for writing. </td></tr>
922     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>A unexpected end-of-file or read error occurred when trying to read data from the WIM file associated with <em>wim</em>. </td></tr>
923     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879">WIMLIB_ERR_WRITE</a></td><td>Failed to write a file being extracted. </td></tr>
924   </table>
925   </dd>
926 </dl>
927
928 </div>
929 </div>
930 <a class="anchor" id="a63ae979394ba582d7c3a4e0132f209c7"></a>
931 <div class="memitem">
932 <div class="memproto">
933       <table class="memname">
934         <tr>
935           <td class="memname">int <a class="el" href="wimlib_8h.html#a63ae979394ba582d7c3a4e0132f209c7">wimlib_extract_xml_data</a> </td>
936           <td>(</td>
937           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
938           <td class="paramname"><em>wim</em>, </td>
939         </tr>
940         <tr>
941           <td class="paramkey"></td>
942           <td></td>
943           <td class="paramtype">FILE *&#160;</td>
944           <td class="paramname"><em>fp</em>&#160;</td>
945         </tr>
946         <tr>
947           <td></td>
948           <td>)</td>
949           <td></td><td></td>
950         </tr>
951       </table>
952 </div>
953 <div class="memdoc">
954
955 <p>Extracts the XML data for a WIM file to a file stream. </p>
956 <p>Every WIM file includes a string of XML that describes the images contained in the WIM.</p>
957 <dl class="params"><dt><b>Parameters:</b></dt><dd>
958   <table class="params">
959     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
960     <tr><td class="paramname">fp</td><td><code>stdout</code>, or a FILE* opened for writing, to extract the data to.</td></tr>
961   </table>
962   </dd>
963 </dl>
964 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
965 <dl class="retval"><dt><b>Return values:</b></dt><dd>
966   <table class="retval">
967     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879">WIMLIB_ERR_WRITE</a></td><td>Failed to completely write the XML data to <em>fp</em>. </td></tr>
968   </table>
969   </dd>
970 </dl>
971
972 </div>
973 </div>
974 <a class="anchor" id="a36a722a1651ff46b2f5a11a445c6fd73"></a>
975 <div class="memitem">
976 <div class="memproto">
977       <table class="memname">
978         <tr>
979           <td class="memname">void <a class="el" href="wimlib_8h.html#a36a722a1651ff46b2f5a11a445c6fd73">wimlib_free</a> </td>
980           <td>(</td>
981           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
982           <td class="paramname"><em>wim</em></td><td>)</td>
983           <td></td>
984         </tr>
985       </table>
986 </div>
987 <div class="memdoc">
988
989 <p>Frees all memory allocated for a WIMStruct and closes all files associated with it. </p>
990 <dl class="params"><dt><b>Parameters:</b></dt><dd>
991   <table class="params">
992     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
993   </table>
994   </dd>
995 </dl>
996 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
997
998 </div>
999 </div>
1000 <a class="anchor" id="ae4cd7e230f7c76b98f9505b5858ab8b1"></a>
1001 <div class="memitem">
1002 <div class="memproto">
1003       <table class="memname">
1004         <tr>
1005           <td class="memname">int <a class="el" href="wimlib_8h.html#ae4cd7e230f7c76b98f9505b5858ab8b1">wimlib_get_boot_idx</a> </td>
1006           <td>(</td>
1007           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1008           <td class="paramname"><em>wim</em></td><td>)</td>
1009           <td></td>
1010         </tr>
1011       </table>
1012 </div>
1013 <div class="memdoc">
1014
1015 <p>Finds which image in a WIM is bootable. </p>
1016 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1017   <table class="params">
1018     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
1019   </table>
1020   </dd>
1021 </dl>
1022 <dl class="section return"><dt>Returns:</dt><dd>0 if no image is marked as bootable, or the number of the image marked as bootable (numbered starting at 1). </dd></dl>
1023
1024 </div>
1025 </div>
1026 <a class="anchor" id="a0ed735afc24bd8ee0aad106066f27df0"></a>
1027 <div class="memitem">
1028 <div class="memproto">
1029       <table class="memname">
1030         <tr>
1031           <td class="memname">int <a class="el" href="wimlib_8h.html#a0ed735afc24bd8ee0aad106066f27df0">wimlib_get_compression_type</a> </td>
1032           <td>(</td>
1033           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1034           <td class="paramname"><em>wim</em></td><td>)</td>
1035           <td></td>
1036         </tr>
1037       </table>
1038 </div>
1039 <div class="memdoc">
1040
1041 <p>Gets the compression type used in the WIM. </p>
1042 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1043   <table class="params">
1044     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file</td></tr>
1045   </table>
1046   </dd>
1047 </dl>
1048 <dl class="section return"><dt>Returns:</dt><dd><a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d" title="The WIM does not include any compressed resources.">WIM_COMPRESSION_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1" title="Compressed resources in the WIM use LZX compression.">WIM_COMPRESSION_TYPE_LZX</a>, or <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b" title="Compressed resources in the WIM use XPRESS compression.">WIM_COMPRESSION_TYPE_XPRESS</a>. </dd></dl>
1049
1050 </div>
1051 </div>
1052 <a class="anchor" id="a8f883a95dd091f4566eeb2a097542bc9"></a>
1053 <div class="memitem">
1054 <div class="memproto">
1055       <table class="memname">
1056         <tr>
1057           <td class="memname">const char* <a class="el" href="wimlib_8h.html#a8f883a95dd091f4566eeb2a097542bc9">wimlib_get_compression_type_string</a> </td>
1058           <td>(</td>
1059           <td class="paramtype">int&#160;</td>
1060           <td class="paramname"><em>ctype</em></td><td>)</td>
1061           <td></td>
1062         </tr>
1063       </table>
1064 </div>
1065 <div class="memdoc">
1066
1067 <p>Converts a compression type enumeration value into a string. </p>
1068 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1069   <table class="params">
1070     <tr><td class="paramname">ctype</td><td><a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a40a80e7cd4eab161fa83a992c7e7f18d" title="The WIM does not include any compressed resources.">WIM_COMPRESSION_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3ab9005cbbca106cae485fe8c933d8fcd1" title="Compressed resources in the WIM use LZX compression.">WIM_COMPRESSION_TYPE_LZX</a>, <a class="el" href="wimlib_8h.html#a918227f354c41d79fe04227ef4236dc3a402be8692b2d8f80b3948bec5717865b" title="Compressed resources in the WIM use XPRESS compression.">WIM_COMPRESSION_TYPE_XPRESS</a>, or another value.</td></tr>
1071   </table>
1072   </dd>
1073 </dl>
1074 <dl class="section return"><dt>Returns:</dt><dd>A statically allocated string: "None", "LZX", "XPRESS", or "Invalid", respectively. </dd></dl>
1075
1076 </div>
1077 </div>
1078 <a class="anchor" id="a4cad466851acb2f24ba4af35b27003b7"></a>
1079 <div class="memitem">
1080 <div class="memproto">
1081       <table class="memname">
1082         <tr>
1083           <td class="memname">const char* <a class="el" href="wimlib_8h.html#a4cad466851acb2f24ba4af35b27003b7">wimlib_get_error_string</a> </td>
1084           <td>(</td>
1085           <td class="paramtype">enum <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3">wimlib_error_code</a>&#160;</td>
1086           <td class="paramname"><em>code</em></td><td>)</td>
1087           <td></td>
1088         </tr>
1089       </table>
1090 </div>
1091 <div class="memdoc">
1092
1093 <p>Converts an error code into a string describing it. </p>
1094 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1095   <table class="params">
1096     <tr><td class="paramname">code</td><td>The error code returned by one of wimlib's functions.</td></tr>
1097   </table>
1098   </dd>
1099 </dl>
1100 <dl class="section return"><dt>Returns:</dt><dd>Pointer to a statically allocated string describing the error code, or <code>NULL</code> if the error code is not valid. </dd></dl>
1101
1102 </div>
1103 </div>
1104 <a class="anchor" id="a6ce758e0a3842cd8cde827f29dce539a"></a>
1105 <div class="memitem">
1106 <div class="memproto">
1107       <table class="memname">
1108         <tr>
1109           <td class="memname">const char* <a class="el" href="wimlib_8h.html#a6ce758e0a3842cd8cde827f29dce539a">wimlib_get_image_description</a> </td>
1110           <td>(</td>
1111           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1112           <td class="paramname"><em>wim</em>, </td>
1113         </tr>
1114         <tr>
1115           <td class="paramkey"></td>
1116           <td></td>
1117           <td class="paramtype">int&#160;</td>
1118           <td class="paramname"><em>image</em>&#160;</td>
1119         </tr>
1120         <tr>
1121           <td></td>
1122           <td>)</td>
1123           <td></td><td></td>
1124         </tr>
1125       </table>
1126 </div>
1127 <div class="memdoc">
1128
1129 <p>Returns the description of the specified image. </p>
1130 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1131   <table class="params">
1132     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1133     <tr><td class="paramname">image</td><td>The number of the image, numbered starting at 1.</td></tr>
1134   </table>
1135   </dd>
1136 </dl>
1137 <dl class="section return"><dt>Returns:</dt><dd>The description of the image, or <code>NULL</code> if there is no such image, or <code>NULL</code> if the specified image has no description. </dd></dl>
1138
1139 </div>
1140 </div>
1141 <a class="anchor" id="a43aae473e66cb05a502fee8f59e95953"></a>
1142 <div class="memitem">
1143 <div class="memproto">
1144       <table class="memname">
1145         <tr>
1146           <td class="memname">const char* <a class="el" href="wimlib_8h.html#a43aae473e66cb05a502fee8f59e95953">wimlib_get_image_name</a> </td>
1147           <td>(</td>
1148           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1149           <td class="paramname"><em>wim</em>, </td>
1150         </tr>
1151         <tr>
1152           <td class="paramkey"></td>
1153           <td></td>
1154           <td class="paramtype">int&#160;</td>
1155           <td class="paramname"><em>image</em>&#160;</td>
1156         </tr>
1157         <tr>
1158           <td></td>
1159           <td>)</td>
1160           <td></td><td></td>
1161         </tr>
1162       </table>
1163 </div>
1164 <div class="memdoc">
1165
1166 <p>Returns the name of the specified image. </p>
1167 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1168   <table class="params">
1169     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1170     <tr><td class="paramname">image</td><td>The number of the image, numbered starting at 1.</td></tr>
1171   </table>
1172   </dd>
1173 </dl>
1174 <dl class="section return"><dt>Returns:</dt><dd>The name of the image, or <code>NULL</code> if there is no such image. </dd></dl>
1175
1176 </div>
1177 </div>
1178 <a class="anchor" id="a9438157c8b2f3576c52bd82b2a873c33"></a>
1179 <div class="memitem">
1180 <div class="memproto">
1181       <table class="memname">
1182         <tr>
1183           <td class="memname">int <a class="el" href="wimlib_8h.html#a9438157c8b2f3576c52bd82b2a873c33">wimlib_get_num_images</a> </td>
1184           <td>(</td>
1185           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1186           <td class="paramname"><em>wim</em></td><td>)</td>
1187           <td></td>
1188         </tr>
1189       </table>
1190 </div>
1191 <div class="memdoc">
1192
1193 <p>Gets the number of images contained in the WIM. </p>
1194 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1195   <table class="params">
1196     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
1197   </table>
1198   </dd>
1199 </dl>
1200 <dl class="section return"><dt>Returns:</dt><dd>The number of images contained in the WIM file. </dd></dl>
1201
1202 </div>
1203 </div>
1204 <a class="anchor" id="a56fb949c6316fe44263074eda41b1e9e"></a>
1205 <div class="memitem">
1206 <div class="memproto">
1207       <table class="memname">
1208         <tr>
1209           <td class="memname">bool <a class="el" href="wimlib_8h.html#a56fb949c6316fe44263074eda41b1e9e">wimlib_has_integrity_table</a> </td>
1210           <td>(</td>
1211           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1212           <td class="paramname"><em>wim</em></td><td>)</td>
1213           <td></td>
1214         </tr>
1215       </table>
1216 </div>
1217 <div class="memdoc">
1218
1219 <p>Returns true if the WIM has an integrity table. </p>
1220 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1221   <table class="params">
1222     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1223   </table>
1224   </dd>
1225 </dl>
1226 <dl class="section return"><dt>Returns:</dt><dd><code>true</code> if the WIM has an integrity table; false otherwise. </dd></dl>
1227
1228 </div>
1229 </div>
1230 <a class="anchor" id="af7122e05c58edd9091a3fa89b044957c"></a>
1231 <div class="memitem">
1232 <div class="memproto">
1233       <table class="memname">
1234         <tr>
1235           <td class="memname">bool <a class="el" href="wimlib_8h.html#af7122e05c58edd9091a3fa89b044957c">wimlib_image_name_in_use</a> </td>
1236           <td>(</td>
1237           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1238           <td class="paramname"><em>wim</em>, </td>
1239         </tr>
1240         <tr>
1241           <td class="paramkey"></td>
1242           <td></td>
1243           <td class="paramtype">const char *&#160;</td>
1244           <td class="paramname"><em>name</em>&#160;</td>
1245         </tr>
1246         <tr>
1247           <td></td>
1248           <td>)</td>
1249           <td></td><td></td>
1250         </tr>
1251       </table>
1252 </div>
1253 <div class="memdoc">
1254
1255 <p>Determines if an image name is already used by some image in the WIM. </p>
1256 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1257   <table class="params">
1258     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1259     <tr><td class="paramname">name</td><td>The name to check.</td></tr>
1260   </table>
1261   </dd>
1262 </dl>
1263 <dl class="section return"><dt>Returns:</dt><dd><code>true</code> if there is already an image in <em>wim</em> named <em>name</em>; <code>false</code> if there is no image named <em>name</em> in <em>wim</em>. </dd></dl>
1264
1265 </div>
1266 </div>
1267 <a class="anchor" id="aa6c0a2c2b896530718bd23e433b07e46"></a>
1268 <div class="memitem">
1269 <div class="memproto">
1270       <table class="memname">
1271         <tr>
1272           <td class="memname">int <a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46">wimlib_mount</a> </td>
1273           <td>(</td>
1274           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1275           <td class="paramname"><em>wim</em>, </td>
1276         </tr>
1277         <tr>
1278           <td class="paramkey"></td>
1279           <td></td>
1280           <td class="paramtype">int&#160;</td>
1281           <td class="paramname"><em>image</em>, </td>
1282         </tr>
1283         <tr>
1284           <td class="paramkey"></td>
1285           <td></td>
1286           <td class="paramtype">const char *&#160;</td>
1287           <td class="paramname"><em>dir</em>, </td>
1288         </tr>
1289         <tr>
1290           <td class="paramkey"></td>
1291           <td></td>
1292           <td class="paramtype">int&#160;</td>
1293           <td class="paramname"><em>flags</em>&#160;</td>
1294         </tr>
1295         <tr>
1296           <td></td>
1297           <td>)</td>
1298           <td></td><td></td>
1299         </tr>
1300       </table>
1301 </div>
1302 <div class="memdoc">
1303
1304 <p>Mounts an image in a WIM file on a directory read-only or read-write. </p>
1305 <p>A daemon will be forked to service the filesystem.</p>
1306 <p>If the mount is read-write, modifications to the WIM are staged in a staging directory.</p>
1307 <p><a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46" title="Mounts an image in a WIM file on a directory read-only or read-write.">wimlib_mount()</a> currently cannot be used with multiple <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a>'s without intervening <a class="el" href="wimlib_8h.html#a2e0ba93652ac9372b56f9a67e3dbf1a1" title="Unmounts a WIM image that was mounted using wimlib_mount().">wimlib_unmount()</a>s. If there was a way to have libfuse pass a pointer to user data to each FUSE callback, then this would be possible, but there doesn't seem to be a way to do this currently.</p>
1308 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1309   <table class="params">
1310     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file to be mounted. </td></tr>
1311     <tr><td class="paramname">image</td><td>The number of the image to mount, numbered from 1. It must be an existing, single image. </td></tr>
1312     <tr><td class="paramname">dir</td><td>The path to an existing directory to mount the image on. </td></tr>
1313     <tr><td class="paramname">flags</td><td>Bitwise OR of the flags <a class="el" href="wimlib_8h.html#a2e4cb1e44b40191234889705e3680622" title="Mount the WIM read-write.">WIMLIB_MOUNT_FLAG_READWRITE</a> or <a class="el" href="wimlib_8h.html#a8b1f4c3c91727e1c77130ad4970eb4fe" title="For debugging only.">WIMLIB_MOUNT_FLAG_DEBUG</a>. If <a class="el" href="wimlib_8h.html#a2e4cb1e44b40191234889705e3680622" title="Mount the WIM read-write.">WIMLIB_MOUNT_FLAG_READWRITE</a> is not given, the WIM is mounted read-only.</td></tr>
1314   </table>
1315   </dd>
1316 </dl>
1317 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1318 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1319   <table class="retval">
1320     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>Could not decompress the metadata resource for <em>image</em> in <em>wim</em>. </td></tr>
1321     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f9ce102f70c7eb8413ca9e2e1e68e5c">WIMLIB_ERR_FUSE</a></td><td>A non-zero status was returned by <code>fuse_main()</code>. </td></tr>
1322     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for <em>image</em> in <em>wim</em> is invalid. </td></tr>
1323     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify an existing, single image in <em>wim</em>. </td></tr>
1324     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for <em>image</em> in <em>wim</em> is invalid. </td></tr>
1325     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f7333fcfe6e6da478bd03e8e11f3674">WIMLIB_ERR_MKDIR</a></td><td><a class="el" href="wimlib_8h.html#a2e4cb1e44b40191234889705e3680622" title="Mount the WIM read-write.">WIMLIB_MOUNT_FLAG_READWRITE</a> was specified in <em>flags</em>, but the staging directory could not be created. </td></tr>
1326     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
1327     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ac12f8ffc5380e07bb8db74ae59a6c367">WIMLIB_ERR_NOTDIR</a></td><td>Could not determine the current working directory. </td></tr>
1328     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>An unexpected end-of-file or read error occurred when trying to read data from the WIM file associated with <em>wim</em>. </td></tr>
1329   </table>
1330   </dd>
1331 </dl>
1332
1333 </div>
1334 </div>
1335 <a class="anchor" id="a16e1b87c7ab9eeadc0523a2477bfb0f6"></a>
1336 <div class="memitem">
1337 <div class="memproto">
1338       <table class="memname">
1339         <tr>
1340           <td class="memname">int <a class="el" href="wimlib_8h.html#a16e1b87c7ab9eeadc0523a2477bfb0f6">wimlib_open_wim</a> </td>
1341           <td>(</td>
1342           <td class="paramtype">const char *&#160;</td>
1343           <td class="paramname"><em>wim_file</em>, </td>
1344         </tr>
1345         <tr>
1346           <td class="paramkey"></td>
1347           <td></td>
1348           <td class="paramtype">int&#160;</td>
1349           <td class="paramname"><em>flags</em>, </td>
1350         </tr>
1351         <tr>
1352           <td class="paramkey"></td>
1353           <td></td>
1354           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> **&#160;</td>
1355           <td class="paramname"><em>wim_ret</em>&#160;</td>
1356         </tr>
1357         <tr>
1358           <td></td>
1359           <td>)</td>
1360           <td></td><td></td>
1361         </tr>
1362       </table>
1363 </div>
1364 <div class="memdoc">
1365
1366 <p>Opens a WIM file and creates a <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for it. </p>
1367 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1368   <table class="params">
1369     <tr><td class="paramname">wim_file</td><td>The path to the WIM file to open. </td></tr>
1370     <tr><td class="paramname">flags</td><td>Bitwise OR of <a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f" title="Verify the integrity of the WIM if an integrity table is present.">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a> and/or <a class="el" href="wimlib_8h.html#ab0f497006447480fc69cf0d0b1846be7" title="Print progress information when verifying integrity table.">WIMLIB_OPEN_FLAG_SHOW_PROGRESS</a>. If <a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f" title="Verify the integrity of the WIM if an integrity table is present.">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a> is given, the integrity table of the WIM, if it exists, is checked, and the function will fail with an <a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae09c379ce896a926c198382b5abd146c">WIMLIB_ERR_INTEGRITY</a> status if any of the computed SHA1 message digests of the WIM do not exactly match the corresponding message digests given in the integrity table. If <a class="el" href="wimlib_8h.html#ab0f497006447480fc69cf0d0b1846be7" title="Print progress information when verifying integrity table.">WIMLIB_OPEN_FLAG_SHOW_PROGRESS</a> is given, progress information will be shown if the integrity of the WIM is checked.</td></tr>
1371     <tr><td class="paramname">wim_ret</td><td>On success, a pointer to an opaque <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the opened WIM file is written to the memory location pointed to by this parameter. The <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> must be freed using using FREE() when finished with it.</td></tr>
1372   </table>
1373   </dd>
1374 </dl>
1375 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1376 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1377   <table class="retval">
1378     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3afc905e18a1006ec4b6dc9f50545347e6">WIMLIB_ERR_COMPRESSED_LOOKUP_TABLE</a></td><td>The lookup table of <em>wim_file</em> is compressed. Support for this can be added to wimlib if needed, but it appears to be the case that the lookup table is never compressed. </td></tr>
1379     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab39d4d9d0164721e9d9b1ebe76fa1af4">WIMLIB_ERR_IMAGE_COUNT</a></td><td>The number of metadata resources found in the WIM did not match the image count given in the WIM header, or the number of &lt;IMAGE&gt; elements in the XML data for the WIM did not match the image count given in the WIM header. </td></tr>
1380     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae09c379ce896a926c198382b5abd146c">WIMLIB_ERR_INTEGRITY</a></td><td><a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f" title="Verify the integrity of the WIM if an integrity table is present.">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a> was specified in <em>flags</em> and <em>wim_file</em> contains an integrity table, but the SHA1 message digest for a chunk of the WIM does not match the corresponding message digest given in the integrity table. </td></tr>
1381     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ab00472ac204ded42b9281674c88df470">WIMLIB_ERR_INVALID_CHUNK_SIZE</a></td><td>Resources in <em>wim_file</em> are compressed, but the chunk size is not 32768. </td></tr>
1382     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae986e4bb4242d5b504431dd3afe230f3">WIMLIB_ERR_INVALID_COMPRESSION_TYPE</a></td><td>The header of <em>wim_file</em> says that resources in the WIM are compressed, but the header flag indicating LZX or XPRESS compression is not set. </td></tr>
1383     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3abf075122c97df6c119f68ec2ff3f23ef">WIMLIB_ERR_INVALID_HEADER_SIZE</a></td><td>The length field of the WIM header is not 208. </td></tr>
1384     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a27059fce595541a9317064c53f7a795b">WIMLIB_ERR_INVALID_INTEGRITY_TABLE</a></td><td><a class="el" href="wimlib_8h.html#a5e75328028ae5154a5e84ba666eb024f" title="Verify the integrity of the WIM if an integrity table is present.">WIMLIB_OPEN_FLAG_CHECK_INTEGRITY</a> was specified in <em>flags</em> and <em>wim_file</em> contains an integrity table, but the integrity table is invalid. </td></tr>
1385     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocated needed memory. </td></tr>
1386     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5c913db1f7317bfdf6ba5a8bc0a50df3">WIMLIB_ERR_NOT_A_WIM_FILE</a></td><td><em>wim_file</em> does not begin with the expected magic characters. </td></tr>
1387     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>Failed to open the file <em>wim_file</em> for reading. </td></tr>
1388     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>An unexpected end-of-file or read error occurred when trying to read data from <em>wim_file</em>. </td></tr>
1389     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a25572961411c800d61c9fe7afaf99257">WIMLIB_ERR_SPLIT</a></td><td><em>wim_file</em> is a split WIM. wimlib does not support this kind of WIM. </td></tr>
1390     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7a8347db84e4b9656cef81ee16da25fe">WIMLIB_ERR_UNKNOWN_VERSION</a></td><td>A number other than 0x10d00 is written in the version field of the WIM header of <em>wim_file</em>. </td></tr>
1391     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a19a89e814cdebed5629332de6b26d5a6">WIMLIB_ERR_XML</a></td><td>The XML data for <em>wim_file</em> is invalid. </td></tr>
1392   </table>
1393   </dd>
1394 </dl>
1395
1396 </div>
1397 </div>
1398 <a class="anchor" id="ab8648f8386379f2b2930b877e4efd6ca"></a>
1399 <div class="memitem">
1400 <div class="memproto">
1401       <table class="memname">
1402         <tr>
1403           <td class="memname">int <a class="el" href="wimlib_8h.html#ab8648f8386379f2b2930b877e4efd6ca">wimlib_overwrite</a> </td>
1404           <td>(</td>
1405           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1406           <td class="paramname"><em>wim</em>, </td>
1407         </tr>
1408         <tr>
1409           <td class="paramkey"></td>
1410           <td></td>
1411           <td class="paramtype">int&#160;</td>
1412           <td class="paramname"><em>flags</em>&#160;</td>
1413         </tr>
1414         <tr>
1415           <td></td>
1416           <td>)</td>
1417           <td></td><td></td>
1418         </tr>
1419       </table>
1420 </div>
1421 <div class="memdoc">
1422
1423 <p>Overwrites the file that the WIM was originally read from, with changes made. </p>
1424 <p>The new WIM is written to a temporary file and then renamed to the original file after it is has been completely written. The temporary file currently is made in the same directory as the original WIM file.</p>
1425 <p>Note that it is not possible for this function to delete the original file before having written the new file because it is very likely that file resources in the new WIM file need to be retrieved from the old WIM file.</p>
1426 <p>After this function returns, <em>wim</em> must be freed using FREE(). Any further actions on <em>wim</em> before doing this are undefined.</p>
1427 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1428   <table class="params">
1429     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file to write. There may have been in-memory changes made to it, which are then reflected in the output file. </td></tr>
1430     <tr><td class="paramname">flags</td><td>Bitwise OR of <a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef" title="Include an integrity table in the new WIM file.">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a> and/or <a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc" title="Print progress information when writing the integrity table.">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a>.</td></tr>
1431   </table>
1432   </dd>
1433 </dl>
1434 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. This function may return any value returned by <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a> as well as the following error codes: </dd></dl>
1435 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1436   <table class="retval">
1437     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5f054f1a9c88f225dd2b34d188c773fa">WIMLIB_ERR_NO_FILENAME</a></td><td><em>wim</em> corresponds to a WIM created with <a class="el" href="wimlib_8h.html#a75acbea33e2faf398d58865fb764b91e" title="Creates a WIMStruct for a new WIM file.">wimlib_create_new_wim()</a> rather than a WIM read with <a class="el" href="wimlib_8h.html#a16e1b87c7ab9eeadc0523a2477bfb0f6" title="Opens a WIM file and creates a WIMStruct for it.">wimlib_open_wim()</a>. </td></tr>
1438     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5a04d4829ff13a775dc70bc456fc1b85">WIMLIB_ERR_RENAME</a></td><td>The temporary file that the WIM was written to could not be renamed to the original filename of <em>wim</em>. </td></tr>
1439   </table>
1440   </dd>
1441 </dl>
1442
1443 </div>
1444 </div>
1445 <a class="anchor" id="aec658496a01b1ca9dfd97eb9b9a92bb8"></a>
1446 <div class="memitem">
1447 <div class="memproto">
1448       <table class="memname">
1449         <tr>
1450           <td class="memname">int <a class="el" href="wimlib_8h.html#aec658496a01b1ca9dfd97eb9b9a92bb8">wimlib_overwrite_xml_and_header</a> </td>
1451           <td>(</td>
1452           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1453           <td class="paramname"><em>wim</em>, </td>
1454         </tr>
1455         <tr>
1456           <td class="paramkey"></td>
1457           <td></td>
1458           <td class="paramtype">int&#160;</td>
1459           <td class="paramname"><em>flags</em>&#160;</td>
1460         </tr>
1461         <tr>
1462           <td></td>
1463           <td>)</td>
1464           <td></td><td></td>
1465         </tr>
1466       </table>
1467 </div>
1468 <div class="memdoc">
1469
1470 <p>Updates the header and XML data of the WIM file, without the need to write out the entire WIM to a temporary file as in <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e" title="Writes the WIM to a file.">wimlib_write()</a>. </p>
1471 <p>This function must only be used if no files, directories, or images have been added, removed, or changed in the WIM. It must be used when only the boot index or the name or description of image(s) has been changed.</p>
1472 <p>After this function returns, <em>wim</em> must be freed using FREE(). Any further actions on <em>wim</em> before doing this are undefined.</p>
1473 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1474   <table class="params">
1475     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file to overwrite. </td></tr>
1476     <tr><td class="paramname">flags</td><td>Bitwise OR of <a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef" title="Include an integrity table in the new WIM file.">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a> and/or <a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc" title="Print progress information when writing the integrity table.">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a>.</td></tr>
1477   </table>
1478   </dd>
1479 </dl>
1480 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error.</dd></dl>
1481 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1482   <table class="retval">
1483     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5f054f1a9c88f225dd2b34d188c773fa">WIMLIB_ERR_NO_FILENAME</a></td><td><em>wim</em> corresponds to a WIM created with <a class="el" href="wimlib_8h.html#a75acbea33e2faf398d58865fb764b91e" title="Creates a WIMStruct for a new WIM file.">wimlib_create_new_wim()</a> rather than a WIM read with <a class="el" href="wimlib_8h.html#a16e1b87c7ab9eeadc0523a2477bfb0f6" title="Opens a WIM file and creates a WIMStruct for it.">wimlib_open_wim()</a>. </td></tr>
1484     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
1485     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>The WIM file associated with <em>wim</em> could not be re-opened read-write. </td></tr>
1486     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td><a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef" title="Include an integrity table in the new WIM file.">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a> was specified in <em>flags</em>, but data from the WIM file associated with <em>wim</em> could not be read to compute the SHA1 message digests, or the old integrity table (if it existed) could not be read. </td></tr>
1487     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879">WIMLIB_ERR_WRITE</a></td><td>Failed to write the WIM header, the XML data, or the integrity table to the WIM file associated with <em>wim</em>. </td></tr>
1488   </table>
1489   </dd>
1490 </dl>
1491
1492 </div>
1493 </div>
1494 <a class="anchor" id="ac5e1163a26407030eb617d0e5aca7cc7"></a>
1495 <div class="memitem">
1496 <div class="memproto">
1497       <table class="memname">
1498         <tr>
1499           <td class="memname">void <a class="el" href="wimlib_8h.html#ac5e1163a26407030eb617d0e5aca7cc7">wimlib_print_available_images</a> </td>
1500           <td>(</td>
1501           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1502           <td class="paramname"><em>wim</em>, </td>
1503         </tr>
1504         <tr>
1505           <td class="paramkey"></td>
1506           <td></td>
1507           <td class="paramtype">int&#160;</td>
1508           <td class="paramname"><em>image</em>&#160;</td>
1509         </tr>
1510         <tr>
1511           <td></td>
1512           <td>)</td>
1513           <td></td><td></td>
1514         </tr>
1515       </table>
1516 </div>
1517 <div class="memdoc">
1518
1519 <p>Prints information about one image, or all images, contained in a WIM. </p>
1520 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1521   <table class="params">
1522     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1523     <tr><td class="paramname">image</td><td>The image about which to print information. Can be the number of an image, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to print information about all images in the WIM.</td></tr>
1524   </table>
1525   </dd>
1526 </dl>
1527 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
1528
1529 </div>
1530 </div>
1531 <a class="anchor" id="a1be7f226c22dbdf3a87c6d887ae34fb0"></a>
1532 <div class="memitem">
1533 <div class="memproto">
1534       <table class="memname">
1535         <tr>
1536           <td class="memname">int <a class="el" href="wimlib_8h.html#a1be7f226c22dbdf3a87c6d887ae34fb0">wimlib_print_files</a> </td>
1537           <td>(</td>
1538           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1539           <td class="paramname"><em>wim</em>, </td>
1540         </tr>
1541         <tr>
1542           <td class="paramkey"></td>
1543           <td></td>
1544           <td class="paramtype">int&#160;</td>
1545           <td class="paramname"><em>image</em>&#160;</td>
1546         </tr>
1547         <tr>
1548           <td></td>
1549           <td>)</td>
1550           <td></td><td></td>
1551         </tr>
1552       </table>
1553 </div>
1554 <div class="memdoc">
1555
1556 <p>Prints the full paths to all files contained in an image, or all images, in a WIM file. </p>
1557 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1558   <table class="params">
1559     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1560     <tr><td class="paramname">image</td><td>Which image to print files for. Can be the number of an image, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to print the files contained in all images.</td></tr>
1561   </table>
1562   </dd>
1563 </dl>
1564 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1565 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1566   <table class="retval">
1567     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>The metadata resource for one of the specified images could not be decompressed. </td></tr>
1568     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for one of the specified images is invaled. </td></tr>
1569     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify a valid image in <em>wim</em>, and is not <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>. </td></tr>
1570     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for one of the specified images is invalid. </td></tr>
1571     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
1572     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>An unexpected read error or end-of-file occurred when reading the metadata resource for one of the specified images. </td></tr>
1573   </table>
1574   </dd>
1575 </dl>
1576
1577 </div>
1578 </div>
1579 <a class="anchor" id="aaa13ab4498e560d947f77ab944fd0b9f"></a>
1580 <div class="memitem">
1581 <div class="memproto">
1582       <table class="memname">
1583         <tr>
1584           <td class="memname">void <a class="el" href="wimlib_8h.html#aaa13ab4498e560d947f77ab944fd0b9f">wimlib_print_header</a> </td>
1585           <td>(</td>
1586           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1587           <td class="paramname"><em>wim</em></td><td>)</td>
1588           <td></td>
1589         </tr>
1590       </table>
1591 </div>
1592 <div class="memdoc">
1593
1594 <p>Prints detailed information from the header of a WIM file. </p>
1595 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1596   <table class="params">
1597     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
1598   </table>
1599   </dd>
1600 </dl>
1601 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
1602
1603 </div>
1604 </div>
1605 <a class="anchor" id="aa6b855c5f6cf59498d1bf4f8da2fcc52"></a>
1606 <div class="memitem">
1607 <div class="memproto">
1608       <table class="memname">
1609         <tr>
1610           <td class="memname">void <a class="el" href="wimlib_8h.html#aa6b855c5f6cf59498d1bf4f8da2fcc52">wimlib_print_lookup_table</a> </td>
1611           <td>(</td>
1612           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1613           <td class="paramname"><em>wim</em></td><td>)</td>
1614           <td></td>
1615         </tr>
1616       </table>
1617 </div>
1618 <div class="memdoc">
1619
1620 <p>Prints the lookup table of a WIM file. </p>
1621 <p>The lookup table maps SHA1 message digests, as found in the directory entry tree in the WIM file, to file resources in the WIM file. This table includes one entry for each unique file in the WIM, so it can be quite long. There is only one lookup table per WIM.</p>
1622 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1623   <table class="params">
1624     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
1625   </table>
1626   </dd>
1627 </dl>
1628 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
1629
1630 </div>
1631 </div>
1632 <a class="anchor" id="a837aed1a79e6b3de82dc82ef14a1cc00"></a>
1633 <div class="memitem">
1634 <div class="memproto">
1635       <table class="memname">
1636         <tr>
1637           <td class="memname">int <a class="el" href="wimlib_8h.html#a837aed1a79e6b3de82dc82ef14a1cc00">wimlib_print_metadata</a> </td>
1638           <td>(</td>
1639           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1640           <td class="paramname"><em>wim</em>, </td>
1641         </tr>
1642         <tr>
1643           <td class="paramkey"></td>
1644           <td></td>
1645           <td class="paramtype">int&#160;</td>
1646           <td class="paramname"><em>image</em>&#160;</td>
1647         </tr>
1648         <tr>
1649           <td></td>
1650           <td>)</td>
1651           <td></td><td></td>
1652         </tr>
1653       </table>
1654 </div>
1655 <div class="memdoc">
1656
1657 <p>Prints the metadata of the specified image in a WIM file. </p>
1658 <p>The metadata consists of the security data as well as the directory entry tree, and each image has its own metadata.</p>
1659 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1660   <table class="params">
1661     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1662     <tr><td class="paramname">image</td><td>Which image to print the metadata for. Can be the number of an image, or <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to print the metadata for all images in the WIM.</td></tr>
1663   </table>
1664   </dd>
1665 </dl>
1666 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1667 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1668   <table class="retval">
1669     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>The metadata resource for one of the specified images could not be decompressed. </td></tr>
1670     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for one of the specified images is invaled. </td></tr>
1671     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify a valid image in <em>wim</em>, and is not <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>. </td></tr>
1672     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for one of the specified images is invalid. </td></tr>
1673     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
1674     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>An unexpected read error or end-of-file occurred when reading the metadata resource for one of the specified images. </td></tr>
1675   </table>
1676   </dd>
1677 </dl>
1678
1679 </div>
1680 </div>
1681 <a class="anchor" id="a22f2fdae09266e8a45a6418afeaee10f"></a>
1682 <div class="memitem">
1683 <div class="memproto">
1684       <table class="memname">
1685         <tr>
1686           <td class="memname">void <a class="el" href="wimlib_8h.html#a22f2fdae09266e8a45a6418afeaee10f">wimlib_print_wim_information</a> </td>
1687           <td>(</td>
1688           <td class="paramtype">const <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1689           <td class="paramname"><em>wim</em></td><td>)</td>
1690           <td></td>
1691         </tr>
1692       </table>
1693 </div>
1694 <div class="memdoc">
1695
1696 <p>Prints some basic information about a WIM file. </p>
1697 <p>All information printed by this function is also printed by <a class="el" href="wimlib_8h.html#aaa13ab4498e560d947f77ab944fd0b9f" title="Prints detailed information from the header of a WIM file.">wimlib_print_header()</a>, but <a class="el" href="wimlib_8h.html#a22f2fdae09266e8a45a6418afeaee10f" title="Prints some basic information about a WIM file.">wimlib_print_wim_information()</a> prints some of this information more concisely and in a more readable form.</p>
1698 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1699   <table class="params">
1700     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file.</td></tr>
1701   </table>
1702   </dd>
1703 </dl>
1704 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
1705
1706 </div>
1707 </div>
1708 <a class="anchor" id="a18e40a559010bdf64279268e1a8bab84"></a>
1709 <div class="memitem">
1710 <div class="memproto">
1711       <table class="memname">
1712         <tr>
1713           <td class="memname">int <a class="el" href="wimlib_8h.html#a18e40a559010bdf64279268e1a8bab84">wimlib_resolve_image</a> </td>
1714           <td>(</td>
1715           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1716           <td class="paramname"><em>wim</em>, </td>
1717         </tr>
1718         <tr>
1719           <td class="paramkey"></td>
1720           <td></td>
1721           <td class="paramtype">const char *&#160;</td>
1722           <td class="paramname"><em>image_name_or_num</em>&#160;</td>
1723         </tr>
1724         <tr>
1725           <td></td>
1726           <td>)</td>
1727           <td></td><td></td>
1728         </tr>
1729       </table>
1730 </div>
1731 <div class="memdoc">
1732
1733 <p>Translates a string specifying the name or number of an image in the WIM into the number of the image. </p>
1734 <p>The images are numbered starting at 1.</p>
1735 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1736   <table class="params">
1737     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1738     <tr><td class="paramname">image_name_or_num</td><td>A string specifying which image. If it begins with a number, it is taken to be a string specifying the image number. Otherwise, it is taken to be the name of an image, as specified in the XML data for the WIM file. It also may be the keyword "all", which will resolve to <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>.</td></tr>
1739   </table>
1740   </dd>
1741 </dl>
1742 <dl class="section return"><dt>Returns:</dt><dd>If the string resolved to a single existing image, the number of that image, counting starting at 1, is returned. If the keyword "all" was specified, <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> is returned. Otherwise, <a class="el" href="wimlib_8h.html#ad69901bf7b1e99e40366ef14c4a1940b" title="Used to indicate that no WIM image is currently selected.">WIM_NO_IMAGE</a> is returned. </dd></dl>
1743
1744 </div>
1745 </div>
1746 <a class="anchor" id="ae93da6be8e7ca228ef788a486d3a3c90"></a>
1747 <div class="memitem">
1748 <div class="memproto">
1749       <table class="memname">
1750         <tr>
1751           <td class="memname">int <a class="el" href="wimlib_8h.html#ae93da6be8e7ca228ef788a486d3a3c90">wimlib_set_boot_idx</a> </td>
1752           <td>(</td>
1753           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1754           <td class="paramname"><em>wim</em>, </td>
1755         </tr>
1756         <tr>
1757           <td class="paramkey"></td>
1758           <td></td>
1759           <td class="paramtype">int&#160;</td>
1760           <td class="paramname"><em>boot_idx</em>&#160;</td>
1761         </tr>
1762         <tr>
1763           <td></td>
1764           <td>)</td>
1765           <td></td><td></td>
1766         </tr>
1767       </table>
1768 </div>
1769 <div class="memdoc">
1770
1771 <p>Sets which image in the WIM is marked as bootable. </p>
1772 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1773   <table class="params">
1774     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1775     <tr><td class="paramname">boot_idx</td><td>The number of the image to mark as bootable, or 0 to mark no image as bootable. </td></tr>
1776   </table>
1777   </dd>
1778 </dl>
1779 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1780 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1781   <table class="retval">
1782     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>boot_idx</em> does not specify an existing image in <em>wim</em>, and it was not 0. </td></tr>
1783   </table>
1784   </dd>
1785 </dl>
1786
1787 </div>
1788 </div>
1789 <a class="anchor" id="a537d600a9f1e36413cb6566260944187"></a>
1790 <div class="memitem">
1791 <div class="memproto">
1792       <table class="memname">
1793         <tr>
1794           <td class="memname">int <a class="el" href="wimlib_8h.html#a537d600a9f1e36413cb6566260944187">wimlib_set_image_descripton</a> </td>
1795           <td>(</td>
1796           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1797           <td class="paramname"><em>wim</em>, </td>
1798         </tr>
1799         <tr>
1800           <td class="paramkey"></td>
1801           <td></td>
1802           <td class="paramtype">int&#160;</td>
1803           <td class="paramname"><em>image</em>, </td>
1804         </tr>
1805         <tr>
1806           <td class="paramkey"></td>
1807           <td></td>
1808           <td class="paramtype">const char *&#160;</td>
1809           <td class="paramname"><em>description</em>&#160;</td>
1810         </tr>
1811         <tr>
1812           <td></td>
1813           <td>)</td>
1814           <td></td><td></td>
1815         </tr>
1816       </table>
1817 </div>
1818 <div class="memdoc">
1819
1820 <p>Changes the description of an image in the WIM. </p>
1821 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1822   <table class="params">
1823     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1824     <tr><td class="paramname">image</td><td>The number of the image for which to change the description. </td></tr>
1825     <tr><td class="paramname">description</td><td>The new description to give the image. It may be <code>NULL</code>, which indicates that the image is to be given no description.</td></tr>
1826   </table>
1827   </dd>
1828 </dl>
1829 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1830 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1831   <table class="retval">
1832     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify a single existing image in <em>wim</em>. </td></tr>
1833     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate the memory needed to duplicate the <em>description</em> string. </td></tr>
1834   </table>
1835   </dd>
1836 </dl>
1837
1838 </div>
1839 </div>
1840 <a class="anchor" id="a04cff2065ef690929b4fa1d1b91a9f91"></a>
1841 <div class="memitem">
1842 <div class="memproto">
1843       <table class="memname">
1844         <tr>
1845           <td class="memname">int <a class="el" href="wimlib_8h.html#a04cff2065ef690929b4fa1d1b91a9f91">wimlib_set_image_name</a> </td>
1846           <td>(</td>
1847           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1848           <td class="paramname"><em>wim</em>, </td>
1849         </tr>
1850         <tr>
1851           <td class="paramkey"></td>
1852           <td></td>
1853           <td class="paramtype">int&#160;</td>
1854           <td class="paramname"><em>image</em>, </td>
1855         </tr>
1856         <tr>
1857           <td class="paramkey"></td>
1858           <td></td>
1859           <td class="paramtype">const char *&#160;</td>
1860           <td class="paramname"><em>name</em>&#160;</td>
1861         </tr>
1862         <tr>
1863           <td></td>
1864           <td>)</td>
1865           <td></td><td></td>
1866         </tr>
1867       </table>
1868 </div>
1869 <div class="memdoc">
1870
1871 <p>Changes the name of an image in the WIM. </p>
1872 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1873   <table class="params">
1874     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. </td></tr>
1875     <tr><td class="paramname">image</td><td>The number of the image for which to change the name. </td></tr>
1876     <tr><td class="paramname">name</td><td>The new name to give the image. It must not be <code>NULL</code>.</td></tr>
1877   </table>
1878   </dd>
1879 </dl>
1880 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1881 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1882   <table class="retval">
1883     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a53622e3573c79fbd3415b22d686f0e32">WIMLIB_ERR_IMAGE_NAME_COLLISION</a></td><td>There is already an image named <em>name</em> in <em>wim</em>. </td></tr>
1884     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a></td><td><em>name</em> was <code>NULL</code> or the empty string. </td></tr>
1885     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify a single existing image in <em>wim</em>. </td></tr>
1886     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate the memory needed to duplicate the <em>name</em> string. </td></tr>
1887   </table>
1888   </dd>
1889 </dl>
1890
1891 </div>
1892 </div>
1893 <a class="anchor" id="a61ebe33de7cce54fdeb70b80d8bcaf7c"></a>
1894 <div class="memitem">
1895 <div class="memproto">
1896       <table class="memname">
1897         <tr>
1898           <td class="memname">int <a class="el" href="wimlib_8h.html#a61ebe33de7cce54fdeb70b80d8bcaf7c">wimlib_set_link_type</a> </td>
1899           <td>(</td>
1900           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1901           <td class="paramname"><em>wim</em>, </td>
1902         </tr>
1903         <tr>
1904           <td class="paramkey"></td>
1905           <td></td>
1906           <td class="paramtype">int&#160;</td>
1907           <td class="paramname"><em>link_type</em>&#160;</td>
1908         </tr>
1909         <tr>
1910           <td></td>
1911           <td>)</td>
1912           <td></td><td></td>
1913         </tr>
1914       </table>
1915 </div>
1916 <div class="memdoc">
1917
1918 <p>Sets the link type to use when extracting files from a WIM. </p>
1919 <p>This applies when extracting one image as well as when extracting all images. Cross-image links may save a lot of space because it is common for files to be referenced multiple times in WIM files. By default, the link type used for extraction is <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590" title="Do not create links when extracting identical files from the WIM (default).">WIM_LINK_TYPE_NONE</a>, meaning that links are not created.</p>
1920 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1921   <table class="params">
1922     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file </td></tr>
1923     <tr><td class="paramname">link_type</td><td><a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590" title="Do not create links when extracting identical files from the WIM (default).">WIM_LINK_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda46930507983a8f19967b4ce70096cbc4" title="Symbolic link identical files when extracting files from the WIM.">WIM_LINK_TYPE_SYMBOLIC</a>, or <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda92a57ffc9dd3ffe3c7ffe8a510248f6b" title="Hard link identical files when extracting files from the WIM.">WIM_LINK_TYPE_HARD</a>.</td></tr>
1924   </table>
1925   </dd>
1926 </dl>
1927 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1928 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1929   <table class="retval">
1930     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a></td><td><em>link_type</em> was not <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda3fc28562b4bad4e8440ad0ae64fe8590" title="Do not create links when extracting identical files from the WIM (default).">WIM_LINK_TYPE_NONE</a>, <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda46930507983a8f19967b4ce70096cbc4" title="Symbolic link identical files when extracting files from the WIM.">WIM_LINK_TYPE_SYMBOLIC</a>, or <a class="el" href="wimlib_8h.html#ab928fd5c63d88cabe44248aa80cd89cda92a57ffc9dd3ffe3c7ffe8a510248f6b" title="Hard link identical files when extracting files from the WIM.">WIM_LINK_TYPE_HARD</a>. </td></tr>
1931   </table>
1932   </dd>
1933 </dl>
1934
1935 </div>
1936 </div>
1937 <a class="anchor" id="a956a20eabacceda5230e346ee5cd387f"></a>
1938 <div class="memitem">
1939 <div class="memproto">
1940       <table class="memname">
1941         <tr>
1942           <td class="memname">int <a class="el" href="wimlib_8h.html#a956a20eabacceda5230e346ee5cd387f">wimlib_set_memory_allocator</a> </td>
1943           <td>(</td>
1944           <td class="paramtype">void *(*)(size_t)&#160;</td>
1945           <td class="paramname"><em>malloc_func</em>, </td>
1946         </tr>
1947         <tr>
1948           <td class="paramkey"></td>
1949           <td></td>
1950           <td class="paramtype">void(*)(void *)&#160;</td>
1951           <td class="paramname"><em>free_func</em>, </td>
1952         </tr>
1953         <tr>
1954           <td class="paramkey"></td>
1955           <td></td>
1956           <td class="paramtype">void *(*)(void *, size_t)&#160;</td>
1957           <td class="paramname"><em>realloc_func</em>&#160;</td>
1958         </tr>
1959         <tr>
1960           <td></td>
1961           <td>)</td>
1962           <td></td><td></td>
1963         </tr>
1964       </table>
1965 </div>
1966 <div class="memdoc">
1967
1968 <p>Set the functions that wimlib uses to allocate and free memory. </p>
1969 <p>These settings are global and not per-WIM.</p>
1970 <p>The default is to use the default <code>malloc()</code> and <code>free()</code> from the C library.</p>
1971 <dl class="params"><dt><b>Parameters:</b></dt><dd>
1972   <table class="params">
1973     <tr><td class="paramname">malloc_func</td><td>A function equivalent to <code>malloc()</code> that wimlib will use to allocate memory. If <code>NULL</code>, the allocator function is set back to the default <code>malloc()</code> from the C library. </td></tr>
1974     <tr><td class="paramname">free_func</td><td>A function equivalent to <code>free()</code> that wimlib will use to free memory. If <code>NULL</code>, the free function is set back to the default <code>free()</code> from the C library. </td></tr>
1975     <tr><td class="paramname">realloc_func</td><td>A function equivalent to <code>realloc()</code> that wimlib will use to reallocate memory. If <code>NULL</code>, the free function is set back to the default <code>realloc()</code> from the C library. </td></tr>
1976   </table>
1977   </dd>
1978 </dl>
1979 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
1980 <dl class="retval"><dt><b>Return values:</b></dt><dd>
1981   <table class="retval">
1982     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aaa41915cef472931ace2c8392c9809ac">WIMLIB_ERR_UNSUPPORTED</a></td><td>wimlib was compiled with the <code>--without-custom-memory-allocator</code> flag, so custom memory allocators are unsupported. </td></tr>
1983   </table>
1984   </dd>
1985 </dl>
1986
1987 </div>
1988 </div>
1989 <a class="anchor" id="ab2a5fd17df52da1517835a05ee9b4965"></a>
1990 <div class="memitem">
1991 <div class="memproto">
1992       <table class="memname">
1993         <tr>
1994           <td class="memname">int <a class="el" href="wimlib_8h.html#ab2a5fd17df52da1517835a05ee9b4965">wimlib_set_output_dir</a> </td>
1995           <td>(</td>
1996           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
1997           <td class="paramname"><em>wim</em>, </td>
1998         </tr>
1999         <tr>
2000           <td class="paramkey"></td>
2001           <td></td>
2002           <td class="paramtype">const char *&#160;</td>
2003           <td class="paramname"><em>dir</em>&#160;</td>
2004         </tr>
2005         <tr>
2006           <td></td>
2007           <td>)</td>
2008           <td></td><td></td>
2009         </tr>
2010       </table>
2011 </div>
2012 <div class="memdoc">
2013
2014 <p>Sets and creates the directory to which files are to be extracted when extracting files from the WIM. </p>
2015 <dl class="params"><dt><b>Parameters:</b></dt><dd>
2016   <table class="params">
2017     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file. </td></tr>
2018     <tr><td class="paramname">dir</td><td>The name of the directory to extract files to.</td></tr>
2019   </table>
2020   </dd>
2021 </dl>
2022 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
2023 <dl class="retval"><dt><b>Return values:</b></dt><dd>
2024   <table class="retval">
2025     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2efdcdd644ee843e2df59d8448e29df9">WIMLIB_ERR_INVALID_PARAM</a></td><td><em>dir</em> was <code>NULL</code>. </td></tr>
2026     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a9f7333fcfe6e6da478bd03e8e11f3674">WIMLIB_ERR_MKDIR</a></td><td><em>dir</em> does not already exist and it could not created. </td></tr>
2027     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate the memory needed to duplicate the <em>dir</em> string. </td></tr>
2028   </table>
2029   </dd>
2030 </dl>
2031
2032 </div>
2033 </div>
2034 <a class="anchor" id="a49c39d3c9aa74ac63e1f97da97c20959"></a>
2035 <div class="memitem">
2036 <div class="memproto">
2037       <table class="memname">
2038         <tr>
2039           <td class="memname">int <a class="el" href="wimlib_8h.html#a49c39d3c9aa74ac63e1f97da97c20959">wimlib_set_print_errors</a> </td>
2040           <td>(</td>
2041           <td class="paramtype">bool&#160;</td>
2042           <td class="paramname"><em>show_messages</em></td><td>)</td>
2043           <td></td>
2044         </tr>
2045       </table>
2046 </div>
2047 <div class="memdoc">
2048
2049 <p>Sets whether wimlib is to print error messages to <code>stderr</code> when a function fails or not. </p>
2050 <p>These error messages may provide information that cannot be determined only from the error code that is returned.</p>
2051 <p>This setting is global and not per-WIM.</p>
2052 <p>By default, error messages are not printed.</p>
2053 <dl class="params"><dt><b>Parameters:</b></dt><dd>
2054   <table class="params">
2055     <tr><td class="paramname">show_messages</td><td><code>true</code> if error messages are to be printed; <code>false</code> if error messages are not to be printed.</td></tr>
2056   </table>
2057   </dd>
2058 </dl>
2059 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
2060 <dl class="retval"><dt><b>Return values:</b></dt><dd>
2061   <table class="retval">
2062     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aaa41915cef472931ace2c8392c9809ac">WIMLIB_ERR_UNSUPPORTED</a></td><td><em>show_messages</em> was <code>true</code>, but wimlib was compiled with the <code>--without-error-messages</code> option. Therefore, error messages cannot be shown. </td></tr>
2063   </table>
2064   </dd>
2065 </dl>
2066
2067 </div>
2068 </div>
2069 <a class="anchor" id="a86ac437c91a3a4000e0745ae859d2a13"></a>
2070 <div class="memitem">
2071 <div class="memproto">
2072       <table class="memname">
2073         <tr>
2074           <td class="memname">void <a class="el" href="wimlib_8h.html#a86ac437c91a3a4000e0745ae859d2a13">wimlib_set_verbose</a> </td>
2075           <td>(</td>
2076           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
2077           <td class="paramname"><em>wim</em>, </td>
2078         </tr>
2079         <tr>
2080           <td class="paramkey"></td>
2081           <td></td>
2082           <td class="paramtype">bool&#160;</td>
2083           <td class="paramname"><em>verbose</em>&#160;</td>
2084         </tr>
2085         <tr>
2086           <td></td>
2087           <td>)</td>
2088           <td></td><td></td>
2089         </tr>
2090       </table>
2091 </div>
2092 <div class="memdoc">
2093
2094 <p>Sets whether wimlib is to be verbose when extracting files from a WIM or when creating an image from a directory (i.e. </p>
2095 <p>whether it will print all affected files or not.) This is a per-WIM parameter.</p>
2096 <dl class="params"><dt><b>Parameters:</b></dt><dd>
2097   <table class="params">
2098     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for the WIM file. </td></tr>
2099     <tr><td class="paramname">verbose</td><td>Whether wimlib is to be verbose when extracting files from <em>wim</em> using <a class="el" href="wimlib_8h.html#a6a681ff211ec60f05a6ac5f743b17f65" title="Extracts an image, or all images, from a WIM file.">wimlib_extract_image()</a> or when adding an image to <em>wim</em> using <a class="el" href="wimlib_8h.html#a27ff93a6c6e9df370a6aa1eff753bb43" title="Adds an image to a WIM file from a directory tree on disk.">wimlib_add_image()</a>.</td></tr>
2100   </table>
2101   </dd>
2102 </dl>
2103 <dl class="section return"><dt>Returns:</dt><dd>This function has no return value. </dd></dl>
2104
2105 </div>
2106 </div>
2107 <a class="anchor" id="a2e0ba93652ac9372b56f9a67e3dbf1a1"></a>
2108 <div class="memitem">
2109 <div class="memproto">
2110       <table class="memname">
2111         <tr>
2112           <td class="memname">int <a class="el" href="wimlib_8h.html#a2e0ba93652ac9372b56f9a67e3dbf1a1">wimlib_unmount</a> </td>
2113           <td>(</td>
2114           <td class="paramtype">const char *&#160;</td>
2115           <td class="paramname"><em>dir</em>, </td>
2116         </tr>
2117         <tr>
2118           <td class="paramkey"></td>
2119           <td></td>
2120           <td class="paramtype">int&#160;</td>
2121           <td class="paramname"><em>flags</em>&#160;</td>
2122         </tr>
2123         <tr>
2124           <td></td>
2125           <td>)</td>
2126           <td></td><td></td>
2127         </tr>
2128       </table>
2129 </div>
2130 <div class="memdoc">
2131
2132 <p>Unmounts a WIM image that was mounted using <a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46" title="Mounts an image in a WIM file on a directory read-only or read-write.">wimlib_mount()</a>. </p>
2133 <p>Blocks until it is known whether the mount succeeded or failed.</p>
2134 <p>To perform this operation, the process calling <a class="el" href="wimlib_8h.html#a2e0ba93652ac9372b56f9a67e3dbf1a1" title="Unmounts a WIM image that was mounted using wimlib_mount().">wimlib_unmount()</a> communicates with the process that had called <a class="el" href="wimlib_8h.html#aa6c0a2c2b896530718bd23e433b07e46" title="Mounts an image in a WIM file on a directory read-only or read-write.">wimlib_mount()</a>.</p>
2135 <p>There is currently a design problem with this function because it is hard to know whether the filesystem daemon is still working or whether it has crashed, has been killed, or has reached an infinite loop. However, ideally there should be no infinite loops or crashes in the code, so this wouldn't be much of a problem. Currently, a timeout of 600 seconds (so long because WIMs can be very large) is implemented so that this function will not wait forever before returning failure.</p>
2136 <dl class="params"><dt><b>Parameters:</b></dt><dd>
2137   <table class="params">
2138     <tr><td class="paramname">dir</td><td>The directory that the WIM image was mounted on. </td></tr>
2139     <tr><td class="paramname">flags</td><td>Bitwise OR of the flags <a class="el" href="wimlib_8h.html#ac6c58eaa35aab1ada4764786bc379316" title="Include an integrity table in the new WIM being written during the unmount.">WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY</a> or <a class="el" href="wimlib_8h.html#a714d1722c8a7ca735228622b36a2686f" title="Unless this flag is given, changes to a mounted WIM are discarded.">WIMLIB_UNMOUNT_FLAG_COMMIT</a>. Neither of these flags affect read-only mounts.</td></tr>
2140   </table>
2141   </dd>
2142 </dl>
2143 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
2144 <dl class="retval"><dt><b>Return values:</b></dt><dd>
2145   <table class="retval">
2146     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3ae871c4c1f4cb403a6865ed8fd53cf8c6">WIMLIB_ERR_DELETE_STAGING_DIR</a></td><td>The filesystem daemon was unable to remove the staging directory and the temporary files that it contains. </td></tr>
2147     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3abae4b9232cbaa851ab859a603b7da8b9">WIMLIB_ERR_FORK</a></td><td>Could not <code>fork()</code> the process. </td></tr>
2148     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a4904c625f4cc7cf22b2d8e8d975b9ac3">WIMLIB_ERR_FUSERMOUNT</a></td><td>The <b>fusermount</b> program could not be executed or exited with a failure status. </td></tr>
2149     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3af07f0e13ff2fc210f4032f38cd525dc6">WIMLIB_ERR_MQUEUE</a></td><td>Could not open a POSIX message queue to communicate with the filesystem daemon servicing the mounted filesystem, could not send a message through the queue, or could not receive a message through the queue. </td></tr>
2150     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
2151     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>The filesystem daemon could not open a temporary file for writing the new WIM. </td></tr>
2152     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3aee3c028a9b33d020312343fddfe9febe">WIMLIB_ERR_TIMEOUT</a></td><td>600 seconds elapsed while waiting for the filesystem daemon to notify the process of its exit status, so the WIM file probably was not written successfully. </td></tr>
2153     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>A read error occurred when the filesystem daemon tried to a file from the staging directory </td></tr>
2154     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a5a04d4829ff13a775dc70bc456fc1b85">WIMLIB_ERR_RENAME</a></td><td>The filesystem daemon failed to rename the newly written WIM file to the original WIM file. </td></tr>
2155     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a607a3cd64b77332bdfc9e14b26f47879">WIMLIB_ERR_WRITE</a></td><td>A write error occurred when the filesystem daemon was writing to the new WIM file, or the filesystem daemon was unable to flush changes that had been made to files in the staging directory. </td></tr>
2156   </table>
2157   </dd>
2158 </dl>
2159
2160 </div>
2161 </div>
2162 <a class="anchor" id="a968b46d4decee0ff73504ad9b212734e"></a>
2163 <div class="memitem">
2164 <div class="memproto">
2165       <table class="memname">
2166         <tr>
2167           <td class="memname">int <a class="el" href="wimlib_8h.html#a968b46d4decee0ff73504ad9b212734e">wimlib_write</a> </td>
2168           <td>(</td>
2169           <td class="paramtype"><a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775">WIMStruct</a> *&#160;</td>
2170           <td class="paramname"><em>wim</em>, </td>
2171         </tr>
2172         <tr>
2173           <td class="paramkey"></td>
2174           <td></td>
2175           <td class="paramtype">const char *&#160;</td>
2176           <td class="paramname"><em>path</em>, </td>
2177         </tr>
2178         <tr>
2179           <td class="paramkey"></td>
2180           <td></td>
2181           <td class="paramtype">int&#160;</td>
2182           <td class="paramname"><em>image</em>, </td>
2183         </tr>
2184         <tr>
2185           <td class="paramkey"></td>
2186           <td></td>
2187           <td class="paramtype">int&#160;</td>
2188           <td class="paramname"><em>flags</em>&#160;</td>
2189         </tr>
2190         <tr>
2191           <td></td>
2192           <td>)</td>
2193           <td></td><td></td>
2194         </tr>
2195       </table>
2196 </div>
2197 <div class="memdoc">
2198
2199 <p>Writes the WIM to a file. </p>
2200 <dl class="params"><dt><b>Parameters:</b></dt><dd>
2201   <table class="params">
2202     <tr><td class="paramname">wim</td><td>Pointer to the <a class="el" href="wimlib_8h.html#a8d4f2d1c1110b4519054e55d26b73775" title="Opaque structure that represents a WIM file.">WIMStruct</a> for a WIM file. There may have been in-memory changes made to it, which are then reflected in the output file. </td></tr>
2203     <tr><td class="paramname">path</td><td>The path to the file to write the WIM to. </td></tr>
2204     <tr><td class="paramname">image</td><td>The image inside the WIM to write. Use <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a> to include all images. </td></tr>
2205     <tr><td class="paramname">flags</td><td>Bitwise OR of <a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef" title="Include an integrity table in the new WIM file.">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a> and/or <a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc" title="Print progress information when writing the integrity table.">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a>. If <a class="el" href="wimlib_8h.html#a8872d952cd82da473169f149e3c1edef" title="Include an integrity table in the new WIM file.">WIMLIB_WRITE_FLAG_CHECK_INTEGRITY</a> is given, an integrity table is included in the WIM being written. If <a class="el" href="wimlib_8h.html#a3677fc92a7cef0be997f0b46cf86aafc" title="Print progress information when writing the integrity table.">WIMLIB_WRITE_FLAG_SHOW_PROGRESS</a> is given, the progress of the calculation of the integrity table is shown.</td></tr>
2206   </table>
2207   </dd>
2208 </dl>
2209 <dl class="section return"><dt>Returns:</dt><dd>0 on success; nonzero on error. </dd></dl>
2210 <dl class="retval"><dt><b>Return values:</b></dt><dd>
2211   <table class="retval">
2212     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a17cdbd39e7e24fee224b09f066c35854">WIMLIB_ERR_DECOMPRESSION</a></td><td>Failed to decompress a metadata or file resource in <em>wim</em>. </td></tr>
2213     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a7fbc30f242fc86e7bd3566240b038dd1">WIMLIB_ERR_INVALID_DENTRY</a></td><td>A directory entry in the metadata resource for <em>image</em> in <em>wim</em> is invalid. </td></tr>
2214     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a017191172566b498762b0b2086375d34">WIMLIB_ERR_INVALID_IMAGE</a></td><td><em>image</em> does not specify a single existing image in <em>wim</em>, and is not <a class="el" href="wimlib_8h.html#a3145442fb4d62fe894961fa7555e9b8d" title="Used to specify all images in the WIM.">WIM_ALL_IMAGES</a>. </td></tr>
2215     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a8d9adfd811673113450eac354f182f64">WIMLIB_ERR_INVALID_RESOURCE_SIZE</a></td><td>The metadata resource for <em>image</em> in <em>wim</em> is invalid. </td></tr>
2216     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a929bc52e6eefdb980cdd4fa213fff308">WIMLIB_ERR_NOMEM</a></td><td>Failed to allocate needed memory. </td></tr>
2217     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a865c561baec6f70d23af0bead737cd62">WIMLIB_ERR_OPEN</a></td><td>Failed to open <em>path</em> for writing, or some file resources in <em>wim</em> refer to files in the outside filesystem, and one of these files could not be opened for reading. </td></tr>
2218     <tr><td class="paramname"><a class="el" href="wimlib_8h.html#adbc3c5b05b4cf56b81b9c947f3489cb3a2bac238cfb0689bcc7cea53be74938ad">WIMLIB_ERR_READ</a></td><td>An error occurred when trying to read data from the WIM file associated with <em>wim</em>, or some file resources in <em>wim</em> refer to files in the outside filesystem, and a read error occurred when reading one of these files. </td></tr>
2219   </table>
2220   </dd>
2221 </dl>
2222
2223 </div>
2224 </div>
2225 </div><!-- contents -->
2226
2227
2228 <hr class="footer"/><address class="footer"><small>
2229 Generated by &#160;<a href="http://www.doxygen.org/index.html">
2230 <img class="footer" src="doxygen.png" alt="doxygen"/>
2231 </a> 1.8.0
2232 </small></address>
2233
2234 </body>
2235 </html>