diff options
Diffstat (limited to 'src/tools/Dtf/Documents/Guide/Content/msiwrapper.htm')
-rw-r--r-- | src/tools/Dtf/Documents/Guide/Content/msiwrapper.htm | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/tools/Dtf/Documents/Guide/Content/msiwrapper.htm b/src/tools/Dtf/Documents/Guide/Content/msiwrapper.htm new file mode 100644 index 00000000..70190ac4 --- /dev/null +++ b/src/tools/Dtf/Documents/Guide/Content/msiwrapper.htm | |||
@@ -0,0 +1,80 @@ | |||
1 | <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Included Components</title> | ||
5 | <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"> | ||
6 | <link rel="stylesheet" type="text/css" href="MSDN.css"> | ||
7 | </head> | ||
8 | <body id="bodyID" class="dtBODY"> | ||
9 | <div id="nsbanner"> | ||
10 | <div id="bannerrow1"> | ||
11 | <table class="bannerparthead" cellspacing="0" id="Table1"> | ||
12 | <tr id="hdr"> | ||
13 | <td class="runninghead">Managed Libraries for Windows Installer</td> | ||
14 | <td class="product"></td> | ||
15 | </tr> | ||
16 | </table> | ||
17 | </div> | ||
18 | <div id="TitleRow"> | ||
19 | <h1 class="dtH1">Managed wrapper library for Windows Installer APIs</h1> | ||
20 | </div> | ||
21 | </div> | ||
22 | <div id="nstext"> | ||
23 | <p>Microsoft.WindowsInstaller.dll is a complete .NET wrapper for the | ||
24 | Windows Installer APIs. It provides a convenient object model that is | ||
25 | comfortable to .NET developers and still familiar to anyone who has used | ||
26 | the MSI scripting object model.</p> | ||
27 | <h3>Notes</h3> | ||
28 | <ul> | ||
29 | <li><p>All published MSI APIs are wrapped, with the exception of four: | ||
30 | MsiGetFileSignatureInformation (because I don't know of a .NET analog for the | ||
31 | returned certificate structure), and three APIs for previewing UI dialogs. | ||
32 | Other than that, you should be able to do everything that you can | ||
33 | do via the C APIs or the COM automation interface.</p> | ||
34 | <li><p>Some parts of this code have never had a formal test | ||
35 | pass, so use at your own risk. But much of the code is exercised daily, used | ||
36 | by the Developer Division Sustaining Engineering team's BRIQS system to build | ||
37 | and test patches. And it has been in use by many other teams for over two | ||
38 | years now with only a few minor fixes, so it can be considered very stable.</p> | ||
39 | <li><p>Despite its official-sounding namespace, this assembly is not officially | ||
40 | sanctioned by the Windows Installer team. But currently there are not any | ||
41 | plans for an official set of managed even in Longhorn, so I don't see a | ||
42 | conflict for now.</p></li> | ||
43 | </ul> | ||
44 | <h3>Why rewrite it?</h3> | ||
45 | <p>It is possible to access MSI's COM Automation interfaces via C# and VB.NET. | ||
46 | So why create yet another wrapper? Here are some of my reasons:</p> | ||
47 | <ul> | ||
48 | <li><p>One of the primary things I wanted to be able to do | ||
49 | was write custom actions in C#. The automation interface was not usable in | ||
50 | that case, because there is no way to convert the integer session handle | ||
51 | (received as a parameter to the type 1 custom action function) into a Session | ||
52 | automation object.</p> | ||
53 | <li><p>The automation interface does not provide a way to | ||
54 | specify an external UI handler. Besides external UI, this is also needed | ||
55 | to do validation.</p> | ||
56 | <li><p>The automation interface does not provide a way to | ||
57 | explicitly close handles (other than Views). I ran into this problem when I | ||
58 | wanted to programmatically delete a database that I'd just finished using, but | ||
59 | couldn't because it was still open!</p> | ||
60 | <li><p>Finally, COM Automation is somewhat slower than invoking | ||
61 | the APIs directly.</p></li> | ||
62 | </ul> | ||
63 | |||
64 | <p><br/></p> | ||
65 | <p><b>See also:</b></p> | ||
66 | <ul> | ||
67 | <li><a href="ms-its:MMLRef.chm::/Microsoft.WindowsInstaller.html">Microsoft.WindowsInstaller Namespace</a></li> | ||
68 | <ul> | ||
69 | <li><a href="ms-its:MMLRef.chm::/Microsoft.WindowsInstaller.Installer.html">Installer Class</a></li> | ||
70 | <li><a href="ms-its:MMLRef.chm::/Microsoft.WindowsInstaller.Database.html">Database Class</a></li> | ||
71 | <li><a href="ms-its:MMLRef.chm::/Microsoft.WindowsInstaller.Session.html">Session Class</a></li> | ||
72 | </ul> | ||
73 | <li><a href="msihelper.htm">Helper Classes for Windows Installer Packages</a></li> | ||
74 | <li><a href="writingcas.htm">Writing Managed Custom Actions</a></li> | ||
75 | <li><a href="databases.htm">Working with MSI Databases</a></li> | ||
76 | </ul> | ||
77 | <p><br/></p> | ||
78 | </div> | ||
79 | </body> | ||
80 | </html> | ||