blob: fd88437cc16df85b4374dad95ccf62f14bdbc7c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>Managed Wrapper Library for Cabinet APIs</title>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<link rel="stylesheet" type="text/css" href="MSDN.css">
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0" id="Table1">
<tr id="hdr">
<td class="runninghead">Managed Libraries for Windows Installer</td>
<td class="product"></td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">Managed Wrapper Library for Cabinet APIs</h1>
</div>
</div>
<div id="nstext">
<p>This is a managed library that provides the ability to
create and extract cabinet files. It uses cabinet.dll (present on all versions of Windows)
to do the actual compression/decompression. It provides access to nearly all
cabinet capabilities, including spanning of multiple cab files. It even has support for
preserving directory structures and UTF8 paths.</p>
<p>There are two ways to use the library. <a href="ms-its:MMLRef.chm::/Microsoft.Cab.CabinetInfo.html">CabinetInfo</a>
and <a href="ms-its:MMLRef.chm::/Microsoft.Cab.CabinetFileInfo.html">CabinetFileInfo</a>
(similar to DirectoryInfo and FileInfo respectively)
provide high-level object-oriented methods for doing common file-based cabinet creation and
extraction tasks. On the other hand, the <a href="ms-its:MMLRef.chm::/Microsoft.Cab.Cabinet.html">Cabinet</a>
class provides low-level access to all
functionality, and operates completely in terms of .NET Streams. The previous two classes use
the Cabinet class to do all the actual work.</p>
<p>There are also two ways to build the library.
Compiling it normally will produce the fully functional
library in the <a href="ms-its:MMLRef.chm::/Microsoft.Cab.html">Microsoft.Cab</a>
namespace, while compiling it with the <tt>/D:CABMINIMAL
/D:CABEXTRACTONLY</tt> flags will create a compact assembly with only the core extraction
functionality, in the <a href="ms-its:MMLRef.chm::/Microsoft.Cab.MiniExtract.html">Microsoft.Cab.MiniExtract</a>
namespace.</p>
<p>The cabinet library interops with native cabinet APIs which use the 'cdecl'
calling-convention. When building against .NET Framework versions before 2.0,
this library requires a special post-build step to process the UnmanagedFunctionPointerAttribute.
If you use this code in another assembly, don't forget to run <a href="augmentil.htm">AugmentIL</a>
on it to fix the delegate calling-conventions, otherwise you will encounter a
NullReferenceException when attempting to call the cabinet APIs. When building against
.NET Framework version 2.0 or later, the UnmanagedFunctionPointerAttribute.cs source file
should be omitted.</p>
<p><br/></p>
<p><b>See also:</b></p>
<ul>
<li><a href="cabs.htm">Working with Cabinet Files</a></li>
<li><a href="ms-its:MMLRef.chm::/Microsoft.Cab.CabinetInfoMethods.html">CabinetInfo Methods</a></li>
<li><a href="ms-its:MMLRef.chm::/Microsoft.Cab.CabinetMethods.html">Cabinet Methods</a></li>
<li><a href="cabpack.htm">CabPack Sample Tool</a></li>
</ul>
<p><br/></p>
</div>
</body>
</html>
|