1 {******************************************************************************}
2 {                                                                              }
3 { Windows Installer API interface Unit for Object Pascal                       }
4 {                                                                              }
5 { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
6 { Corporation. All Rights Reserved.                                            }
7 {                                                                              }
8 { The original file is: msi.h, released June 2000. The original Pascal         }
9 { code is: Msi.pas, released June 2001. The initial developer of the           }
10 { Pascal code is Marcel van Brakel (brakelm att chello dott nl).               }
11 {                                                                              }
12 { Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
13 { Marcel van Brakel. All Rights Reserved.                                      }
14 {                                                                              }
15 { Contributors: Steve Moss (spm att coco dott co dott uk)                      }
16 {                                                                              }
17 { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
18 {                                                                              }
19 { You may retrieve the latest version of this file at the Project JEDI         }
20 { APILIB home page, located at http://jedi-apilib.sourceforge.net              }
21 {                                                                              }
22 { The contents of this file are used with permission, subject to the Mozilla   }
23 { Public License Version 1.1 (the "License"); you may not use this file except }
24 { in compliance with the License. You may obtain a copy of the License at      }
25 { http://www.mozilla.org/MPL/MPL-1.1.html                                      }
26 {                                                                              }
27 { Software distributed under the License is distributed on an "AS IS" basis,   }
28 { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
29 { the specific language governing rights and limitations under the License.    }
30 {                                                                              }
31 { Alternatively, the contents of this file may be used under the terms of the  }
32 { GNU Lesser General Public License (the  "LGPL License"), in which case the   }
33 { provisions of the LGPL License are applicable instead of those above.        }
34 { If you wish to allow use of your version of this file only under the terms   }
35 { of the LGPL License and not to allow others to use your version of this file }
36 { under the MPL, indicate your decision by deleting  the provisions above and  }
37 { replace  them with the notice and other provisions required by the LGPL      }
38 { License.  If you do not delete the provisions above, a recipient may use     }
39 { your version of this file under either the MPL or the LGPL License.          }
40 {                                                                              }
41 { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
42 {                                                                              }
43 {******************************************************************************}
44 
45 // $Id: JwaMsi.pas,v 1.17 2007/09/05 11:58:51 dezipaitor Exp $
46 
47 {$IFNDEF JWA_OMIT_SECTIONS}
48 unit JwaMsi;
49 
50 {$WEAKPACKAGEUNIT}
51 
52 {$I jediapilib.inc}
53 
54 interface
55 
56 uses
57   JwaWinType, JwaWinCrypt { for PCCERT_CONTEXT };
58 {$ENDIF JWA_OMIT_SECTIONS}
59 
60 {$HPPEMIT ''}
61 {$HPPEMIT '#include "msi.h"'}
62 {$HPPEMIT ''}
63 
64 {$IFNDEF JWA_IMPLEMENTATIONSECTION}
65 // (rom) MSI version IFDEFs now declared in jediapilib.inc
66 
67 (*****************************************************************************\
68 *                                                                             *
69 * msi.h - - Interface for external access to Installer Service                *
70 *                                                                             *
71 * Version 1.0 - 1.2                                                           *
72 *                                                                             *
73 * NOTES:  All buffers sizes are TCHAR count, null included only on input      *
74 *         Return argument pointers may be null if not interested in value     *
75 *                                                                             *
76 * Copyright (c) 1999-2000, Microsoft Corp.      All rights reserved.          *
77 *                                                                             *
78 \*****************************************************************************)
79 
80 // --------------------------------------------------------------------------
81 // Installer generic handle definitions
82 // --------------------------------------------------------------------------
83 
84 type
85   MSIHANDLE = DWORD;     // abstract generic handle, 0 == no handle
86   {$EXTERNALSYM MSIHANDLE}
87   TMsiHandle = MSIHANDLE;
88 
89 // Close a open handle of any type
90 // All handles obtained from API calls must be closed when no longer needed
91 // Normally succeeds, returning TRUE.
92 
MsiCloseHandlenull93 function MsiCloseHandle(hAny: MSIHANDLE): UINT; stdcall;
94 {$EXTERNALSYM MsiCloseHandle}
95 
96 // Close all handles open in the process, a diagnostic call
97 // This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
98 // Can be called at termination to assure that all handles have been closed
99 // Returns 0 if all handles have been close, else number of open handles
100 
MsiCloseAllHandlesnull101 function MsiCloseAllHandles: UINT; stdcall;
102 {$EXTERNALSYM MsiCloseAllHandles}
103 
104 // Install message type for callback is a combination of the following:
105 //  A message box style:      MB_*, where MB_OK is the default
106 //  A message box icon type:  MB_ICON*, where no icon is the default
107 //  A default button:         MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
108 //  One of the following install message types, no default
109 
110 const
111   INSTALLMESSAGE_FATALEXIT      = $00000000; // premature termination, possibly fatal OOM
112   {$EXTERNALSYM INSTALLMESSAGE_FATALEXIT}
113   INSTALLMESSAGE_ERROR          = $01000000; // formatted error message
114   {$EXTERNALSYM INSTALLMESSAGE_ERROR}
115   INSTALLMESSAGE_WARNING        = $02000000; // formatted warning message
116   {$EXTERNALSYM INSTALLMESSAGE_WARNING}
117   INSTALLMESSAGE_USER           = $03000000; // user request message
118   {$EXTERNALSYM INSTALLMESSAGE_USER}
119   INSTALLMESSAGE_INFO           = $04000000; // informative message for log
120   {$EXTERNALSYM INSTALLMESSAGE_INFO}
121   INSTALLMESSAGE_FILESINUSE     = $05000000; // list of files in use that need to be replaced
122   {$EXTERNALSYM INSTALLMESSAGE_FILESINUSE}
123   INSTALLMESSAGE_RESOLVESOURCE  = $06000000; // request to determine a valid source location
124   {$EXTERNALSYM INSTALLMESSAGE_RESOLVESOURCE}
125   INSTALLMESSAGE_OUTOFDISKSPACE = $07000000; // insufficient disk space message
126   {$EXTERNALSYM INSTALLMESSAGE_OUTOFDISKSPACE}
127   INSTALLMESSAGE_ACTIONSTART    = $08000000; // start of action: action name & description
128   {$EXTERNALSYM INSTALLMESSAGE_ACTIONSTART}
129   INSTALLMESSAGE_ACTIONDATA     = $09000000; // formatted data associated with individual action item
130   {$EXTERNALSYM INSTALLMESSAGE_ACTIONDATA}
131   INSTALLMESSAGE_PROGRESS       = $0A000000; // progress gauge info: units so far, total
132   {$EXTERNALSYM INSTALLMESSAGE_PROGRESS}
133   INSTALLMESSAGE_COMMONDATA     = $0B000000; // product info for dialog: language Id, dialog caption
134   {$EXTERNALSYM INSTALLMESSAGE_COMMONDATA}
135   INSTALLMESSAGE_INITIALIZE     = $0C000000; // sent prior to UI initialization, no string data
136   {$EXTERNALSYM INSTALLMESSAGE_INITIALIZE}
137   INSTALLMESSAGE_TERMINATE      = $0D000000; // sent after UI termination, no string data
138   {$EXTERNALSYM INSTALLMESSAGE_TERMINATE}
139   INSTALLMESSAGE_SHOWDIALOG     = $0E000000; // sent prior to display or authored dialog or wizard
140   {$EXTERNALSYM INSTALLMESSAGE_SHOWDIALOG}
141 
142 type
143   INSTALLMESSAGE = Longint;
144   {$EXTERNALSYM INSTALLMESSAGE}
145   TInstallMessage = INSTALLMESSAGE;
146 
147 // external error handler supplied to installation API functions
148 
149 type
vContextnull150   INSTALLUI_HANDLERA = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCSTR): Integer; stdcall;
151   {$EXTERNALSYM INSTALLUI_HANDLERA}
152   TInstallUIHandlerA = INSTALLUI_HANDLERA;
vContextnull153   INSTALLUI_HANDLERW = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCWSTR): Integer; stdcall;
154   {$EXTERNALSYM INSTALLUI_HANDLERW}
155   TInstallUIHandlerW = INSTALLUI_HANDLERW;
156 
157   {$IFDEF UNICODE}
158   INSTALLUI_HANDLER = INSTALLUI_HANDLERW;
159   {$EXTERNALSYM INSTALLUI_HANDLER}
160   TInstallUIHandler = TInstallUIHandlerW;
161   {$ELSE}
162   INSTALLUI_HANDLER = INSTALLUI_HANDLERA;
163   {$EXTERNALSYM INSTALLUI_HANDLER}
164   TInstallUIHandler = TInstallUIHandlerA;
165   {$ENDIF UNICODE}
166 
167 const
168   INSTALLUILEVEL_NOCHANGE = 0;    // UI level is unchanged
169   {$EXTERNALSYM INSTALLUILEVEL_NOCHANGE}
170   INSTALLUILEVEL_DEFAULT  = 1;    // default UI is used
171   {$EXTERNALSYM INSTALLUILEVEL_DEFAULT}
172   INSTALLUILEVEL_NONE     = 2;    // completely silent installation
173   {$EXTERNALSYM INSTALLUILEVEL_NONE}
174   INSTALLUILEVEL_BASIC    = 3;    // simple progress and error handling
175   {$EXTERNALSYM INSTALLUILEVEL_BASIC}
176   INSTALLUILEVEL_REDUCED  = 4;    // authored UI, wizard dialogs suppressed
177   {$EXTERNALSYM INSTALLUILEVEL_REDUCED}
178   INSTALLUILEVEL_FULL     = 5;    // authored UI with wizards, progress, errors
179   {$EXTERNALSYM INSTALLUILEVEL_FULL}
180   INSTALLUILEVEL_ENDDIALOG    = $80; // display success/failure dialog at end of install
181   {$EXTERNALSYM INSTALLUILEVEL_ENDDIALOG}
182   INSTALLUILEVEL_PROGRESSONLY = $40; // display only progress dialog
183   {$EXTERNALSYM INSTALLUILEVEL_PROGRESSONLY}
184   INSTALLUILEVEL_HIDECANCEL   = $20; // do not display the cancel button in basic UI
185   {$EXTERNALSYM INSTALLUILEVEL_HIDECANCEL}
186   INSTALLUILEVEL_SOURCERESONLY = $100; // force display of source resolution even if quiet
187   {$EXTERNALSYM INSTALLUILEVEL_SOURCERESONLY}
188 
189 type
190   INSTALLUILEVEL = Longint;
191   {$EXTERNALSYM INSTALLUILEVEL}
192   TInstallUILevel = INSTALLUILEVEL;
193 
194 const
195   INSTALLSTATE_NOTUSED      = -7;  // component disabled
196   {$EXTERNALSYM INSTALLSTATE_NOTUSED}
197   INSTALLSTATE_BADCONFIG    = -6;  // configuration data corrupt
198   {$EXTERNALSYM INSTALLSTATE_BADCONFIG}
199   INSTALLSTATE_INCOMPLETE   = -5;  // installation suspended or in progress
200   {$EXTERNALSYM INSTALLSTATE_INCOMPLETE}
201   INSTALLSTATE_SOURCEABSENT = -4;  // run from source, source is unavailable
202   {$EXTERNALSYM INSTALLSTATE_SOURCEABSENT}
203   INSTALLSTATE_MOREDATA     = -3;  // return buffer overflow
204   {$EXTERNALSYM INSTALLSTATE_MOREDATA}
argumentnull205   INSTALLSTATE_INVALIDARG   = -2;  // invalid function argument
206   {$EXTERNALSYM INSTALLSTATE_INVALIDARG}
207   INSTALLSTATE_UNKNOWN      = -1;  // unrecognized product or feature
208   {$EXTERNALSYM INSTALLSTATE_UNKNOWN}
209   INSTALLSTATE_BROKEN       =  0;  // broken
210   {$EXTERNALSYM INSTALLSTATE_BROKEN}
211   INSTALLSTATE_ADVERTISED   =  1;  // advertised feature
212   {$EXTERNALSYM INSTALLSTATE_ADVERTISED}
213   INSTALLSTATE_REMOVED      =  1;  // component being removed (action state, not settable)
214   {$EXTERNALSYM INSTALLSTATE_REMOVED}
215   INSTALLSTATE_ABSENT       =  2;  // uninstalled (or action state absent but clients remain)
216   {$EXTERNALSYM INSTALLSTATE_ABSENT}
217   INSTALLSTATE_LOCAL        =  3;  // installed on local drive
218   {$EXTERNALSYM INSTALLSTATE_LOCAL}
219   INSTALLSTATE_SOURCE       =  4;  // run from source, CD or net
220   {$EXTERNALSYM INSTALLSTATE_SOURCE}
221   INSTALLSTATE_DEFAULT      =  5;  // use default, local or source
222   {$EXTERNALSYM INSTALLSTATE_DEFAULT}
223 
224 type
225   INSTALLSTATE = Longint;
226   {$EXTERNALSYM INSTALLSTATE}
227   TInstallState = INSTALLSTATE;
228 
229 const
230   USERINFOSTATE_MOREDATA   = -3;  // return buffer overflow
231   {$EXTERNALSYM USERINFOSTATE_MOREDATA}
argumentnull232   USERINFOSTATE_INVALIDARG = -2;  // invalid function argument
233   {$EXTERNALSYM USERINFOSTATE_INVALIDARG}
234   USERINFOSTATE_UNKNOWN    = -1;  // unrecognized product
235   {$EXTERNALSYM USERINFOSTATE_UNKNOWN}
236   USERINFOSTATE_ABSENT     =  0;  // user info and PID not initialized
237   {$EXTERNALSYM USERINFOSTATE_ABSENT}
238   USERINFOSTATE_PRESENT    =  1;  // user info and PID initialized
239   {$EXTERNALSYM USERINFOSTATE_PRESENT}
240 
241 type
242   USERINFOSTATE = DWORD;
243   {$EXTERNALSYM USERINFOSTATE}
244   TUserInfoState = USERINFOSTATE;
245 
246 const
247   INSTALLLEVEL_DEFAULT = 0;      // install authored default
248   {$EXTERNALSYM INSTALLLEVEL_DEFAULT}
249   INSTALLLEVEL_MINIMUM = 1;      // install only required features
250   {$EXTERNALSYM INSTALLLEVEL_MINIMUM}
251   INSTALLLEVEL_MAXIMUM = $FFFF;  // install all features
252   {$EXTERNALSYM INSTALLLEVEL_MAXIMUM}
253 
254 type
255   INSTALLLEVEL = DWORD;                   // intermediate levels dependent on authoring
256   {$EXTERNALSYM INSTALLLEVEL}
257   TInstallLevel = INSTALLLEVEL;
258 
259 const
260   REINSTALLMODE_REPAIR           = $00000001;  // Reserved bit - currently ignored
261   {$EXTERNALSYM REINSTALLMODE_REPAIR}
262   REINSTALLMODE_FILEMISSING      = $00000002;  // Reinstall only if file is missing
263   {$EXTERNALSYM REINSTALLMODE_FILEMISSING}
264   REINSTALLMODE_FILEOLDERVERSION = $00000004;  // Reinstall if file is missing, or older version
265   {$EXTERNALSYM REINSTALLMODE_FILEOLDERVERSION}
266   REINSTALLMODE_FILEEQUALVERSION = $00000008;  // Reinstall if file is missing, or equal or older version
267   {$EXTERNALSYM REINSTALLMODE_FILEEQUALVERSION}
268   REINSTALLMODE_FILEEXACT        = $00000010;  // Reinstall if file is missing, or not exact version
269   {$EXTERNALSYM REINSTALLMODE_FILEEXACT}
270   REINSTALLMODE_FILEVERIFY       = $00000020;  // checksum executables, reinstall if missing or corrupt
271   {$EXTERNALSYM REINSTALLMODE_FILEVERIFY}
272   REINSTALLMODE_FILEREPLACE      = $00000040;  // Reinstall all files, regardless of version
273   {$EXTERNALSYM REINSTALLMODE_FILEREPLACE}
274   REINSTALLMODE_MACHINEDATA      = $00000080;  // insure required machine reg entries
275   {$EXTERNALSYM REINSTALLMODE_MACHINEDATA}
276   REINSTALLMODE_USERDATA         = $00000100;  // insure required user reg entries
277   {$EXTERNALSYM REINSTALLMODE_USERDATA}
278   REINSTALLMODE_SHORTCUT         = $00000200;  // validate shortcuts items
279   {$EXTERNALSYM REINSTALLMODE_SHORTCUT}
280   REINSTALLMODE_PACKAGE          = $00000400;  // use re-cache source install package
281   {$EXTERNALSYM REINSTALLMODE_PACKAGE}
282 
283 type
284   REINSTALLMODE = DWORD;
285   {$EXTERNALSYM REINSTALLMODE}
286   TReinstallMode = REINSTALLMODE;
287 
288 // bit flags for use with MsiEnableLog and MsiSetExternalUI
289 
290 const
291   INSTALLLOGMODE_FATALEXIT      = 1 shl (INSTALLMESSAGE_FATALEXIT      shr 24);
292   {$EXTERNALSYM INSTALLLOGMODE_FATALEXIT}
293   INSTALLLOGMODE_ERROR          = 1 shl (INSTALLMESSAGE_ERROR          shr 24);
294   {$EXTERNALSYM INSTALLLOGMODE_ERROR}
295   INSTALLLOGMODE_WARNING        = 1 shl (INSTALLMESSAGE_WARNING        shr 24);
296   {$EXTERNALSYM INSTALLLOGMODE_WARNING}
297   INSTALLLOGMODE_USER           = 1 shl (INSTALLMESSAGE_USER           shr 24);
298   {$EXTERNALSYM INSTALLLOGMODE_USER}
299   INSTALLLOGMODE_INFO           = 1 shl (INSTALLMESSAGE_INFO           shr 24);
300   {$EXTERNALSYM INSTALLLOGMODE_INFO}
301   INSTALLLOGMODE_RESOLVESOURCE  = 1 shl (INSTALLMESSAGE_RESOLVESOURCE  shr 24);
302   {$EXTERNALSYM INSTALLLOGMODE_RESOLVESOURCE}
303   INSTALLLOGMODE_OUTOFDISKSPACE = 1 shl (INSTALLMESSAGE_OUTOFDISKSPACE shr 24);
304   {$EXTERNALSYM INSTALLLOGMODE_OUTOFDISKSPACE}
305   INSTALLLOGMODE_ACTIONSTART    = 1 shl (INSTALLMESSAGE_ACTIONSTART    shr 24);
306   {$EXTERNALSYM INSTALLLOGMODE_ACTIONSTART}
307   INSTALLLOGMODE_ACTIONDATA     = 1 shl (INSTALLMESSAGE_ACTIONDATA     shr 24);
308   {$EXTERNALSYM INSTALLLOGMODE_ACTIONDATA}
309   INSTALLLOGMODE_COMMONDATA     = 1 shl (INSTALLMESSAGE_COMMONDATA     shr 24);
310   {$EXTERNALSYM INSTALLLOGMODE_COMMONDATA}
311   INSTALLLOGMODE_PROPERTYDUMP   = 1 shl (INSTALLMESSAGE_PROGRESS       shr 24); // log only
312   {$EXTERNALSYM INSTALLLOGMODE_PROPERTYDUMP}
313   INSTALLLOGMODE_VERBOSE        = 1 shl (INSTALLMESSAGE_INITIALIZE     shr 24); // log only
314   {$EXTERNALSYM INSTALLLOGMODE_VERBOSE}
315   INSTALLLOGMODE_EXTRADEBUG     = 1 shl (INSTALLMESSAGE_TERMINATE      shr 24); // log only
316   {$EXTERNALSYM INSTALLLOGMODE_EXTRADEBUG}
317   INSTALLLOGMODE_PROGRESS       = 1 shl (INSTALLMESSAGE_PROGRESS       shr 24); // external handler only
318   {$EXTERNALSYM INSTALLLOGMODE_PROGRESS}
319   INSTALLLOGMODE_INITIALIZE     = 1 shl (INSTALLMESSAGE_INITIALIZE     shr 24); // external handler only
320   {$EXTERNALSYM INSTALLLOGMODE_INITIALIZE}
321   INSTALLLOGMODE_TERMINATE      = 1 shl (INSTALLMESSAGE_TERMINATE      shr 24); // external handler only
322   {$EXTERNALSYM INSTALLLOGMODE_TERMINATE}
323   INSTALLLOGMODE_SHOWDIALOG     = 1 shl (INSTALLMESSAGE_SHOWDIALOG     shr 24); // external handler only
324   {$EXTERNALSYM INSTALLLOGMODE_SHOWDIALOG}
325 
326 type
327   INSTALLLOGMODE = DWORD;
328   {$EXTERNALSYM INSTALLLOGMODE}
329   TInstallLogMode = INSTALLLOGMODE;
330 
331 const
332   INSTALLLOGATTRIBUTES_APPEND            = 1 shl 0;
333   {$EXTERNALSYM INSTALLLOGATTRIBUTES_APPEND}
334   INSTALLLOGATTRIBUTES_FLUSHEACHLINE     = 1 shl 1;
335   {$EXTERNALSYM INSTALLLOGATTRIBUTES_FLUSHEACHLINE}
336 
337 type
338   INSTALLLOGATTRIBUTES = DWORD;
339   {$EXTERNALSYM INSTALLLOGATTRIBUTES}
340   TInstallLogAttributes = INSTALLLOGATTRIBUTES;
341 
342 const
343   INSTALLFEATUREATTRIBUTE_FAVORLOCAL             = 1 shl 0;
344   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORLOCAL}
345   INSTALLFEATUREATTRIBUTE_FAVORSOURCE            = 1 shl 1;
346   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORSOURCE}
347   INSTALLFEATUREATTRIBUTE_FOLLOWPARENT           = 1 shl 2;
348   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FOLLOWPARENT}
349   INSTALLFEATUREATTRIBUTE_FAVORADVERTISE         = 1 shl 3;
350   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORADVERTISE}
351   INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE      = 1 shl 4;
352   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE}
353   INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 shl 5;
354   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE}
355 
356 type
357   INSTALLFEATUREATTRIBUTE = DWORD;
358   {$EXTERNALSYM INSTALLFEATUREATTRIBUTE}
359   TInstallFeatureAttribute = INSTALLFEATUREATTRIBUTE;
360 
361 const
362   INSTALLMODE_NOSOURCERESOLUTION   = -3;  // skip source resolution
363   {$EXTERNALSYM INSTALLMODE_NOSOURCERESOLUTION}
364   INSTALLMODE_NODETECTION          = -2;  // skip detection
365   {$EXTERNALSYM INSTALLMODE_NODETECTION}
366   INSTALLMODE_EXISTING             = -1;  // provide, if available
367   {$EXTERNALSYM INSTALLMODE_EXISTING}
368   INSTALLMODE_DEFAULT              =  0;  // install, if absent
369   {$EXTERNALSYM INSTALLMODE_DEFAULT}
370 
371 type
372   INSTALLMODE = DWORD;
373   {$EXTERNALSYM INSTALLMODE}
374   TInstallMode = INSTALLMODE;
375 
376 const
377   MAX_FEATURE_CHARS = 38;   // maximum chars in feature name (same as string GUID)
378   {$EXTERNALSYM MAX_FEATURE_CHARS}
379 
380 // Product info attributes: advertised information
381 
382   INSTALLPROPERTY_PACKAGENAME    = __TEXT('PackageName');
383   {$EXTERNALSYM INSTALLPROPERTY_PACKAGENAME}
384   INSTALLPROPERTY_TRANSFORMS     = __TEXT('Transforms');
385   {$EXTERNALSYM INSTALLPROPERTY_TRANSFORMS}
386   INSTALLPROPERTY_LANGUAGE       = __TEXT('Language');
387   {$EXTERNALSYM INSTALLPROPERTY_LANGUAGE}
388   INSTALLPROPERTY_PRODUCTNAME    = __TEXT('ProductName');
389   {$EXTERNALSYM INSTALLPROPERTY_PRODUCTNAME}
390   INSTALLPROPERTY_ASSIGNMENTTYPE = __TEXT('AssignmentType');
391   {$EXTERNALSYM INSTALLPROPERTY_ASSIGNMENTTYPE}
392 //#if (_WIN32_MSI >= 150)
393   INSTALLPROPERTY_INSTANCETYPE   = __TEXT('InstanceType');
394   {$EXTERNALSYM INSTALLPROPERTY_INSTANCETYPE}
395 //#endif //(_WIN32_MSI >= 150)
396 
397   INSTALLPROPERTY_PACKAGECODE    = __TEXT('PackageCode');
398   {$EXTERNALSYM INSTALLPROPERTY_PACKAGECODE}
399   INSTALLPROPERTY_VERSION        = __TEXT('Version');
400   {$EXTERNALSYM INSTALLPROPERTY_VERSION}
401   INSTALLPROPERTY_PRODUCTICON    = __TEXT('ProductIcon');
402   {$EXTERNALSYM INSTALLPROPERTY_PRODUCTICON}
403 
404 // Product info attributes: installed information
405 
406   INSTALLPROPERTY_INSTALLEDPRODUCTNAME = __TEXT('InstalledProductName');
407   {$EXTERNALSYM INSTALLPROPERTY_INSTALLEDPRODUCTNAME}
408   INSTALLPROPERTY_VERSIONSTRING        = __TEXT('VersionString');
409   {$EXTERNALSYM INSTALLPROPERTY_VERSIONSTRING}
410   INSTALLPROPERTY_HELPLINK             = __TEXT('HelpLink');
411   {$EXTERNALSYM INSTALLPROPERTY_HELPLINK}
412   INSTALLPROPERTY_HELPTELEPHONE        = __TEXT('HelpTelephone');
413   {$EXTERNALSYM INSTALLPROPERTY_HELPTELEPHONE}
414   INSTALLPROPERTY_INSTALLLOCATION      = __TEXT('InstallLocation');
415   {$EXTERNALSYM INSTALLPROPERTY_INSTALLLOCATION}
416   INSTALLPROPERTY_INSTALLSOURCE        = __TEXT('InstallSource');
417   {$EXTERNALSYM INSTALLPROPERTY_INSTALLSOURCE}
418   INSTALLPROPERTY_INSTALLDATE          = __TEXT('InstallDate');
419   {$EXTERNALSYM INSTALLPROPERTY_INSTALLDATE}
420   INSTALLPROPERTY_PUBLISHER            = __TEXT('Publisher');
421   {$EXTERNALSYM INSTALLPROPERTY_PUBLISHER}
422   INSTALLPROPERTY_LOCALPACKAGE         = __TEXT('LocalPackage');
423   {$EXTERNALSYM INSTALLPROPERTY_LOCALPACKAGE}
424   INSTALLPROPERTY_URLINFOABOUT         = __TEXT('URLInfoAbout');
425   {$EXTERNALSYM INSTALLPROPERTY_URLINFOABOUT}
426   INSTALLPROPERTY_URLUPDATEINFO        = __TEXT('URLUpdateInfo');
427   {$EXTERNALSYM INSTALLPROPERTY_URLUPDATEINFO}
428   INSTALLPROPERTY_VERSIONMINOR         = __TEXT('VersionMinor');
429   {$EXTERNALSYM INSTALLPROPERTY_VERSIONMINOR}
430   INSTALLPROPERTY_VERSIONMAJOR         = __TEXT('VersionMajor');
431   {$EXTERNALSYM INSTALLPROPERTY_VERSIONMAJOR}
432 
433 const
434   SCRIPTFLAGS_CACHEINFO                = $00000001;   // set if the icons need to be created/ removed
435   {$EXTERNALSYM SCRIPTFLAGS_CACHEINFO}
436   SCRIPTFLAGS_SHORTCUTS                = $00000004;   // set if the shortcuts needs to be created/ deleted
437   {$EXTERNALSYM SCRIPTFLAGS_SHORTCUTS}
438   SCRIPTFLAGS_MACHINEASSIGN            = $00000008;   // set if product to be assigned to machine
439   {$EXTERNALSYM SCRIPTFLAGS_MACHINEASSIGN}
440   SCRIPTFLAGS_REGDATA_CNFGINFO         = $00000020;   // set if the product cnfg mgmt. registry data needs to be written/ removed
441   {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CNFGINFO}
442   SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = $00000040;
443   {$EXTERNALSYM SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST}
444   {$IFDEF MSI200_UP}
445   SCRIPTFLAGS_REGDATA_CLASSINFO        = $00000080;   // set if COM classes related app info needs to be  created/ deleted
446   {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CLASSINFO}
447   SCRIPTFLAGS_REGDATA_EXTENSIONINFO    = $00000100;   // set if extension related app info needs to be  created/ deleted
448   {$EXTERNALSYM SCRIPTFLAGS_REGDATA_EXTENSIONINFO}
449   SCRIPTFLAGS_REGDATA_APPINFO          = SCRIPTFLAGS_REGDATA_CLASSINFO or SCRIPTFLAGS_REGDATA_EXTENSIONINFO; // for source level backward compatibility
450   {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
451   {$ELSE} // _WIN32_MSI >= 110
452   SCRIPTFLAGS_REGDATA_APPINFO          = $00000010;
453   {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
454   {$ENDIF MSI200_UP}
455   SCRIPTFLAGS_REGDATA                  = SCRIPTFLAGS_REGDATA_APPINFO or SCRIPTFLAGS_REGDATA_CNFGINFO;// for source level backward compatibility
456   {$EXTERNALSYM SCRIPTFLAGS_REGDATA}
457 
458 type
459   SCRIPTFLAGS = Longint;
460   {$EXTERNALSYM SCRIPTFLAGS}
461   TScriptFlags = SCRIPTFLAGS;
462 
463 const
464   ADVERTISEFLAGS_MACHINEASSIGN   = 0;   // set if the product is to be machine assigned
465   {$EXTERNALSYM ADVERTISEFLAGS_MACHINEASSIGN}
466   ADVERTISEFLAGS_USERASSIGN      = 1;   // set if the product is to be user assigned
467   {$EXTERNALSYM ADVERTISEFLAGS_USERASSIGN}
468 
469 type
470   ADVERTISEFLAGS = Longint;
471   {$EXTERNALSYM ADVERTISEFLAGS}
472   TAdvertiseFlags = ADVERTISEFLAGS;
473 
474 const
475   INSTALLTYPE_DEFAULT            = 0;   // set to indicate default behavior
476   {$EXTERNALSYM INSTALLTYPE_DEFAULT}
477   INSTALLTYPE_NETWORK_IMAGE      = 1;   // set to indicate network install
478   {$EXTERNALSYM INSTALLTYPE_NETWORK_IMAGE}
479   INSTALLTYPE_SINGLE_INSTANCE    = 2;   // set to indicate a particular instance
480   {$EXTERNALSYM INSTALLTYPE_SINGLE_INSTANCE}
481 
482 type
483   INSTALLTYPE = DWORD;
484   {$EXTERNALSYM INSTALLTYPE}
485   TInstallType = INSTALLTYPE;
486 
487 type
488   _MSIFILEHASHINFO = record
489     dwFileHashInfoSize: ULONG;
490     dwData: array [0..3] of ULONG;
491   end;
492   {$EXTERNALSYM _MSIFILEHASHINFO}
493   MSIFILEHASHINFO = _MSIFILEHASHINFO;
494   {$EXTERNALSYM MSIFILEHASHINFO}
495   PMSIFILEHASHINFO = ^MSIFILEHASHINFO;
496   {$EXTERNALSYM PMSIFILEHASHINFO}
497   TMsiFileHashInfo = MSIFILEHASHINFO;
498 
499 const
500   MSIARCHITECTUREFLAGS_X86   = $00000001; // set if creating the script for i386 platform
501   {$EXTERNALSYM MSIARCHITECTUREFLAGS_X86}
502   MSIARCHITECTUREFLAGS_IA64  = $00000002; // set if creating the script for IA64 platform
503   {$EXTERNALSYM MSIARCHITECTUREFLAGS_IA64}
504   MSIARCHITECTUREFLAGS_AMD64 = $00000004; // set if creating the script for AMD64 platform
505   {$EXTERNALSYM MSIARCHITECTUREFLAGS_AMD64}
506 
507 type
508   MSIARCHITECTUREFLAGS = DWORD;
509   {$EXTERNALSYM MSIARCHITECTUREFLAGS}
510   TMsiArchitectureFlags = MSIARCHITECTUREFLAGS;
511 
512 const
513   MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = $00000001; // ignore the machine state when creating the engine
514   {$EXTERNALSYM MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE}
515 
516 type
517   MSIOPENPACKAGEFLAGS = DWORD;
518   {$EXTERNALSYM MSIOPENPACKAGEFLAGS}
519   TMsiOpenPackageFlags = MSIOPENPACKAGEFLAGS;
520 
521 const
522   MSIADVERTISEOPTIONFLAGS_INSTANCE = $00000001; // set if advertising a new instance
523   {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS_INSTANCE}
524 
525 type
526   tagMSIADVERTISEOPTIONFLAGS = DWORD;
527   {$EXTERNALSYM tagMSIADVERTISEOPTIONFLAGS}
528   MSIADVERTISEOPTIONFLAGS = tagMSIADVERTISEOPTIONFLAGS;
529   {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS}
530   TMsiAdvertiseOptionFlags = MSIADVERTISEOPTIONFLAGS;
531 
532 // --------------------------------------------------------------------------
533 // Functions to set the UI handling and logging. The UI will be used for error,
534 // progress, and log messages for all subsequent calls to Installer Service
535 // API functions that require UI.
536 // --------------------------------------------------------------------------
537 
538 // Enable internal UI
539 
MsiSetInternalUInull540 function MsiSetInternalUI(dwUILevel: INSTALLUILEVEL; phWnd: LPHWND): INSTALLUILEVEL; stdcall;
541 {$EXTERNALSYM MsiSetInternalUI}
542 
543 // Enable external UI handling, returns any previous handler or NULL if none.
544 // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
545 
MsiSetExternalUIAnull546 function MsiSetExternalUIA(puiHandler: INSTALLUI_HANDLERA; dwMessageFilter: DWORD;
547   pvContext: LPVOID): INSTALLUI_HANDLERA; stdcall;
548 {$EXTERNALSYM MsiSetExternalUIA}
MsiSetExternalUIWnull549 function MsiSetExternalUIW(puiHandler: INSTALLUI_HANDLERW; dwMessageFilter: DWORD;
550   pvContext: LPVOID): INSTALLUI_HANDLERW; stdcall;
551 {$EXTERNALSYM MsiSetExternalUIW}
MsiSetExternalUInull552 function MsiSetExternalUI(puiHandler: INSTALLUI_HANDLER; dwMessageFilter: DWORD;
553   pvContext: LPVOID): INSTALLUI_HANDLER; stdcall;
554 {$EXTERNALSYM MsiSetExternalUI}
555 
556 // Enable logging to a file for all install sessions for the client process,
557 // with control over which log messages are passed to the specified log file.
558 // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
559 
MsiEnableLogAnull560 function MsiEnableLogA(dwLogMode: DWORD; szLogFile: LPCSTR; dwLogAttributes: DWORD): UINT; stdcall;
561 {$EXTERNALSYM MsiEnableLogA}
MsiEnableLogWnull562 function MsiEnableLogW(dwLogMode: DWORD; szLogFile: LPCWSTR; dwLogAttributes: DWORD): UINT; stdcall;
563 {$EXTERNALSYM MsiEnableLogW}
MsiEnableLognull564 function MsiEnableLog(dwLogMode: DWORD; szLogFile: LPCTSTR; dwLogAttributes: DWORD): UINT; stdcall;
565 {$EXTERNALSYM MsiEnableLog}
566 
567 // --------------------------------------------------------------------------
568 // Functions to query and configure a product as a whole.
569 // --------------------------------------------------------------------------
570 
571 // Return the installed state for a product
572 
MsiQueryProductStateAnull573 function MsiQueryProductStateA(szProduct: LPCSTR): INSTALLSTATE; stdcall;
574 {$EXTERNALSYM MsiQueryProductStateA}
MsiQueryProductStateWnull575 function MsiQueryProductStateW(szProduct: LPCWSTR): INSTALLSTATE; stdcall;
576 {$EXTERNALSYM MsiQueryProductStateW}
MsiQueryProductStatenull577 function MsiQueryProductState(szProduct: LPCTSTR): INSTALLSTATE; stdcall;
578 {$EXTERNALSYM MsiQueryProductState}
579 
580 // Return product info
581 
MsiGetProductInfoAnull582 function MsiGetProductInfoA(szProduct: LPCSTR; szAttribute: LPCSTR;
583   lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
584 {$EXTERNALSYM MsiGetProductInfoA}
MsiGetProductInfoWnull585 function MsiGetProductInfoW(szProduct: LPCWSTR; szAttribute: LPCWSTR;
586   lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
587 {$EXTERNALSYM MsiGetProductInfoW}
MsiGetProductInfonull588 function MsiGetProductInfo(szProduct: LPCTSTR; szAttribute: LPCTSTR;
589   lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
590 {$EXTERNALSYM MsiGetProductInfo}
591 
592 // Install a new product.
593 // Either may be NULL, but the DATABASE property must be specfied
594 
MsiInstallProductAnull595 function MsiInstallProductA(szPackagePath: LPCSTR; szCommandLine: LPCSTR): UINT; stdcall;
596 {$EXTERNALSYM MsiInstallProductA}
MsiInstallProductWnull597 function MsiInstallProductW(szPackagePath: LPCWSTR; szCommandLine: LPCWSTR): UINT; stdcall;
598 {$EXTERNALSYM MsiInstallProductW}
MsiInstallProductnull599 function MsiInstallProduct(szPackagePath: LPCTSTR; szCommandLine: LPCTSTR): UINT; stdcall;
600 {$EXTERNALSYM MsiInstallProduct}
601 
602 // Install/uninstall an advertised or installed product
603 // No action if installed and INSTALLSTATE_DEFAULT specified
604 
MsiConfigureProductAnull605 function MsiConfigureProductA(szProduct: LPCSTR; iInstallLevel: Integer;
606   eInstallState: INSTALLSTATE): UINT; stdcall;
607 {$EXTERNALSYM MsiConfigureProductA}
MsiConfigureProductWnull608 function MsiConfigureProductW(szProduct: LPCWSTR; iInstallLevel: Integer;
609   eInstallState: INSTALLSTATE): UINT; stdcall;
610 {$EXTERNALSYM MsiConfigureProductW}
MsiConfigureProductnull611 function MsiConfigureProduct(szProduct: LPCTSTR; iInstallLevel: Integer;
612   eInstallState: INSTALLSTATE): UINT; stdcall;
613 {$EXTERNALSYM MsiConfigureProduct}
614 
615 // Install/uninstall an advertised or installed product
616 // No action if installed and INSTALLSTATE_DEFAULT specified
617 
MsiConfigureProductExAnull618 function MsiConfigureProductExA(szProduct: LPCSTR; iInstallLevel: Integer;
619   eInstallState: INSTALLSTATE; szCommandLine: LPCSTR): UINT; stdcall;
620 {$EXTERNALSYM MsiConfigureProductExA}
MsiConfigureProductExWnull621 function MsiConfigureProductExW(szProduct: LPCWSTR; iInstallLevel: Integer;
622   eInstallState: INSTALLSTATE; szCommandLine: LPCWSTR): UINT; stdcall;
623 {$EXTERNALSYM MsiConfigureProductExW}
MsiConfigureProductExnull624 function MsiConfigureProductEx(szProduct: LPCTSTR; iInstallLevel: Integer;
625   eInstallState: INSTALLSTATE; szCommandLine: LPCTSTR): UINT; stdcall;
626 {$EXTERNALSYM MsiConfigureProductEx}
627 
628 // Reinstall product, used to validate or correct problems
629 
MsiReinstallProductAnull630 function MsiReinstallProductA(szProduct: LPCSTR; szReinstallMode: DWORD): UINT; stdcall;
631 {$EXTERNALSYM MsiReinstallProductA}
MsiReinstallProductWnull632 function MsiReinstallProductW(szProduct: LPCWSTR; szReinstallMode: DWORD): UINT; stdcall;
633 {$EXTERNALSYM MsiReinstallProductW}
MsiReinstallProductnull634 function MsiReinstallProduct(szProduct: LPCTSTR; szReinstallMode: DWORD): UINT; stdcall;
635 {$EXTERNALSYM MsiReinstallProduct}
636 
637 // Output reg and shortcut info to script file for specified architecture for Assign or Publish
638 // If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
639 // If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
640 //    this option requires that szTransforms include the instance transform that changes the product code
641 
MsiAdvertiseProductExAnull642 function MsiAdvertiseProductExA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID;
643   dwPlatform, dwOptions: DWORD): UINT; stdcall;
644 {$EXTERNALSYM MsiAdvertiseProductExA}
MsiAdvertiseProductExWnull645 function MsiAdvertiseProductExW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID;
646   dwPlatform, dwOptions: DWORD): UINT; stdcall;
647 {$EXTERNALSYM MsiAdvertiseProductExW}
MsiAdvertiseProductExnull648 function MsiAdvertiseProductEx(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID;
649   dwPlatform, dwOptions: DWORD): UINT; stdcall;
650 {$EXTERNALSYM MsiAdvertiseProductEx}
651 
652 // Output reg and shortcut info to script file for Assign or Publish
653 
MsiAdvertiseProductAnull654 function MsiAdvertiseProductA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID): UINT; stdcall;
655 {$EXTERNALSYM MsiAdvertiseProductA}
MsiAdvertiseProductWnull656 function MsiAdvertiseProductW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID): UINT; stdcall;
657 {$EXTERNALSYM MsiAdvertiseProductW}
MsiAdvertiseProductnull658 function MsiAdvertiseProduct(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID): UINT; stdcall;
659 {$EXTERNALSYM MsiAdvertiseProduct}
660 
661 // Process advertise script file into supplied locations
662 // If an icon folder is specified, icon files will be placed there
663 // If an registry key is specified, registry data will be mapped under it
664 // If fShortcuts is TRUE, shortcuts will be created. If a special folder is
665 //    returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
666 // if fRemoveItems is TRUE, items that are present will be removed
667 
MsiProcessAdvertiseScriptAnull668 function MsiProcessAdvertiseScriptA(szScriptFile, szIconFolder: LPCSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
669 {$EXTERNALSYM MsiProcessAdvertiseScriptA}
MsiProcessAdvertiseScriptWnull670 function MsiProcessAdvertiseScriptW(szScriptFile, szIconFolder: LPCWSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
671 {$EXTERNALSYM MsiProcessAdvertiseScriptW}
MsiProcessAdvertiseScriptnull672 function MsiProcessAdvertiseScript(szScriptFile, szIconFolder: LPCTSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
673 {$EXTERNALSYM MsiProcessAdvertiseScript}
674 
675 // Process advertise script file using the supplied dwFlags control flags
676 // if fRemoveItems is TRUE, items that are present will be removed
677 
MsiAdvertiseScriptAnull678 function MsiAdvertiseScriptA(szScriptFile: LPCSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
679 {$EXTERNALSYM MsiAdvertiseScriptA}
MsiAdvertiseScriptWnull680 function MsiAdvertiseScriptW(szScriptFile: LPCWSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
681 {$EXTERNALSYM MsiAdvertiseScriptW}
MsiAdvertiseScriptnull682 function MsiAdvertiseScript(szScriptFile: LPCTSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
683 {$EXTERNALSYM MsiAdvertiseScript}
684 
685 // Return product info from an installer script file:
686 //   product code, language, version, readable name, path to package
687 // Returns TRUE is success, FALSE if szScriptFile is not a valid script file
688 
MsiGetProductInfoFromScriptAnull689 function MsiGetProductInfoFromScriptA(szScriptFile: LPCSTR; lpProductBuf39: LPSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
690   lpNameBuf: LPSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
691 {$EXTERNALSYM MsiGetProductInfoFromScriptA}
MsiGetProductInfoFromScriptWnull692 function MsiGetProductInfoFromScriptW(szScriptFile: LPCWSTR; lpProductBuf39: LPWSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
693   lpNameBuf: LPWSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPWSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
694 {$EXTERNALSYM MsiGetProductInfoFromScriptW}
MsiGetProductInfoFromScriptnull695 function MsiGetProductInfoFromScript(szScriptFile: LPCTSTR; lpProductBuf39: LPTSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
696   lpNameBuf: LPTSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPTSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
697 {$EXTERNALSYM MsiGetProductInfoFromScript}
698 
699 // Return the product code for a registered component, called once by apps
700 
MsiGetProductCodeAnull701 function MsiGetProductCodeA(szComponent: LPCSTR; lpBuf39: LPSTR): UINT; stdcall;
702 {$EXTERNALSYM MsiGetProductCodeA}
MsiGetProductCodeWnull703 function MsiGetProductCodeW(szComponent: LPCWSTR; lpBuf39: LPWSTR): UINT; stdcall;
704 {$EXTERNALSYM MsiGetProductCodeW}
MsiGetProductCodenull705 function MsiGetProductCode(szComponent: LPCTSTR; lpBuf39: LPTSTR): UINT; stdcall;
706 {$EXTERNALSYM MsiGetProductCode}
707 
708 // Return the registered user information for an installed product
709 
MsiGetUserInfoAnull710 function MsiGetUserInfoA(szProduct: LPCSTR; lpUserNameBuf: LPSTR;
711   var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPSTR; var pcchOrgNameBuf: DWORD;
712   lpSerialBuf: LPSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
713 {$EXTERNALSYM MsiGetUserInfoA}
MsiGetUserInfoWnull714 function MsiGetUserInfoW(szProduct: LPCWSTR; lpUserNameBuf: LPWSTR;
715   var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPWSTR; var pcchOrgNameBuf: DWORD;
716   lpSerialBuf: LPWSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
717 {$EXTERNALSYM MsiGetUserInfoW}
MsiGetUserInfonull718 function MsiGetUserInfo(szProduct: LPCTSTR; lpUserNameBuf: LPTSTR;
719   var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPTSTR; var pcchOrgNameBuf: DWORD;
720   lpSerialBuf: LPTSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
721 {$EXTERNALSYM MsiGetUserInfo}
722 
723 // Obtain and store user info and PID from installation wizard (first run)
724 
MsiCollectUserInfoAnull725 function MsiCollectUserInfoA(szProduct: LPCSTR): UINT; stdcall;
726 {$EXTERNALSYM MsiCollectUserInfoA}
MsiCollectUserInfoWnull727 function MsiCollectUserInfoW(szProduct: LPCWSTR): UINT; stdcall;
728 {$EXTERNALSYM MsiCollectUserInfoW}
MsiCollectUserInfonull729 function MsiCollectUserInfo(szProduct: LPCTSTR): UINT; stdcall;
730 {$EXTERNALSYM MsiCollectUserInfo}
731 
732 // --------------------------------------------------------------------------
733 // Functions to patch existing products
734 // --------------------------------------------------------------------------
735 
736 // Patch all possible installed products.
737 
MsiApplyPatchAnull738 function MsiApplyPatchA(szPatchPackage: LPCSTR; szInstallPackage: LPCSTR;
739   eInstallType: INSTALLTYPE; szCommandLine: LPCSTR): UINT; stdcall;
740 {$EXTERNALSYM MsiApplyPatchA}
MsiApplyPatchWnull741 function MsiApplyPatchW(szPatchPackage: LPCWSTR; szInstallPackage: LPCWSTR;
742   eInstallType: INSTALLTYPE; szCommandLine: LPCWSTR): UINT; stdcall;
743 {$EXTERNALSYM MsiApplyPatchW}
MsiApplyPatchnull744 function MsiApplyPatch(szPatchPackage: LPCTSTR; szInstallPackage: LPCTSTR;
745   eInstallType: INSTALLTYPE; szCommandLine: LPCTSTR): UINT; stdcall;
746 {$EXTERNALSYM MsiApplyPatch}
747 
748 // Return patch info
749 
MsiGetPatchInfoAnull750 function MsiGetPatchInfoA(szPatch: LPCSTR; szAttribute: LPCSTR;
751   lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
752 {$EXTERNALSYM MsiGetPatchInfoA}
MsiGetPatchInfoWnull753 function MsiGetPatchInfoW(szPatch: LPCWSTR; szAttribute: LPCWSTR;
754   lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
755 {$EXTERNALSYM MsiGetPatchInfoW}
MsiGetPatchInfonull756 function MsiGetPatchInfo(szPatch: LPCTSTR; szAttribute: LPCTSTR;
757   lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
758 {$EXTERNALSYM MsiGetPatchInfo}
759 
760 // Enumerate all patches for a product
761 
MsiEnumPatchesAnull762 function MsiEnumPatchesA(szProduct: LPCSTR; iPatchIndex: DWORD; lpPatchBuf: LPSTR;
763   lpTransformsBuf: LPSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
764 {$EXTERNALSYM MsiEnumPatchesA}
MsiEnumPatchesWnull765 function MsiEnumPatchesW(szProduct: LPCWSTR; iPatchIndex: DWORD; lpPatchBuf: LPWSTR;
766   lpTransformsBuf: LPWSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
767 {$EXTERNALSYM MsiEnumPatchesW}
MsiEnumPatchesnull768 function MsiEnumPatches(szProduct: LPCTSTR; iPatchIndex: DWORD; lpPatchBuf: LPTSTR;
769   lpTransformsBuf: LPTSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
770 {$EXTERNALSYM MsiEnumPatches}
771 
772 // --------------------------------------------------------------------------
773 // Functions to query and configure a feature within a product.
774 // --------------------------------------------------------------------------
775 
776 // Return the installed state for a product feature
777 
MsiQueryFeatureStateAnull778 function MsiQueryFeatureStateA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
779 {$EXTERNALSYM MsiQueryFeatureStateA}
MsiQueryFeatureStateWnull780 function MsiQueryFeatureStateW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
781 {$EXTERNALSYM MsiQueryFeatureStateW}
MsiQueryFeatureStatenull782 function MsiQueryFeatureState(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
783 {$EXTERNALSYM MsiQueryFeatureState}
784 
785 // Indicate intent to use a product feature, increments usage count
786 // Prompts for CD if not loaded, does not install feature
787 
MsiUseFeatureAnull788 function MsiUseFeatureA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
789 {$EXTERNALSYM MsiUseFeatureA}
MsiUseFeatureWnull790 function MsiUseFeatureW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
791 {$EXTERNALSYM MsiUseFeatureW}
MsiUseFeaturenull792 function MsiUseFeature(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
793 {$EXTERNALSYM MsiUseFeature}
794 
795 // Indicate intent to use a product feature, increments usage count
796 // Prompts for CD if not loaded, does not install feature
797 // Allows for bypassing component detection where performance is critical
798 
MsiUseFeatureExAnull799 function MsiUseFeatureExA(szProduct: LPCSTR; szFeature: LPCSTR;
800   dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
801 {$EXTERNALSYM MsiUseFeatureExA}
MsiUseFeatureExWnull802 function MsiUseFeatureExW(szProduct: LPCWSTR; szFeature: LPCWSTR; dwInstallMode: DWORD;
803   dwReserved: DWORD): INSTALLSTATE; stdcall;
804 {$EXTERNALSYM MsiUseFeatureExW}
MsiUseFeatureExnull805 function MsiUseFeatureEx(szProduct: LPCTSTR; szFeature: LPCTSTR;
806   dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
807 {$EXTERNALSYM MsiUseFeatureEx}
808 
809 // Return the usage metrics for a product feature
810 
MsiGetFeatureUsageAnull811 function MsiGetFeatureUsageA(szProduct: LPCSTR; szFeature: LPCSTR;
812   var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
813 {$EXTERNALSYM MsiGetFeatureUsageA}
MsiGetFeatureUsageWnull814 function MsiGetFeatureUsageW(szProduct: LPCWSTR; szFeature: LPCWSTR;
815   var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
816 {$EXTERNALSYM MsiGetFeatureUsageW}
MsiGetFeatureUsagenull817 function MsiGetFeatureUsage(szProduct: LPCTSTR; szFeature: LPCTSTR;
818   var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
819 {$EXTERNALSYM MsiGetFeatureUsage}
820 
821 // Force the installed state for a product feature
822 
MsiConfigureFeatureAnull823 function MsiConfigureFeatureA(szProduct, szFeature: LPCSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
824 {$EXTERNALSYM MsiConfigureFeatureA}
MsiConfigureFeatureWnull825 function MsiConfigureFeatureW(szProduct, szFeature: LPCWSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
826 {$EXTERNALSYM MsiConfigureFeatureW}
MsiConfigureFeaturenull827 function MsiConfigureFeature(szProduct, szFeature: LPCTSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
828 {$EXTERNALSYM MsiConfigureFeature}
829 
830 // Reinstall feature, used to validate or correct problems
831 
MsiReinstallFeatureAnull832 function MsiReinstallFeatureA(szProduct, szFeature: LPCSTR; dwReinstallMode: DWORD): UINT; stdcall;
833 {$EXTERNALSYM MsiReinstallFeatureA}
MsiReinstallFeatureWnull834 function MsiReinstallFeatureW(szProduct, szFeature: LPCWSTR; dwReinstallMode: DWORD): UINT; stdcall;
835 {$EXTERNALSYM MsiReinstallFeatureW}
MsiReinstallFeaturenull836 function MsiReinstallFeature(szProduct, szFeature: LPCTSTR; dwReinstallMode: DWORD): UINT; stdcall;
837 {$EXTERNALSYM MsiReinstallFeature}
838 
839 // --------------------------------------------------------------------------
840 // Functions to return a path to a particular component.
841 // The state of the feature being used should have been checked previously.
842 // --------------------------------------------------------------------------
843 
844 // Return full component path, performing any necessary installation
845 // calls MsiQueryFeatureState to detect that all components are installed
846 // then calls MsiConfigureFeature if any of its components are uninstalled
847 // then calls MsiLocateComponent to obtain the path the its key file
848 
MsiProvideComponentAnull849 function MsiProvideComponentA(szProduct: LPCSTR; szFeature: LPCSTR; szComponent: LPCSTR;
850   dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
851 {$EXTERNALSYM MsiProvideComponentA}
MsiProvideComponentWnull852 function MsiProvideComponentW(szProduct: LPCWSTR; szFeature: LPCWSTR; szComponent: LPCWSTR;
853   dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
854 {$EXTERNALSYM MsiProvideComponentW}
MsiProvideComponentnull855 function MsiProvideComponent(szProduct: LPCTSTR; szFeature: LPCTSTR; szComponent: LPCTSTR;
856   dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
857 {$EXTERNALSYM MsiProvideComponent}
858 
859 // Return full component path for a qualified component, performing any necessary installation.
860 // Prompts for source if necessary and increments the usage count for the feature.
861 
MsiProvideQualifiedComponentAnull862 function MsiProvideQualifiedComponentA(szCategory: LPCSTR; szQualifier: LPCSTR;
863   dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
864 {$EXTERNALSYM MsiProvideQualifiedComponentA}
MsiProvideQualifiedComponentWnull865 function MsiProvideQualifiedComponentW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
866   dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
867 {$EXTERNALSYM MsiProvideQualifiedComponentW}
MsiProvideQualifiedComponentnull868 function MsiProvideQualifiedComponent(szCategory: LPCTSTR; szQualifier: LPCTSTR;
869   dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
870 {$EXTERNALSYM MsiProvideQualifiedComponent}
871 
872 // Return full component path for a qualified component, performing any necessary installation.
873 // Prompts for source if necessary and increments the usage count for the feature.
874 // The szProduct parameter specifies the product to match that has published the qualified
875 // component. If null, this API works the same as MsiProvideQualifiedComponent.
876 
MsiProvideQualifiedComponentExAnull877 function MsiProvideQualifiedComponentExA(szCategory: LPCSTR; szQualifier: LPCSTR;
878   dwInstallMode: DWORD; szProduct: LPCSTR; dwUnused1: DWORD; dwUnused2: DWORD;
879   lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
880 {$EXTERNALSYM MsiProvideQualifiedComponentExA}
MsiProvideQualifiedComponentExWnull881 function MsiProvideQualifiedComponentExW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
882   dwInstallMode: DWORD; szProduct: LPCWSTR; dwUnused1: DWORD; dwUnused2: DWORD;
883   lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
884 {$EXTERNALSYM MsiProvideQualifiedComponentExW}
MsiProvideQualifiedComponentExnull885 function MsiProvideQualifiedComponentEx(szCategory: LPCTSTR; szQualifier: LPCTSTR;
886   dwInstallMode: DWORD; szProduct: LPCTSTR; dwUnused1: DWORD; dwUnused2: DWORD;
887   lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
888 {$EXTERNALSYM MsiProvideQualifiedComponentEx}
889 
890 // Return full path to an installed component
891 
MsiGetComponentPathAnull892 function MsiGetComponentPathA(szProduct: LPCSTR; szComponent: LPCSTR;
893   lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
894 {$EXTERNALSYM MsiGetComponentPathA}
MsiGetComponentPathWnull895 function MsiGetComponentPathW(szProduct: LPCWSTR; szComponent: LPCWSTR;
896   lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
897 {$EXTERNALSYM MsiGetComponentPathW}
MsiGetComponentPathnull898 function MsiGetComponentPath(szProduct: LPCTSTR; szComponent: LPCTSTR;
899   lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
900 {$EXTERNALSYM MsiGetComponentPath}
901 
902 const
903   MSIASSEMBLYINFO_NETASSEMBLY   = 0; // Net assemblies
904   {$EXTERNALSYM MSIASSEMBLYINFO_NETASSEMBLY}
905   MSIASSEMBLYINFO_WIN32ASSEMBLY = 1; // Win32 assemblies
906   {$EXTERNALSYM MSIASSEMBLYINFO_WIN32ASSEMBLY}
907 
908 // Return full component path for an assembly installed via the WI, performing any necessary installation.
909 // Prompts for source if necessary and increments the usage count for the feature.
910 // The szAssemblyName parameter specifies the stringized assembly name.
911 // The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
912 // has been privatised to, which is null for global assemblies
913 
MsiProvideAssemblyAnull914 function MsiProvideAssemblyA(szAssemblyName, szAppContext: LPCSTR; dwInstallMode, dwAssemblyInfo: DWORD;
915   lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
916 {$EXTERNALSYM MsiProvideAssemblyA}
MsiProvideAssemblyWnull917 function MsiProvideAssemblyW(szAssemblyName, szAppContext: LPCWSTR; dwInstallMode, dwAssemblyInfo: DWORD;
918   lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
919 {$EXTERNALSYM MsiProvideAssemblyW}
MsiProvideAssemblynull920 function MsiProvideAssembly(szAssemblyName, szAppContext: LPCTSTR; dwInstallMode, dwAssemblyInfo: DWORD;
921   lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
922 {$EXTERNALSYM MsiProvideAssembly}
923 
924 // --------------------------------------------------------------------------
925 // Functions to iterate registered products, features, and components.
926 // As with reg keys, they accept a 0-based index into the enumeration.
927 // --------------------------------------------------------------------------
928 
929 // Enumerate the registered products, either installed or advertised
930 
MsiEnumProductsAnull931 function MsiEnumProductsA(iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
932 {$EXTERNALSYM MsiEnumProductsA}
MsiEnumProductsWnull933 function MsiEnumProductsW(iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
934 {$EXTERNALSYM MsiEnumProductsW}
MsiEnumProductsnull935 function MsiEnumProducts(iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
936 {$EXTERNALSYM MsiEnumProducts}
937 
938 {$IFDEF MSI110}
939 
940 // Enumerate products with given upgrade code
941 
MsiEnumRelatedProductsAnull942 function MsiEnumRelatedProductsA(lpUpgradeCode: LPCSTR; dwReserved: DWORD;
943   iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
944 {$EXTERNALSYM MsiEnumRelatedProductsA}
MsiEnumRelatedProductsWnull945 function MsiEnumRelatedProductsW(lpUpgradeCode: LPCWSTR; dwReserved: DWORD;
946   iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
947 {$EXTERNALSYM MsiEnumRelatedProductsW}
MsiEnumRelatedProductsnull948 function MsiEnumRelatedProducts(lpUpgradeCode: LPCTSTR; dwReserved: DWORD;
949   iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
950 {$EXTERNALSYM MsiEnumRelatedProducts}
951 
952 {$ENDIF MSI110}
953 
954 // Enumerate the advertised features for a given product.
955 // If parent is not required, supplying NULL will improve performance.
956 
MsiEnumFeaturesAnull957 function MsiEnumFeaturesA(szProduct: LPCSTR; iFeatureIndex: DWORD;
958   lpFeatureBuf: LPSTR; lpParentBuf: LPSTR): UINT; stdcall;
959 {$EXTERNALSYM MsiEnumFeaturesA}
MsiEnumFeaturesWnull960 function MsiEnumFeaturesW(szProduct: LPCWSTR; iFeatureIndex: DWORD;
961   lpFeatureBuf: LPWSTR; lpParentBuf: LPWSTR): UINT; stdcall;
962 {$EXTERNALSYM MsiEnumFeaturesW}
MsiEnumFeaturesnull963 function MsiEnumFeatures(szProduct: LPCTSTR; iFeatureIndex: DWORD;
964   lpFeatureBuf: LPTSTR; lpParentBuf: LPTSTR): UINT; stdcall;
965 {$EXTERNALSYM MsiEnumFeatures}
966 
967 // Enumerate the installed components for all products
968 
MsiEnumComponentsAnull969 function MsiEnumComponentsA(iComponentIndex: DWORD; lpComponentBuf: LPSTR): UINT; stdcall;
970 {$EXTERNALSYM MsiEnumComponentsA}
MsiEnumComponentsWnull971 function MsiEnumComponentsW(iComponentIndex: DWORD; lpComponentBuf: LPWSTR): UINT; stdcall;
972 {$EXTERNALSYM MsiEnumComponentsW}
MsiEnumComponentsnull973 function MsiEnumComponents(iComponentIndex: DWORD; lpComponentBuf: LPTSTR): UINT; stdcall;
974 {$EXTERNALSYM MsiEnumComponents}
975 
976 // Enumerate the client products for a component
977 
MsiEnumClientsAnull978 function MsiEnumClientsA(szComponent: LPCSTR; iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
979 {$EXTERNALSYM MsiEnumClientsA}
MsiEnumClientsWnull980 function MsiEnumClientsW(szComponent: LPCWSTR; iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
981 {$EXTERNALSYM MsiEnumClientsW}
MsiEnumClientsnull982 function MsiEnumClients(szComponent: LPCTSTR; iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
983 {$EXTERNALSYM MsiEnumClients}
984 
985 // Enumerate the qualifiers for an advertised component.
986 
MsiEnumComponentQualifiersAnull987 function MsiEnumComponentQualifiersA(szComponent: LPCSTR; iIndex: DWORD;
988   lpQualifierBuf: LPSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPSTR;
989   pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
990 {$EXTERNALSYM MsiEnumComponentQualifiersA}
MsiEnumComponentQualifiersWnull991 function MsiEnumComponentQualifiersW(szComponent: LPCWSTR; iIndex: DWORD;
992   lpQualifierBuf: LPWSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPWSTR;
993   pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
994 {$EXTERNALSYM MsiEnumComponentQualifiersW}
MsiEnumComponentQualifiersnull995 function MsiEnumComponentQualifiers(szComponent: LPCTSTR; iIndex: DWORD;
996   lpQualifierBuf: LPTSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPTSTR;
997   pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
998 {$EXTERNALSYM MsiEnumComponentQualifiers}
999 
1000 // --------------------------------------------------------------------------
1001 // Functions to obtain product or package information.
1002 // --------------------------------------------------------------------------
1003 
1004 // Open the installation for a product to obtain detailed information
1005 
MsiOpenProductAnull1006 function MsiOpenProductA(szProduct: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1007 {$EXTERNALSYM MsiOpenProductA}
MsiOpenProductWnull1008 function MsiOpenProductW(szProduct: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1009 {$EXTERNALSYM MsiOpenProductW}
MsiOpenProductnull1010 function MsiOpenProduct(szProduct: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1011 {$EXTERNALSYM MsiOpenProduct}
1012 
1013 // Open a product package in order to access product properties
1014 
MsiOpenPackageAnull1015 function MsiOpenPackageA(szPackagePath: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1016 {$EXTERNALSYM MsiOpenPackageA}
MsiOpenPackageWnull1017 function MsiOpenPackageW(szPackagePath: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1018 {$EXTERNALSYM MsiOpenPackageW}
MsiOpenPackagenull1019 function MsiOpenPackage(szPackagePath: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
1020 {$EXTERNALSYM MsiOpenPackage}
1021 
1022 // Open a product package in order to access product properties
1023 // Option to create a "safe" engine that does not look at machine state
1024 //  and does not allow for modification of machine state
1025 
MsiOpenPackageExAnull1026 function MsiOpenPackageExA(szPackagePath: LPCSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
1027 {$EXTERNALSYM MsiOpenPackageExA}
MsiOpenPackageExWnull1028 function MsiOpenPackageExW(szPackagePath: LPCWSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
1029 {$EXTERNALSYM MsiOpenPackageExW}
MsiOpenPackageExnull1030 function MsiOpenPackageEx(szPackagePath: LPCTSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
1031 {$EXTERNALSYM MsiOpenPackageEx}
1032 
1033 // Provide the value for an installation property.
1034 
MsiGetProductPropertyAnull1035 function MsiGetProductPropertyA(hProduct: MSIHANDLE; szProperty: LPCSTR;
1036   lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
1037 {$EXTERNALSYM MsiGetProductPropertyA}
MsiGetProductPropertyWnull1038 function MsiGetProductPropertyW(hProduct: MSIHANDLE; szProperty: LPCWSTR;
1039   lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
1040 {$EXTERNALSYM MsiGetProductPropertyW}
MsiGetProductPropertynull1041 function MsiGetProductProperty(hProduct: MSIHANDLE; szProperty: LPCTSTR;
1042   lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
1043 {$EXTERNALSYM MsiGetProductProperty}
1044 
1045 // Determine whether a file is a package
1046 // Returns ERROR_SUCCESS if file is a package.
1047 
MsiVerifyPackageAnull1048 function MsiVerifyPackageA(szPackagePath: LPCSTR): UINT; stdcall;
1049 {$EXTERNALSYM MsiVerifyPackageA}
MsiVerifyPackageWnull1050 function MsiVerifyPackageW(szPackagePath: LPCWSTR): UINT; stdcall;
1051 {$EXTERNALSYM MsiVerifyPackageW}
MsiVerifyPackagenull1052 function MsiVerifyPackage(szPackagePath: LPCTSTR): UINT; stdcall;
1053 {$EXTERNALSYM MsiVerifyPackage}
1054 
1055 // Provide descriptive information for product feature: title and description.
1056 // Returns the install level for the feature, or -1 if feature is unknown.
1057 //   0 = feature is not available on this machine
1058 //   1 = highest priority, feature installed if parent is installed
1059 //  >1 = decreasing priority, feature installation based on InstallLevel property
1060 
MsiGetFeatureInfoAnull1061 function MsiGetFeatureInfoA(hProduct: MSIHANDLE; szFeature: LPCSTR; var lpAttributes: DWORD;
1062   lpTitleBuf: LPSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
1063 {$EXTERNALSYM MsiGetFeatureInfoA}
MsiGetFeatureInfoWnull1064 function MsiGetFeatureInfoW(hProduct: MSIHANDLE; szFeature: LPCWSTR; var lpAttributes: DWORD;
1065   lpTitleBuf: LPWSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPWSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
1066 {$EXTERNALSYM MsiGetFeatureInfoW}
MsiGetFeatureInfonull1067 function MsiGetFeatureInfo(hProduct: MSIHANDLE; szFeature: LPCTSTR; var lpAttributes: DWORD;
1068   lpTitleBuf: LPTSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPTSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
1069 {$EXTERNALSYM MsiGetFeatureInfo}
1070 
1071 // --------------------------------------------------------------------------
1072 // Functions to access or install missing components and files.
1073 // These should be used as a last resort.
1074 // --------------------------------------------------------------------------
1075 
1076 // Install a component unexpectedly missing, provided only for error recovery
1077 // This would typically occur due to failue to establish feature availability
1078 // The product feature having the smallest incremental cost is installed
1079 
MsiInstallMissingComponentAnull1080 function MsiInstallMissingComponentA(szProduct: LPCSTR; szComponent: LPCSTR;
1081   eInstallState: INSTALLSTATE): UINT; stdcall;
1082 {$EXTERNALSYM MsiInstallMissingComponentA}
MsiInstallMissingComponentWnull1083 function MsiInstallMissingComponentW(szProduct: LPCWSTR; szComponent: LPCWSTR;
1084   eInstallState: INSTALLSTATE): UINT; stdcall;
1085 {$EXTERNALSYM MsiInstallMissingComponentW}
MsiInstallMissingComponentnull1086 function MsiInstallMissingComponent(szProduct: LPCTSTR; szComponent: LPCTSTR;
1087   eInstallState: INSTALLSTATE): UINT; stdcall;
1088 {$EXTERNALSYM MsiInstallMissingComponent}
1089 
1090 // Install a file unexpectedly missing, provided only for error recovery
1091 // This would typically occur due to failue to establish feature availability
1092 // The missing component is determined from the product's File table, then
1093 // the product feature having the smallest incremental cost is installed
1094 
1095 function MsiInstallMissingFileA(szProduct: LPCSTR; szFile: LPCSTR): UINT; stdcall;
1096 {$EXTERNALSYM MsiInstallMissingFileA}
1097 function MsiInstallMissingFileW(szProduct: LPCWSTR; szFile: LPCWSTR): UINT; stdcall;
1098 {$EXTERNALSYM MsiInstallMissingFileW}
1099 function MsiInstallMissingFile(szProduct: LPCTSTR; szFile: LPCTSTR): UINT; stdcall;
1100 {$EXTERNALSYM MsiInstallMissingFile}
1101 
1102 // Return full path to an installed component without a product code
1103 // This function attempts to determine the product using MsiGetProductCode
1104 // but is not guaranteed to find the correct product for the caller.
1105 // MsiGetComponentPath should always be called when possible.
1106 
1107 function MsiLocateComponentA(szComponent: LPCSTR; lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
1108 {$EXTERNALSYM MsiLocateComponentA}
1109 function MsiLocateComponentW(szComponent: LPCWSTR; lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
1110 {$EXTERNALSYM MsiLocateComponentW}
1111 function MsiLocateComponent(szComponent: LPCTSTR; lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
1112 {$EXTERNALSYM MsiLocateComponent}
1113 
1114 {$IFDEF MSI110}
1115 
1116 // --------------------------------------------------------------------------
1117 // Functions used to manage the list of valid sources.
1118 // --------------------------------------------------------------------------
1119 
1120 // Opens the list of sources for the specified user's install of the product
1121 // and removes all network sources from the list. A NULL or empty value for
1122 // the user name indicates the per-machine install.
1123 
MsiSourceListClearAllAnull1124 function MsiSourceListClearAllA(szProduct: LPCSTR; szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
1125 {$EXTERNALSYM MsiSourceListClearAllA}
MsiSourceListClearAllWnull1126 function MsiSourceListClearAllW(szProduct: LPCWSTR; szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
1127 {$EXTERNALSYM MsiSourceListClearAllW}
MsiSourceListClearAllnull1128 function MsiSourceListClearAll(szProduct: LPCTSTR; szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
1129 {$EXTERNALSYM MsiSourceListClearAll}
1130 
1131 // Opens the list of sources for the specified user's install of the product
1132 // and adds the provided source as a new network source. A NULL or empty
1133 // value for the user name indicates the per-machine install.
1134 
1135 function MsiSourceListAddSourceA(szProduct: LPCSTR; szUserName: LPCSTR;
1136   dwReserved: DWORD; szSource: LPCSTR): UINT; stdcall;
1137 {$EXTERNALSYM MsiSourceListAddSourceA}
1138 function MsiSourceListAddSourceW(szProduct: LPCWSTR; szUserName: LPCWSTR;
1139   dwReserved: DWORD; szSource: LPCWSTR): UINT; stdcall;
1140 {$EXTERNALSYM MsiSourceListAddSourceW}
1141 function MsiSourceListAddSource(szProduct: LPCTSTR; szUserName: LPCTSTR;
1142   dwReserved: DWORD; szSource: LPCTSTR): UINT; stdcall;
1143 {$EXTERNALSYM MsiSourceListAddSource}
1144 
1145 // Forces the installer to reevaluate the list of sources the next time that
1146 // the specified product needs a source.
1147 
1148 function MsiSourceListForceResolutionA(szProduct, szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
1149 {$EXTERNALSYM MsiSourceListForceResolutionA}
1150 function MsiSourceListForceResolutionW(szProduct, szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
1151 {$EXTERNALSYM MsiSourceListForceResolutionW}
1152 function MsiSourceListForceResolution(szProduct, szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
1153 {$EXTERNALSYM MsiSourceListForceResolution}
1154 
1155 {$ENDIF MSI110}
1156 
1157 // --------------------------------------------------------------------------
1158 // Utility functions
1159 // --------------------------------------------------------------------------
1160 
1161 // Give the version string and language for a specified file
1162 
1163 function MsiGetFileVersionA(szFilePath: LPCSTR; lpVersionBuf: LPSTR;
1164   var pcchVersionBuf: DWORD; lpLangBuf: LPSTR; var pcchLangBuf: DWORD): UINT; stdcall;
1165 {$EXTERNALSYM MsiGetFileVersionA}
1166 function MsiGetFileVersionW(szFilePath: LPCWSTR; lpVersionBuf: LPWSTR;
1167   var pcchVersionBuf: DWORD; lpLangBuf: LPWSTR; var pcchLangBuf: DWORD): UINT; stdcall;
1168 {$EXTERNALSYM MsiGetFileVersionW}
1169 function MsiGetFileVersion(szFilePath: LPCTSTR; lpVersionBuf: LPTSTR;
1170   var pcchVersionBuf: DWORD; lpLangBuf: LPTSTR; var pcchLangBuf: DWORD): UINT; stdcall;
1171 {$EXTERNALSYM MsiGetFileVersion}
1172 
1173 function MsiGetFileHashA(szFilePath: LPCSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
1174 {$EXTERNALSYM MsiGetFileHashA}
1175 function MsiGetFileHashW(szFilePath: LPCWSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
1176 {$EXTERNALSYM MsiGetFileHashW}
1177 function MsiGetFileHash(szFilePath: LPCTSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
1178 {$EXTERNALSYM MsiGetFileHash}
1179 
1180 function MsiGetFileSignatureInformationA(szSignedObjectPath: LPCSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
1181   pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
1182 {$EXTERNALSYM MsiGetFileSignatureInformationA}
1183 function MsiGetFileSignatureInformationW(szSignedObjectPath: LPCWSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
1184   pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
1185 {$EXTERNALSYM MsiGetFileSignatureInformationW}
1186 function MsiGetFileSignatureInformation(szSignedObjectPath: LPCTSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
1187   pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
1188 {$EXTERNALSYM MsiGetFileSignatureInformation}
1189 
1190 // By default, when only requesting the certificate context, an invalid hash
1191 // in the digital signature is not a fatal error.  Set this flag in the dwFlags
1192 // parameter to make the TRUST_E_BAD_DIGEST error fatal.
1193 
1194 const
1195   MSI_INVALID_HASH_IS_FATAL = $1;
1196   {$EXTERNALSYM MSI_INVALID_HASH_IS_FATAL}
1197 
1198 {$IFDEF MSI110}
1199 
1200 // examine a shortcut, and retrieve its descriptor information
1201 // if available.
1202 
1203 function MsiGetShortcutTargetA(szShortcutPath: LPCSTR; szProductCode: LPSTR;
1204   szFeatureId: LPSTR; szComponentCode: LPSTR): UINT; stdcall;
1205 {$EXTERNALSYM MsiGetShortcutTargetA}
1206 function MsiGetShortcutTargetW(szShortcutPath: LPCWSTR; szProductCode: LPWSTR;
1207   szFeatureId: LPWSTR; szComponentCode: LPWSTR): UINT; stdcall;
1208 {$EXTERNALSYM MsiGetShortcutTargetW}
1209 function MsiGetShortcutTarget(szShortcutPath: LPCTSTR; szProductCode: LPTSTR;
1210   szFeatureId: LPTSTR; szComponentCode: LPTSTR): UINT; stdcall;
1211 {$EXTERNALSYM MsiGetShortcutTarget}
1212 
1213 {$ENDIF MSI110}
1214 
1215 // checks to see if a product is managed
1216 // checks per-machine if called from system context, per-user if from
1217 // user context
1218 
1219 function MsiIsProductElevatedA(szProduct: LPCSTR; var pfElevated: BOOL): UINT; stdcall;
1220 {$EXTERNALSYM MsiIsProductElevatedA}
1221 function MsiIsProductElevatedW(szProduct: LPCWSTR; var pfElevated: BOOL): UINT; stdcall;
1222 {$EXTERNALSYM MsiIsProductElevatedW}
1223 function MsiIsProductElevated(szProduct: LPCTSTR; var pfElevated: BOOL): UINT; stdcall;
1224 {$EXTERNALSYM MsiIsProductElevated}
1225 
1226 // --------------------------------------------------------------------------
1227 // Error codes for installer access functions - until merged to winerr.h
1228 // --------------------------------------------------------------------------
1229 
1230 {$IFNDEF JWA_INCLUDEMODE}
1231 const
1232   ERROR_INSTALL_USEREXIT      = 1602; // User cancel installation.
1233   {$EXTERNALSYM ERROR_INSTALL_USEREXIT}
1234   ERROR_INSTALL_FAILURE       = 1603; // Fatal error during installation.
1235   {$EXTERNALSYM ERROR_INSTALL_FAILURE}
1236   ERROR_INSTALL_SUSPEND       = 1604; // Installation suspended, incomplete.
1237   {$EXTERNALSYM ERROR_INSTALL_SUSPEND}
1238   ERROR_UNKNOWN_PRODUCT       = 1605; // This action is only valid for products that are currently installed.
1239   {$EXTERNALSYM ERROR_UNKNOWN_PRODUCT}
1240   ERROR_UNKNOWN_FEATURE       = 1606; // Feature ID not registered.
1241   {$EXTERNALSYM ERROR_UNKNOWN_FEATURE}
1242   ERROR_UNKNOWN_COMPONENT     = 1607; // Component ID not registered.
1243   {$EXTERNALSYM ERROR_UNKNOWN_COMPONENT}
1244   ERROR_UNKNOWN_PROPERTY      = 1608; // Unknown property.
1245   {$EXTERNALSYM ERROR_UNKNOWN_PROPERTY}
1246   ERROR_INVALID_HANDLE_STATE  = 1609; // Handle is in an invalid state.
1247   {$EXTERNALSYM ERROR_INVALID_HANDLE_STATE}
1248   ERROR_BAD_CONFIGURATION     = 1610; // The configuration data for this product is corrupt.  Contact your support personnel.
1249   {$EXTERNALSYM ERROR_BAD_CONFIGURATION}
1250   ERROR_INDEX_ABSENT          = 1611; // Component qualifier not present.
1251   {$EXTERNALSYM ERROR_INDEX_ABSENT}
1252   ERROR_INSTALL_SOURCE_ABSENT = 1612; // The installation source for this product is not available.  Verify that the source exists and that you can access it.
1253   {$EXTERNALSYM ERROR_INSTALL_SOURCE_ABSENT}
1254   ERROR_PRODUCT_UNINSTALLED   = 1614; // Product is uninstalled.
1255   {$EXTERNALSYM ERROR_PRODUCT_UNINSTALLED}
1256   ERROR_BAD_QUERY_SYNTAX      = 1615; // SQL query syntax invalid or unsupported.
1257   {$EXTERNALSYM ERROR_BAD_QUERY_SYNTAX}
1258   ERROR_INVALID_FIELD         = 1616; // Record field does not exist.
1259   {$EXTERNALSYM ERROR_INVALID_FIELD}
1260 
1261   ERROR_INSTALL_SERVICE_FAILURE      = 1601; // The Windows Installer service could not be accessed.  Contact your support personnel to verify that the Windows Installer service is properly registered.
1262   {$EXTERNALSYM ERROR_INSTALL_SERVICE_FAILURE}
1263   ERROR_INSTALL_PACKAGE_VERSION      = 1613; // This installation package cannot be installed by the Windows Installer service.  You must install a Windows service pack that contains a newer version of the Windows Installer service.
1264   {$EXTERNALSYM ERROR_INSTALL_PACKAGE_VERSION}
1265   ERROR_INSTALL_ALREADY_RUNNING      = 1618; // Another installation is already in progress.  Complete that installation before proceeding with this install.
1266   {$EXTERNALSYM ERROR_INSTALL_ALREADY_RUNNING}
1267   ERROR_INSTALL_PACKAGE_OPEN_FAILED  = 1619; // This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
1268   {$EXTERNALSYM ERROR_INSTALL_PACKAGE_OPEN_FAILED}
1269   ERROR_INSTALL_PACKAGE_INVALID      = 1620; // This installation package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer package.
1270   {$EXTERNALSYM ERROR_INSTALL_PACKAGE_INVALID}
1271   ERROR_INSTALL_UI_FAILURE           = 1621; // There was an error starting the Windows Installer service user interface.  Contact your support personnel.
1272   {$EXTERNALSYM ERROR_INSTALL_UI_FAILURE}
1273   ERROR_INSTALL_LOG_FAILURE          = 1622; // Error opening installation log file.  Verify that the specified log file location exists and is writable.
1274   {$EXTERNALSYM ERROR_INSTALL_LOG_FAILURE}
1275   ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623; // This language of this installation package is not supported by your system.
1276   {$EXTERNALSYM ERROR_INSTALL_LANGUAGE_UNSUPPORTED}
1277   ERROR_INSTALL_PACKAGE_REJECTED     = 1625; // The system administrator has set policies to prevent this installation.
1278   {$EXTERNALSYM ERROR_INSTALL_PACKAGE_REJECTED}
1279 
1280   ERROR_FUNCTION_NOT_CALLED = 1626; // Function could not be executed.
1281   {$EXTERNALSYM ERROR_FUNCTION_NOT_CALLED}
1282   ERROR_FUNCTION_FAILED     = 1627; // Function failed during execution.
1283   {$EXTERNALSYM ERROR_FUNCTION_FAILED}
1284   ERROR_INVALID_TABLE       = 1628; // Invalid or unknown table specified.
1285   {$EXTERNALSYM ERROR_INVALID_TABLE}
1286   ERROR_DATATYPE_MISMATCH   = 1629; // Data supplied is of wrong type.
1287   {$EXTERNALSYM ERROR_DATATYPE_MISMATCH}
1288   ERROR_UNSUPPORTED_TYPE    = 1630; // Data of this type is not supported.
1289   {$EXTERNALSYM ERROR_UNSUPPORTED_TYPE}
1290   ERROR_CREATE_FAILED       = 1631; // The Windows Installer service failed to start.  Contact your support personnel.
1291   {$EXTERNALSYM ERROR_CREATE_FAILED}
1292 
1293   ERROR_INSTALL_TEMP_UNWRITABLE = 1632; // The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
1294   {$EXTERNALSYM ERROR_INSTALL_TEMP_UNWRITABLE}
1295 
1296   ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633; // This installation package is not supported by this processor type. Contact your product vendor.
1297   {$EXTERNALSYM ERROR_INSTALL_PLATFORM_UNSUPPORTED}
1298 
1299   ERROR_INSTALL_NOTUSED = 1634; // Component not used on this machine
1300   {$EXTERNALSYM ERROR_INSTALL_NOTUSED}
1301 
1302   ERROR_INSTALL_TRANSFORM_FAILURE = 1624; // Error applying transforms.  Verify that the specified transform paths are valid.
1303   {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_FAILURE}
1304 
1305   ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635; // This patch package could not be opened.  Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
1306   {$EXTERNALSYM ERROR_PATCH_PACKAGE_OPEN_FAILED}
1307   ERROR_PATCH_PACKAGE_INVALID     = 1636; // This patch package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer patch package.
1308   {$EXTERNALSYM ERROR_PATCH_PACKAGE_INVALID}
1309   ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637; // This patch package cannot be processed by the Windows Installer service.  You must install a Windows service pack that contains a newer version of the Windows Installer service.
1310   {$EXTERNALSYM ERROR_PATCH_PACKAGE_UNSUPPORTED}
1311 
1312   ERROR_PRODUCT_VERSION = 1638; // Another version of this product is already installed.  Installation of this version cannot continue.  To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
1313   {$EXTERNALSYM ERROR_PRODUCT_VERSION}
1314 
1315   ERROR_INVALID_COMMAND_LINE = 1639; // Invalid command line argument.  Consult the Windows Installer SDK for detailed command line help.
1316   {$EXTERNALSYM ERROR_INVALID_COMMAND_LINE}
1317 
1318 // The following three error codes are not returned from MSI version 1.0
1319 
1320   ERROR_INSTALL_REMOTE_DISALLOWED = 1640; // Configuration of this product is not permitted from remote sessions. Contact your administrator.
1321   {$EXTERNALSYM ERROR_INSTALL_REMOTE_DISALLOWED}
1322 
1323   ERROR_SUCCESS_REBOOT_INITIATED = 1641; // The requested operation completed successfully.  The system will be restarted so the changes can take effect.
1324   {$EXTERNALSYM ERROR_SUCCESS_REBOOT_INITIATED}
1325 
1326   ERROR_PATCH_TARGET_NOT_FOUND = 1642; // The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
1327   {$EXTERNALSYM ERROR_PATCH_TARGET_NOT_FOUND}
1328 
1329 // The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
1330 
1331   ERROR_PATCH_PACKAGE_REJECTED      = 1643; // The patch package is not permitted by software restriction policy.
1332   {$EXTERNALSYM ERROR_PATCH_PACKAGE_REJECTED}
1333   ERROR_INSTALL_TRANSFORM_REJECTED  = 1644; // One or more customizations are not permitted by software restriction policy.
1334   {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_REJECTED}
1335 
1336 // The following error code is returned only from MSI post version 2.0
1337 
1338 // LOCALIZE BEGIN:
1339 
1340 //#ifndef ERROR_INSTALL_REMOTE_PROHIBITED
1341   ERROR_INSTALL_REMOTE_PROHIBITED   = 1645; // The Windows Installer does not permit installation from a Remote Desktop Connection.
1342   {$EXTERNALSYM ERROR_INSTALL_REMOTE_PROHIBITED}
1343 
1344 //#endif
1345 {$ENDIF JWA_INCLUDEMODE}
1346 
1347 // LOCALIZE END
1348 {$ENDIF JWA_IMPLEMENTATIONSECTION}
1349 
1350 {$IFNDEF JWA_OMIT_SECTIONS}
1351 implementation
1352 //uses ...
1353 {$ENDIF JWA_OMIT_SECTIONS}
1354 
1355 {$IFNDEF JWA_INTERFACESECTION}
1356 
1357 {$IFNDEF JWA_INCLUDEMODE}
1358 const
1359   msilib = 'msi.dll';
1360   {$IFDEF UNICODE}
1361   AWSuffix = 'W';
1362   {$ELSE}
1363   AWSuffix = 'A';
1364   {$ENDIF UNICODE}
1365 {$ENDIF JWA_INCLUDEMODE}
1366 
1367 {$IFDEF DYNAMIC_LINK}
1368 
1369 var
1370   _MsiCloseHandle: Pointer;
1371 
1372 function MsiCloseHandle;
1373 begin
1374   GetProcedureAddress(_MsiCloseHandle, msilib, 'MsiCloseHandle');
1375   asm
1376         MOV     ESP, EBP
1377         POP     EBP
1378         JMP     [_MsiCloseHandle]
1379   end;
1380 end;
1381 
1382 var
1383   _MsiCloseAllHandles: Pointer;
1384 
1385 function MsiCloseAllHandles;
1386 begin
1387   GetProcedureAddress(_MsiCloseAllHandles, msilib, 'MsiCloseAllHandles');
1388   asm
1389         MOV     ESP, EBP
1390         POP     EBP
1391         JMP     [_MsiCloseAllHandles]
1392   end;
1393 end;
1394 
1395 var
1396   _MsiSetInternalUI: Pointer;
1397 
1398 function MsiSetInternalUI;
1399 begin
1400   GetProcedureAddress(_MsiSetInternalUI, msilib, 'MsiSetInternalUI');
1401   asm
1402         MOV     ESP, EBP
1403         POP     EBP
1404         JMP     [_MsiSetInternalUI]
1405   end;
1406 end;
1407 
1408 var
1409   _MsiSetExternalUIA: Pointer;
1410 
1411 function MsiSetExternalUIA;
1412 begin
1413   GetProcedureAddress(_MsiSetExternalUIA, msilib, 'MsiSetExternalUIA');
1414   asm
1415         MOV     ESP, EBP
1416         POP     EBP
1417         JMP     [_MsiSetExternalUIA]
1418   end;
1419 end;
1420 
1421 var
1422   _MsiSetExternalUIW: Pointer;
1423 
1424 function MsiSetExternalUIW;
1425 begin
1426   GetProcedureAddress(_MsiSetExternalUIW, msilib, 'MsiSetExternalUIW');
1427   asm
1428         MOV     ESP, EBP
1429         POP     EBP
1430         JMP     [_MsiSetExternalUIW]
1431   end;
1432 end;
1433 
1434 var
1435   _MsiSetExternalUI: Pointer;
1436 
1437 function MsiSetExternalUI;
1438 begin
1439   GetProcedureAddress(_MsiSetExternalUI, msilib, 'MsiSetExternalUI' + AWSuffix);
1440   asm
1441         MOV     ESP, EBP
1442         POP     EBP
1443         JMP     [_MsiSetExternalUI]
1444   end;
1445 end;
1446 
1447 var
1448   _MsiEnableLogA: Pointer;
1449 
1450 function MsiEnableLogA;
1451 begin
1452   GetProcedureAddress(_MsiEnableLogA, msilib, 'MsiEnableLogA');
1453   asm
1454         MOV     ESP, EBP
1455         POP     EBP
1456         JMP     [_MsiEnableLogA]
1457   end;
1458 end;
1459 
1460 var
1461   _MsiEnableLogW: Pointer;
1462 
1463 function MsiEnableLogW;
1464 begin
1465   GetProcedureAddress(_MsiEnableLogW, msilib, 'MsiEnableLogW');
1466   asm
1467         MOV     ESP, EBP
1468         POP     EBP
1469         JMP     [_MsiEnableLogW]
1470   end;
1471 end;
1472 
1473 var
1474   _MsiEnableLog: Pointer;
1475 
1476 function MsiEnableLog;
1477 begin
1478   GetProcedureAddress(_MsiEnableLog, msilib, 'MsiEnableLog' + AWSuffix);
1479   asm
1480         MOV     ESP, EBP
1481         POP     EBP
1482         JMP     [_MsiEnableLog]
1483   end;
1484 end;
1485 
1486 var
1487   _MsiQueryProductStateA: Pointer;
1488 
1489 function MsiQueryProductStateA;
1490 begin
1491   GetProcedureAddress(_MsiQueryProductStateA, msilib, 'MsiQueryProductStateA');
1492   asm
1493         MOV     ESP, EBP
1494         POP     EBP
1495         JMP     [_MsiQueryProductStateA]
1496   end;
1497 end;
1498 
1499 var
1500   _MsiQueryProductStateW: Pointer;
1501 
1502 function MsiQueryProductStateW;
1503 begin
1504   GetProcedureAddress(_MsiQueryProductStateW, msilib, 'MsiQueryProductStateW');
1505   asm
1506         MOV     ESP, EBP
1507         POP     EBP
1508         JMP     [_MsiQueryProductStateW]
1509   end;
1510 end;
1511 
1512 var
1513   _MsiQueryProductState: Pointer;
1514 
1515 function MsiQueryProductState;
1516 begin
1517   GetProcedureAddress(_MsiQueryProductState, msilib, 'MsiQueryProductState' + AWSuffix);
1518   asm
1519         MOV     ESP, EBP
1520         POP     EBP
1521         JMP     [_MsiQueryProductState]
1522   end;
1523 end;
1524 
1525 var
1526   _MsiGetProductInfoA: Pointer;
1527 
1528 function MsiGetProductInfoA;
1529 begin
1530   GetProcedureAddress(_MsiGetProductInfoA, msilib, 'MsiGetProductInfoA');
1531   asm
1532         MOV     ESP, EBP
1533         POP     EBP
1534         JMP     [_MsiGetProductInfoA]
1535   end;
1536 end;
1537 
1538 var
1539   _MsiGetProductInfoW: Pointer;
1540 
1541 function MsiGetProductInfoW;
1542 begin
1543   GetProcedureAddress(_MsiGetProductInfoW, msilib, 'MsiGetProductInfoW');
1544   asm
1545         MOV     ESP, EBP
1546         POP     EBP
1547         JMP     [_MsiGetProductInfoW]
1548   end;
1549 end;
1550 
1551 var
1552   _MsiGetProductInfo: Pointer;
1553 
1554 function MsiGetProductInfo;
1555 begin
1556   GetProcedureAddress(_MsiGetProductInfo, msilib, 'MsiGetProductInfo' + AWSuffix);
1557   asm
1558         MOV     ESP, EBP
1559         POP     EBP
1560         JMP     [_MsiGetProductInfo]
1561   end;
1562 end;
1563 
1564 var
1565   _MsiInstallProductA: Pointer;
1566 
1567 function MsiInstallProductA;
1568 begin
1569   GetProcedureAddress(_MsiInstallProductA, msilib, 'MsiInstallProductA');
1570   asm
1571         MOV     ESP, EBP
1572         POP     EBP
1573         JMP     [_MsiInstallProductA]
1574   end;
1575 end;
1576 
1577 var
1578   _MsiInstallProductW: Pointer;
1579 
1580 function MsiInstallProductW;
1581 begin
1582   GetProcedureAddress(_MsiInstallProductW, msilib, 'MsiInstallProductW');
1583   asm
1584         MOV     ESP, EBP
1585         POP     EBP
1586         JMP     [_MsiInstallProductW]
1587   end;
1588 end;
1589 
1590 var
1591   _MsiInstallProduct: Pointer;
1592 
1593 function MsiInstallProduct;
1594 begin
1595   GetProcedureAddress(_MsiInstallProduct, msilib, 'MsiInstallProduct' + AWSuffix);
1596   asm
1597         MOV     ESP, EBP
1598         POP     EBP
1599         JMP     [_MsiInstallProduct]
1600   end;
1601 end;
1602 
1603 var
1604   _MsiConfigureProductA: Pointer;
1605 
1606 function MsiConfigureProductA;
1607 begin
1608   GetProcedureAddress(_MsiConfigureProductA, msilib, 'MsiConfigureProductA');
1609   asm
1610         MOV     ESP, EBP
1611         POP     EBP
1612         JMP     [_MsiConfigureProductA]
1613   end;
1614 end;
1615 
1616 var
1617   _MsiConfigureProductW: Pointer;
1618 
1619 function MsiConfigureProductW;
1620 begin
1621   GetProcedureAddress(_MsiConfigureProductW, msilib, 'MsiConfigureProductW');
1622   asm
1623         MOV     ESP, EBP
1624         POP     EBP
1625         JMP     [_MsiConfigureProductW]
1626   end;
1627 end;
1628 
1629 var
1630   _MsiConfigureProduct: Pointer;
1631 
1632 function MsiConfigureProduct;
1633 begin
1634   GetProcedureAddress(_MsiConfigureProduct, msilib, 'MsiConfigureProduct' + AWSuffix);
1635   asm
1636         MOV     ESP, EBP
1637         POP     EBP
1638         JMP     [_MsiConfigureProduct]
1639   end;
1640 end;
1641 
1642 var
1643   _MsiConfigureProductExA: Pointer;
1644 
1645 function MsiConfigureProductExA;
1646 begin
1647   GetProcedureAddress(_MsiConfigureProductExA, msilib, 'MsiConfigureProductExA');
1648   asm
1649         MOV     ESP, EBP
1650         POP     EBP
1651         JMP     [_MsiConfigureProductExA]
1652   end;
1653 end;
1654 
1655 var
1656   _MsiConfigureProductExW: Pointer;
1657 
1658 function MsiConfigureProductExW;
1659 begin
1660   GetProcedureAddress(_MsiConfigureProductExW, msilib, 'MsiConfigureProductExW');
1661   asm
1662         MOV     ESP, EBP
1663         POP     EBP
1664         JMP     [_MsiConfigureProductExW]
1665   end;
1666 end;
1667 
1668 var
1669   _MsiConfigureProductEx: Pointer;
1670 
1671 function MsiConfigureProductEx;
1672 begin
1673   GetProcedureAddress(_MsiConfigureProductEx, msilib, 'MsiConfigureProductEx' + AWSuffix);
1674   asm
1675         MOV     ESP, EBP
1676         POP     EBP
1677         JMP     [_MsiConfigureProductEx]
1678   end;
1679 end;
1680 
1681 var
1682   _MsiReinstallProductA: Pointer;
1683 
1684 function MsiReinstallProductA;
1685 begin
1686   GetProcedureAddress(_MsiReinstallProductA, msilib, 'MsiReinstallProductA');
1687   asm
1688         MOV     ESP, EBP
1689         POP     EBP
1690         JMP     [_MsiReinstallProductA]
1691   end;
1692 end;
1693 
1694 var
1695   _MsiReinstallProductW: Pointer;
1696 
1697 function MsiReinstallProductW;
1698 begin
1699   GetProcedureAddress(_MsiReinstallProductW, msilib, 'MsiReinstallProductW');
1700   asm
1701         MOV     ESP, EBP
1702         POP     EBP
1703         JMP     [_MsiReinstallProductW]
1704   end;
1705 end;
1706 
1707 var
1708   _MsiReinstallProduct: Pointer;
1709 
1710 function MsiReinstallProduct;
1711 begin
1712   GetProcedureAddress(_MsiReinstallProduct, msilib, 'MsiReinstallProduct' + AWSuffix);
1713   asm
1714         MOV     ESP, EBP
1715         POP     EBP
1716         JMP     [_MsiReinstallProduct]
1717   end;
1718 end;
1719 
1720 var
1721   _MsiAdvertiseProductExA: Pointer;
1722 
1723 function MsiAdvertiseProductExA;
1724 begin
1725   GetProcedureAddress(_MsiAdvertiseProductExA, msilib, 'MsiAdvertiseProductExA');
1726   asm
1727         MOV     ESP, EBP
1728         POP     EBP
1729         JMP     [_MsiAdvertiseProductExA]
1730   end;
1731 end;
1732 
1733 var
1734   _MsiAdvertiseProductExW: Pointer;
1735 
1736 function MsiAdvertiseProductExW;
1737 begin
1738   GetProcedureAddress(_MsiAdvertiseProductExW, msilib, 'MsiAdvertiseProductExW');
1739   asm
1740         MOV     ESP, EBP
1741         POP     EBP
1742         JMP     [_MsiAdvertiseProductExW]
1743   end;
1744 end;
1745 
1746 var
1747   _MsiAdvertiseProductEx: Pointer;
1748 
1749 function MsiAdvertiseProductEx;
1750 begin
1751   GetProcedureAddress(_MsiAdvertiseProductEx, msilib, 'MsiAdvertiseProductEx' + AWSuffix);
1752   asm
1753         MOV     ESP, EBP
1754         POP     EBP
1755         JMP     [_MsiAdvertiseProductEx]
1756   end;
1757 end;
1758 
1759 var
1760   _MsiAdvertiseProductA: Pointer;
1761 
1762 function MsiAdvertiseProductA;
1763 begin
1764   GetProcedureAddress(_MsiAdvertiseProductA, msilib, 'MsiAdvertiseProductA');
1765   asm
1766         MOV     ESP, EBP
1767         POP     EBP
1768         JMP     [_MsiAdvertiseProductA]
1769   end;
1770 end;
1771 
1772 var
1773   _MsiAdvertiseProductW: Pointer;
1774 
1775 function MsiAdvertiseProductW;
1776 begin
1777   GetProcedureAddress(_MsiAdvertiseProductW, msilib, 'MsiAdvertiseProductW');
1778   asm
1779         MOV     ESP, EBP
1780         POP     EBP
1781         JMP     [_MsiAdvertiseProductW]
1782   end;
1783 end;
1784 
1785 var
1786   _MsiAdvertiseProduct: Pointer;
1787 
1788 function MsiAdvertiseProduct;
1789 begin
1790   GetProcedureAddress(_MsiAdvertiseProduct, msilib, 'MsiAdvertiseProduct' + AWSuffix);
1791   asm
1792         MOV     ESP, EBP
1793         POP     EBP
1794         JMP     [_MsiAdvertiseProduct]
1795   end;
1796 end;
1797 
1798 var
1799   _MsiProcessAdvertiseScriptA: Pointer;
1800 
1801 function MsiProcessAdvertiseScriptA;
1802 begin
1803   GetProcedureAddress(_MsiProcessAdvertiseScriptA, msilib, 'MsiProcessAdvertiseScriptA');
1804   asm
1805         MOV     ESP, EBP
1806         POP     EBP
1807         JMP     [_MsiProcessAdvertiseScriptA]
1808   end;
1809 end;
1810 
1811 var
1812   _MsiProcessAdvertiseScriptW: Pointer;
1813 
1814 function MsiProcessAdvertiseScriptW;
1815 begin
1816   GetProcedureAddress(_MsiProcessAdvertiseScriptW, msilib, 'MsiProcessAdvertiseScriptW');
1817   asm
1818         MOV     ESP, EBP
1819         POP     EBP
1820         JMP     [_MsiProcessAdvertiseScriptW]
1821   end;
1822 end;
1823 
1824 var
1825   _MsiProcessAdvertiseScript: Pointer;
1826 
1827 function MsiProcessAdvertiseScript;
1828 begin
1829   GetProcedureAddress(_MsiProcessAdvertiseScript, msilib, 'MsiProcessAdvertiseScript' + AWSuffix);
1830   asm
1831         MOV     ESP, EBP
1832         POP     EBP
1833         JMP     [_MsiProcessAdvertiseScript]
1834   end;
1835 end;
1836 
1837 var
1838   _MsiAdvertiseScriptA: Pointer;
1839 
1840 function MsiAdvertiseScriptA;
1841 begin
1842   GetProcedureAddress(_MsiAdvertiseScriptA, msilib, 'MsiAdvertiseScriptA');
1843   asm
1844         MOV     ESP, EBP
1845         POP     EBP
1846         JMP     [_MsiAdvertiseScriptA]
1847   end;
1848 end;
1849 
1850 var
1851   _MsiAdvertiseScriptW: Pointer;
1852 
1853 function MsiAdvertiseScriptW;
1854 begin
1855   GetProcedureAddress(_MsiAdvertiseScriptW, msilib, 'MsiAdvertiseScriptW');
1856   asm
1857         MOV     ESP, EBP
1858         POP     EBP
1859         JMP     [_MsiAdvertiseScriptW]
1860   end;
1861 end;
1862 
1863 var
1864   _MsiAdvertiseScript: Pointer;
1865 
1866 function MsiAdvertiseScript;
1867 begin
1868   GetProcedureAddress(_MsiAdvertiseScript, msilib, 'MsiAdvertiseScript' + AWSuffix);
1869   asm
1870         MOV     ESP, EBP
1871         POP     EBP
1872         JMP     [_MsiAdvertiseScript]
1873   end;
1874 end;
1875 
1876 var
1877   _MsiGetProductInfoFromScriptA: Pointer;
1878 
1879 function MsiGetProductInfoFromScriptA;
1880 begin
1881   GetProcedureAddress(_MsiGetProductInfoFromScriptA, msilib, 'MsiGetProductInfoFromScriptA');
1882   asm
1883         MOV     ESP, EBP
1884         POP     EBP
1885         JMP     [_MsiGetProductInfoFromScriptA]
1886   end;
1887 end;
1888 
1889 var
1890   _MsiGetProductInfoFromScriptW: Pointer;
1891 
1892 function MsiGetProductInfoFromScriptW;
1893 begin
1894   GetProcedureAddress(_MsiGetProductInfoFromScriptW, msilib, 'MsiGetProductInfoFromScriptW');
1895   asm
1896         MOV     ESP, EBP
1897         POP     EBP
1898         JMP     [_MsiGetProductInfoFromScriptW]
1899   end;
1900 end;
1901 
1902 var
1903   _MsiGetProductInfoFromScript: Pointer;
1904 
1905 function MsiGetProductInfoFromScript;
1906 begin
1907   GetProcedureAddress(_MsiGetProductInfoFromScript, msilib, 'MsiGetProductInfoFromScript' + AWSuffix);
1908   asm
1909         MOV     ESP, EBP
1910         POP     EBP
1911         JMP     [_MsiGetProductInfoFromScript]
1912   end;
1913 end;
1914 
1915 var
1916   _MsiGetProductCodeA: Pointer;
1917 
1918 function MsiGetProductCodeA;
1919 begin
1920   GetProcedureAddress(_MsiGetProductCodeA, msilib, 'MsiGetProductCodeA');
1921   asm
1922         MOV     ESP, EBP
1923         POP     EBP
1924         JMP     [_MsiGetProductCodeA]
1925   end;
1926 end;
1927 
1928 var
1929   _MsiGetProductCodeW: Pointer;
1930 
1931 function MsiGetProductCodeW;
1932 begin
1933   GetProcedureAddress(_MsiGetProductCodeW, msilib, 'MsiGetProductCodeW');
1934   asm
1935         MOV     ESP, EBP
1936         POP     EBP
1937         JMP     [_MsiGetProductCodeW]
1938   end;
1939 end;
1940 
1941 var
1942   _MsiGetProductCode: Pointer;
1943 
1944 function MsiGetProductCode;
1945 begin
1946   GetProcedureAddress(_MsiGetProductCode, msilib, 'MsiGetProductCode' + AWSuffix);
1947   asm
1948         MOV     ESP, EBP
1949         POP     EBP
1950         JMP     [_MsiGetProductCode]
1951   end;
1952 end;
1953 
1954 var
1955   _MsiGetUserInfoA: Pointer;
1956 
1957 function MsiGetUserInfoA;
1958 begin
1959   GetProcedureAddress(_MsiGetUserInfoA, msilib, 'MsiGetUserInfoA');
1960   asm
1961         MOV     ESP, EBP
1962         POP     EBP
1963         JMP     [_MsiGetUserInfoA]
1964   end;
1965 end;
1966 
1967 var
1968   _MsiGetUserInfoW: Pointer;
1969 
1970 function MsiGetUserInfoW;
1971 begin
1972   GetProcedureAddress(_MsiGetUserInfoW, msilib, 'MsiGetUserInfoW');
1973   asm
1974         MOV     ESP, EBP
1975         POP     EBP
1976         JMP     [_MsiGetUserInfoW]
1977   end;
1978 end;
1979 
1980 var
1981   _MsiGetUserInfo: Pointer;
1982 
1983 function MsiGetUserInfo;
1984 begin
1985   GetProcedureAddress(_MsiGetUserInfo, msilib, 'MsiGetUserInfo' + AWSuffix);
1986   asm
1987         MOV     ESP, EBP
1988         POP     EBP
1989         JMP     [_MsiGetUserInfo]
1990   end;
1991 end;
1992 
1993 var
1994   _MsiCollectUserInfoA: Pointer;
1995 
1996 function MsiCollectUserInfoA;
1997 begin
1998   GetProcedureAddress(_MsiCollectUserInfoA, msilib, 'MsiCollectUserInfoA');
1999   asm
2000         MOV     ESP, EBP
2001         POP     EBP
2002         JMP     [_MsiCollectUserInfoA]
2003   end;
2004 end;
2005 
2006 var
2007   _MsiCollectUserInfoW: Pointer;
2008 
2009 function MsiCollectUserInfoW;
2010 begin
2011   GetProcedureAddress(_MsiCollectUserInfoW, msilib, 'MsiCollectUserInfoW');
2012   asm
2013         MOV     ESP, EBP
2014         POP     EBP
2015         JMP     [_MsiCollectUserInfoW]
2016   end;
2017 end;
2018 
2019 var
2020   _MsiCollectUserInfo: Pointer;
2021 
2022 function MsiCollectUserInfo;
2023 begin
2024   GetProcedureAddress(_MsiCollectUserInfo, msilib, 'MsiCollectUserInfo' + AWSuffix);
2025   asm
2026         MOV     ESP, EBP
2027         POP     EBP
2028         JMP     [_MsiCollectUserInfo]
2029   end;
2030 end;
2031 
2032 var
2033   _MsiApplyPatchA: Pointer;
2034 
2035 function MsiApplyPatchA;
2036 begin
2037   GetProcedureAddress(_MsiApplyPatchA, msilib, 'MsiApplyPatchA');
2038   asm
2039         MOV     ESP, EBP
2040         POP     EBP
2041         JMP     [_MsiApplyPatchA]
2042   end;
2043 end;
2044 
2045 var
2046   _MsiApplyPatchW: Pointer;
2047 
2048 function MsiApplyPatchW;
2049 begin
2050   GetProcedureAddress(_MsiApplyPatchW, msilib, 'MsiApplyPatchW');
2051   asm
2052         MOV     ESP, EBP
2053         POP     EBP
2054         JMP     [_MsiApplyPatchW]
2055   end;
2056 end;
2057 
2058 var
2059   _MsiApplyPatch: Pointer;
2060 
2061 function MsiApplyPatch;
2062 begin
2063   GetProcedureAddress(_MsiApplyPatch, msilib, 'MsiApplyPatch' + AWSuffix);
2064   asm
2065         MOV     ESP, EBP
2066         POP     EBP
2067         JMP     [_MsiApplyPatch]
2068   end;
2069 end;
2070 
2071 var
2072   _MsiGetPatchInfoA: Pointer;
2073 
2074 function MsiGetPatchInfoA;
2075 begin
2076   GetProcedureAddress(_MsiGetPatchInfoA, msilib, 'MsiGetPatchInfoA');
2077   asm
2078         MOV     ESP, EBP
2079         POP     EBP
2080         JMP     [_MsiGetPatchInfoA]
2081   end;
2082 end;
2083 
2084 var
2085   _MsiGetPatchInfoW: Pointer;
2086 
2087 function MsiGetPatchInfoW;
2088 begin
2089   GetProcedureAddress(_MsiGetPatchInfoW, msilib, 'MsiGetPatchInfoW');
2090   asm
2091         MOV     ESP, EBP
2092         POP     EBP
2093         JMP     [_MsiGetPatchInfoW]
2094   end;
2095 end;
2096 
2097 var
2098   _MsiGetPatchInfo: Pointer;
2099 
2100 function MsiGetPatchInfo;
2101 begin
2102   GetProcedureAddress(_MsiGetPatchInfo, msilib, 'MsiGetPatchInfo' + AWSuffix);
2103   asm
2104         MOV     ESP, EBP
2105         POP     EBP
2106         JMP     [_MsiGetPatchInfo]
2107   end;
2108 end;
2109 
2110 var
2111   _MsiEnumPatchesA: Pointer;
2112 
2113 function MsiEnumPatchesA;
2114 begin
2115   GetProcedureAddress(_MsiEnumPatchesA, msilib, 'MsiEnumPatchesA');
2116   asm
2117         MOV     ESP, EBP
2118         POP     EBP
2119         JMP     [_MsiEnumPatchesA]
2120   end;
2121 end;
2122 
2123 var
2124   _MsiEnumPatchesW: Pointer;
2125 
2126 function MsiEnumPatchesW;
2127 begin
2128   GetProcedureAddress(_MsiEnumPatchesW, msilib, 'MsiEnumPatchesW');
2129   asm
2130         MOV     ESP, EBP
2131         POP     EBP
2132         JMP     [_MsiEnumPatchesW]
2133   end;
2134 end;
2135 
2136 var
2137   _MsiEnumPatches: Pointer;
2138 
2139 function MsiEnumPatches;
2140 begin
2141   GetProcedureAddress(_MsiEnumPatches, msilib, 'MsiEnumPatches' + AWSuffix);
2142   asm
2143         MOV     ESP, EBP
2144         POP     EBP
2145         JMP     [_MsiEnumPatches]
2146   end;
2147 end;
2148 
2149 var
2150   _MsiQueryFeatureStateA: Pointer;
2151 
2152 function MsiQueryFeatureStateA;
2153 begin
2154   GetProcedureAddress(_MsiQueryFeatureStateA, msilib, 'MsiQueryFeatureStateA');
2155   asm
2156         MOV     ESP, EBP
2157         POP     EBP
2158         JMP     [_MsiQueryFeatureStateA]
2159   end;
2160 end;
2161 
2162 var
2163   _MsiQueryFeatureStateW: Pointer;
2164 
2165 function MsiQueryFeatureStateW;
2166 begin
2167   GetProcedureAddress(_MsiQueryFeatureStateW, msilib, 'MsiQueryFeatureStateW');
2168   asm
2169         MOV     ESP, EBP
2170         POP     EBP
2171         JMP     [_MsiQueryFeatureStateW]
2172   end;
2173 end;
2174 
2175 var
2176   _MsiQueryFeatureState: Pointer;
2177 
2178 function MsiQueryFeatureState;
2179 begin
2180   GetProcedureAddress(_MsiQueryFeatureState, msilib, 'MsiQueryFeatureState' + AWSuffix);
2181   asm
2182         MOV     ESP, EBP
2183         POP     EBP
2184         JMP     [_MsiQueryFeatureState]
2185   end;
2186 end;
2187 
2188 var
2189   _MsiUseFeatureA: Pointer;
2190 
2191 function MsiUseFeatureA;
2192 begin
2193   GetProcedureAddress(_MsiUseFeatureA, msilib, 'MsiUseFeatureA');
2194   asm
2195         MOV     ESP, EBP
2196         POP     EBP
2197         JMP     [_MsiUseFeatureA]
2198   end;
2199 end;
2200 
2201 var
2202   _MsiUseFeatureW: Pointer;
2203 
2204 function MsiUseFeatureW;
2205 begin
2206   GetProcedureAddress(_MsiUseFeatureW, msilib, 'MsiUseFeatureW');
2207   asm
2208         MOV     ESP, EBP
2209         POP     EBP
2210         JMP     [_MsiUseFeatureW]
2211   end;
2212 end;
2213 
2214 var
2215   _MsiUseFeature: Pointer;
2216 
2217 function MsiUseFeature;
2218 begin
2219   GetProcedureAddress(_MsiUseFeature, msilib, 'MsiUseFeature' + AWSuffix);
2220   asm
2221         MOV     ESP, EBP
2222         POP     EBP
2223         JMP     [_MsiUseFeature]
2224   end;
2225 end;
2226 
2227 var
2228   _MsiUseFeatureExA: Pointer;
2229 
2230 function MsiUseFeatureExA;
2231 begin
2232   GetProcedureAddress(_MsiUseFeatureExA, msilib, 'MsiUseFeatureExA');
2233   asm
2234         MOV     ESP, EBP
2235         POP     EBP
2236         JMP     [_MsiUseFeatureExA]
2237   end;
2238 end;
2239 
2240 var
2241   _MsiUseFeatureExW: Pointer;
2242 
2243 function MsiUseFeatureExW;
2244 begin
2245   GetProcedureAddress(_MsiUseFeatureExW, msilib, 'MsiUseFeatureExW');
2246   asm
2247         MOV     ESP, EBP
2248         POP     EBP
2249         JMP     [_MsiUseFeatureExW]
2250   end;
2251 end;
2252 
2253 var
2254   _MsiUseFeatureEx: Pointer;
2255 
2256 function MsiUseFeatureEx;
2257 begin
2258   GetProcedureAddress(_MsiUseFeatureEx, msilib, 'MsiUseFeatureEx' + AWSuffix);
2259   asm
2260         MOV     ESP, EBP
2261         POP     EBP
2262         JMP     [_MsiUseFeatureEx]
2263   end;
2264 end;
2265 
2266 var
2267   _MsiGetFeatureUsageA: Pointer;
2268 
2269 function MsiGetFeatureUsageA;
2270 begin
2271   GetProcedureAddress(_MsiGetFeatureUsageA, msilib, 'MsiGetFeatureUsageA');
2272   asm
2273         MOV     ESP, EBP
2274         POP     EBP
2275         JMP     [_MsiGetFeatureUsageA]
2276   end;
2277 end;
2278 
2279 var
2280   _MsiGetFeatureUsageW: Pointer;
2281 
2282 function MsiGetFeatureUsageW;
2283 begin
2284   GetProcedureAddress(_MsiGetFeatureUsageW, msilib, 'MsiGetFeatureUsageW');
2285   asm
2286         MOV     ESP, EBP
2287         POP     EBP
2288         JMP     [_MsiGetFeatureUsageW]
2289   end;
2290 end;
2291 
2292 var
2293   _MsiGetFeatureUsage: Pointer;
2294 
2295 function MsiGetFeatureUsage;
2296 begin
2297   GetProcedureAddress(_MsiGetFeatureUsage, msilib, 'MsiGetFeatureUsage' + AWSuffix);
2298   asm
2299         MOV     ESP, EBP
2300         POP     EBP
2301         JMP     [_MsiGetFeatureUsage]
2302   end;
2303 end;
2304 
2305 var
2306   _MsiConfigureFeatureA: Pointer;
2307 
2308 function MsiConfigureFeatureA;
2309 begin
2310   GetProcedureAddress(_MsiConfigureFeatureA, msilib, 'MsiConfigureFeatureA');
2311   asm
2312         MOV     ESP, EBP
2313         POP     EBP
2314         JMP     [_MsiConfigureFeatureA]
2315   end;
2316 end;
2317 
2318 var
2319   _MsiConfigureFeatureW: Pointer;
2320 
2321 function MsiConfigureFeatureW;
2322 begin
2323   GetProcedureAddress(_MsiConfigureFeatureW, msilib, 'MsiConfigureFeatureW');
2324   asm
2325         MOV     ESP, EBP
2326         POP     EBP
2327         JMP     [_MsiConfigureFeatureW]
2328   end;
2329 end;
2330 
2331 var
2332   _MsiConfigureFeature: Pointer;
2333 
2334 function MsiConfigureFeature;
2335 begin
2336   GetProcedureAddress(_MsiConfigureFeature, msilib, 'MsiConfigureFeature' + AWSuffix);
2337   asm
2338         MOV     ESP, EBP
2339         POP     EBP
2340         JMP     [_MsiConfigureFeature]
2341   end;
2342 end;
2343 
2344 var
2345   _MsiReinstallFeatureA: Pointer;
2346 
2347 function MsiReinstallFeatureA;
2348 begin
2349   GetProcedureAddress(_MsiReinstallFeatureA, msilib, 'MsiReinstallFeatureA');
2350   asm
2351         MOV     ESP, EBP
2352         POP     EBP
2353         JMP     [_MsiReinstallFeatureA]
2354   end;
2355 end;
2356 
2357 var
2358   _MsiReinstallFeatureW: Pointer;
2359 
2360 function MsiReinstallFeatureW;
2361 begin
2362   GetProcedureAddress(_MsiReinstallFeatureW, msilib, 'MsiReinstallFeatureW');
2363   asm
2364         MOV     ESP, EBP
2365         POP     EBP
2366         JMP     [_MsiReinstallFeatureW]
2367   end;
2368 end;
2369 
2370 var
2371   _MsiReinstallFeature: Pointer;
2372 
2373 function MsiReinstallFeature;
2374 begin
2375   GetProcedureAddress(_MsiReinstallFeature, msilib, 'MsiReinstallFeature' + AWSuffix);
2376   asm
2377         MOV     ESP, EBP
2378         POP     EBP
2379         JMP     [_MsiReinstallFeature]
2380   end;
2381 end;
2382 
2383 var
2384   _MsiProvideComponentA: Pointer;
2385 
2386 function MsiProvideComponentA;
2387 begin
2388   GetProcedureAddress(_MsiProvideComponentA, msilib, 'MsiProvideComponentA');
2389   asm
2390         MOV     ESP, EBP
2391         POP     EBP
2392         JMP     [_MsiProvideComponentA]
2393   end;
2394 end;
2395 
2396 var
2397   _MsiProvideComponentW: Pointer;
2398 
2399 function MsiProvideComponentW;
2400 begin
2401   GetProcedureAddress(_MsiProvideComponentW, msilib, 'MsiProvideComponentW');
2402   asm
2403         MOV     ESP, EBP
2404         POP     EBP
2405         JMP     [_MsiProvideComponentW]
2406   end;
2407 end;
2408 
2409 var
2410   _MsiProvideComponent: Pointer;
2411 
2412 function MsiProvideComponent;
2413 begin
2414   GetProcedureAddress(_MsiProvideComponent, msilib, 'MsiProvideComponent' + AWSuffix);
2415   asm
2416         MOV     ESP, EBP
2417         POP     EBP
2418         JMP     [_MsiProvideComponent]
2419   end;
2420 end;
2421 
2422 var
2423   _MsiProvideQualifiedComponentA: Pointer;
2424 
2425 function MsiProvideQualifiedComponentA;
2426 begin
2427   GetProcedureAddress(_MsiProvideQualifiedComponentA, msilib, 'MsiProvideQualifiedComponentA');
2428   asm
2429         MOV     ESP, EBP
2430         POP     EBP
2431         JMP     [_MsiProvideQualifiedComponentA]
2432   end;
2433 end;
2434 
2435 var
2436   _MsiProvideQualifiedComponentW: Pointer;
2437 
2438 function MsiProvideQualifiedComponentW;
2439 begin
2440   GetProcedureAddress(_MsiProvideQualifiedComponentW, msilib, 'MsiProvideQualifiedComponentW');
2441   asm
2442         MOV     ESP, EBP
2443         POP     EBP
2444         JMP     [_MsiProvideQualifiedComponentW]
2445   end;
2446 end;
2447 
2448 var
2449   _MsiProvideQualifiedComponent: Pointer;
2450 
2451 function MsiProvideQualifiedComponent;
2452 begin
2453   GetProcedureAddress(_MsiProvideQualifiedComponent, msilib, 'MsiProvideQualifiedComponent' + AWSuffix);
2454   asm
2455         MOV     ESP, EBP
2456         POP     EBP
2457         JMP     [_MsiProvideQualifiedComponent]
2458   end;
2459 end;
2460 
2461 var
2462   _MsiProvideQualifiedComponentExA: Pointer;
2463 
2464 function MsiProvideQualifiedComponentExA;
2465 begin
2466   GetProcedureAddress(_MsiProvideQualifiedComponentExA, msilib, 'MsiProvideQualifiedComponentExA');
2467   asm
2468         MOV     ESP, EBP
2469         POP     EBP
2470         JMP     [_MsiProvideQualifiedComponentExA]
2471   end;
2472 end;
2473 
2474 var
2475   _MsiProvideQualifiedComponentExW: Pointer;
2476 
2477 function MsiProvideQualifiedComponentExW;
2478 begin
2479   GetProcedureAddress(_MsiProvideQualifiedComponentExW, msilib, 'MsiProvideQualifiedComponentExW');
2480   asm
2481         MOV     ESP, EBP
2482         POP     EBP
2483         JMP     [_MsiProvideQualifiedComponentExW]
2484   end;
2485 end;
2486 
2487 var
2488   _MsiProvideQualifiedComponentEx: Pointer;
2489 
2490 function MsiProvideQualifiedComponentEx;
2491 begin
2492   GetProcedureAddress(_MsiProvideQualifiedComponentEx, msilib, 'MsiProvideQualifiedComponentEx' + AWSuffix);
2493   asm
2494         MOV     ESP, EBP
2495         POP     EBP
2496         JMP     [_MsiProvideQualifiedComponentEx]
2497   end;
2498 end;
2499 
2500 var
2501   _MsiGetComponentPathA: Pointer;
2502 
2503 function MsiGetComponentPathA;
2504 begin
2505   GetProcedureAddress(_MsiGetComponentPathA, msilib, 'MsiGetComponentPathA');
2506   asm
2507         MOV     ESP, EBP
2508         POP     EBP
2509         JMP     [_MsiGetComponentPathA]
2510   end;
2511 end;
2512 
2513 var
2514   _MsiGetComponentPathW: Pointer;
2515 
2516 function MsiGetComponentPathW;
2517 begin
2518   GetProcedureAddress(_MsiGetComponentPathW, msilib, 'MsiGetComponentPathW');
2519   asm
2520         MOV     ESP, EBP
2521         POP     EBP
2522         JMP     [_MsiGetComponentPathW]
2523   end;
2524 end;
2525 
2526 var
2527   _MsiGetComponentPath: Pointer;
2528 
2529 function MsiGetComponentPath;
2530 begin
2531   GetProcedureAddress(_MsiGetComponentPath, msilib, 'MsiGetComponentPath' + AWSuffix);
2532   asm
2533         MOV     ESP, EBP
2534         POP     EBP
2535         JMP     [_MsiGetComponentPath]
2536   end;
2537 end;
2538 
2539 var
2540   _MsiProvideAssemblyA: Pointer;
2541 
2542 function MsiProvideAssemblyA;
2543 begin
2544   GetProcedureAddress(_MsiProvideAssemblyA, msilib, 'MsiProvideAssemblyA');
2545   asm
2546         MOV     ESP, EBP
2547         POP     EBP
2548         JMP     [_MsiProvideAssemblyA]
2549   end;
2550 end;
2551 
2552 var
2553   _MsiProvideAssemblyW: Pointer;
2554 
2555 function MsiProvideAssemblyW;
2556 begin
2557   GetProcedureAddress(_MsiProvideAssemblyW, msilib, 'MsiProvideAssemblyW');
2558   asm
2559         MOV     ESP, EBP
2560         POP     EBP
2561         JMP     [_MsiProvideAssemblyW]
2562   end;
2563 end;
2564 
2565 var
2566   _MsiProvideAssembly: Pointer;
2567 
2568 function MsiProvideAssembly;
2569 begin
2570   GetProcedureAddress(_MsiProvideAssembly, msilib, 'MsiProvideAssembly' + AWSuffix);
2571   asm
2572         MOV     ESP, EBP
2573         POP     EBP
2574         JMP     [_MsiProvideAssembly]
2575   end;
2576 end;
2577 
2578 var
2579   _MsiEnumProductsA: Pointer;
2580 
2581 function MsiEnumProductsA;
2582 begin
2583   GetProcedureAddress(_MsiEnumProductsA, msilib, 'MsiEnumProductsA');
2584   asm
2585         MOV     ESP, EBP
2586         POP     EBP
2587         JMP     [_MsiEnumProductsA]
2588   end;
2589 end;
2590 
2591 var
2592   _MsiEnumProductsW: Pointer;
2593 
2594 function MsiEnumProductsW;
2595 begin
2596   GetProcedureAddress(_MsiEnumProductsW, msilib, 'MsiEnumProductsW');
2597   asm
2598         MOV     ESP, EBP
2599         POP     EBP
2600         JMP     [_MsiEnumProductsW]
2601   end;
2602 end;
2603 
2604 var
2605   _MsiEnumProducts: Pointer;
2606 
2607 function MsiEnumProducts;
2608 begin
2609   GetProcedureAddress(_MsiEnumProducts, msilib, 'MsiEnumProducts' + AWSuffix);
2610   asm
2611         MOV     ESP, EBP
2612         POP     EBP
2613         JMP     [_MsiEnumProducts]
2614   end;
2615 end;
2616 
2617 {$IFDEF MSI110}
2618 
2619 var
2620   _MsiEnumRelatedProductsA: Pointer;
2621 
2622 function MsiEnumRelatedProductsA;
2623 begin
2624   GetProcedureAddress(_MsiEnumRelatedProductsA, msilib, 'MsiEnumRelatedProductsA');
2625   asm
2626         MOV     ESP, EBP
2627         POP     EBP
2628         JMP     [_MsiEnumRelatedProductsA]
2629   end;
2630 end;
2631 
2632 var
2633   _MsiEnumRelatedProductsW: Pointer;
2634 
2635 function MsiEnumRelatedProductsW;
2636 begin
2637   GetProcedureAddress(_MsiEnumRelatedProductsW, msilib, 'MsiEnumRelatedProductsW');
2638   asm
2639         MOV     ESP, EBP
2640         POP     EBP
2641         JMP     [_MsiEnumRelatedProductsW]
2642   end;
2643 end;
2644 
2645 var
2646   _MsiEnumRelatedProducts: Pointer;
2647 
2648 function MsiEnumRelatedProducts;
2649 begin
2650   GetProcedureAddress(_MsiEnumRelatedProducts, msilib, 'MsiEnumRelatedProducts' + AWSuffix);
2651   asm
2652         MOV     ESP, EBP
2653         POP     EBP
2654         JMP     [_MsiEnumRelatedProducts]
2655   end;
2656 end;
2657 
2658 {$ENDIF MSI110}
2659 
2660 var
2661   _MsiEnumFeaturesA: Pointer;
2662 
2663 function MsiEnumFeaturesA;
2664 begin
2665   GetProcedureAddress(_MsiEnumFeaturesA, msilib, 'MsiEnumFeaturesA');
2666   asm
2667         MOV     ESP, EBP
2668         POP     EBP
2669         JMP     [_MsiEnumFeaturesA]
2670   end;
2671 end;
2672 
2673 var
2674   _MsiEnumFeaturesW: Pointer;
2675 
2676 function MsiEnumFeaturesW;
2677 begin
2678   GetProcedureAddress(_MsiEnumFeaturesW, msilib, 'MsiEnumFeaturesW');
2679   asm
2680         MOV     ESP, EBP
2681         POP     EBP
2682         JMP     [_MsiEnumFeaturesW]
2683   end;
2684 end;
2685 
2686 var
2687   _MsiEnumFeatures: Pointer;
2688 
2689 function MsiEnumFeatures;
2690 begin
2691   GetProcedureAddress(_MsiEnumFeatures, msilib, 'MsiEnumFeatures' + AWSuffix);
2692   asm
2693         MOV     ESP, EBP
2694         POP     EBP
2695         JMP     [_MsiEnumFeatures]
2696   end;
2697 end;
2698 
2699 var
2700   _MsiEnumComponentsA: Pointer;
2701 
2702 function MsiEnumComponentsA;
2703 begin
2704   GetProcedureAddress(_MsiEnumComponentsA, msilib, 'MsiEnumComponentsA');
2705   asm
2706         MOV     ESP, EBP
2707         POP     EBP
2708         JMP     [_MsiEnumComponentsA]
2709   end;
2710 end;
2711 
2712 var
2713   _MsiEnumComponentsW: Pointer;
2714 
2715 function MsiEnumComponentsW;
2716 begin
2717   GetProcedureAddress(_MsiEnumComponentsW, msilib, 'MsiEnumComponentsW');
2718   asm
2719         MOV     ESP, EBP
2720         POP     EBP
2721         JMP     [_MsiEnumComponentsW]
2722   end;
2723 end;
2724 
2725 var
2726   _MsiEnumComponents: Pointer;
2727 
2728 function MsiEnumComponents;
2729 begin
2730   GetProcedureAddress(_MsiEnumComponents, msilib, 'MsiEnumComponents' + AWSuffix);
2731   asm
2732         MOV     ESP, EBP
2733         POP     EBP
2734         JMP     [_MsiEnumComponents]
2735   end;
2736 end;
2737 
2738 var
2739   _MsiEnumClientsA: Pointer;
2740 
2741 function MsiEnumClientsA;
2742 begin
2743   GetProcedureAddress(_MsiEnumClientsA, msilib, 'MsiEnumClientsA');
2744   asm
2745         MOV     ESP, EBP
2746         POP     EBP
2747         JMP     [_MsiEnumClientsA]
2748   end;
2749 end;
2750 
2751 var
2752   _MsiEnumClientsW: Pointer;
2753 
2754 function MsiEnumClientsW;
2755 begin
2756   GetProcedureAddress(_MsiEnumClientsW, msilib, 'MsiEnumClientsW');
2757   asm
2758         MOV     ESP, EBP
2759         POP     EBP
2760         JMP     [_MsiEnumClientsW]
2761   end;
2762 end;
2763 
2764 var
2765   _MsiEnumClients: Pointer;
2766 
2767 function MsiEnumClients;
2768 begin
2769   GetProcedureAddress(_MsiEnumClients, msilib, 'MsiEnumClients' + AWSuffix);
2770   asm
2771         MOV     ESP, EBP
2772         POP     EBP
2773         JMP     [_MsiEnumClients]
2774   end;
2775 end;
2776 
2777 var
2778   _MsiEnumComponentQualifiersA: Pointer;
2779 
2780 function MsiEnumComponentQualifiersA;
2781 begin
2782   GetProcedureAddress(_MsiEnumComponentQualifiersA, msilib, 'MsiEnumComponentQualifiersA');
2783   asm
2784         MOV     ESP, EBP
2785         POP     EBP
2786         JMP     [_MsiEnumComponentQualifiersA]
2787   end;
2788 end;
2789 
2790 var
2791   _MsiEnumComponentQualifiersW: Pointer;
2792 
2793 function MsiEnumComponentQualifiersW;
2794 begin
2795   GetProcedureAddress(_MsiEnumComponentQualifiersW, msilib, 'MsiEnumComponentQualifiersW');
2796   asm
2797         MOV     ESP, EBP
2798         POP     EBP
2799         JMP     [_MsiEnumComponentQualifiersW]
2800   end;
2801 end;
2802 
2803 var
2804   _MsiEnumComponentQualifiers: Pointer;
2805 
2806 function MsiEnumComponentQualifiers;
2807 begin
2808   GetProcedureAddress(_MsiEnumComponentQualifiers, msilib, 'MsiEnumComponentQualifiers' + AWSuffix);
2809   asm
2810         MOV     ESP, EBP
2811         POP     EBP
2812         JMP     [_MsiEnumComponentQualifiers]
2813   end;
2814 end;
2815 
2816 var
2817   _MsiOpenProductA: Pointer;
2818 
2819 function MsiOpenProductA;
2820 begin
2821   GetProcedureAddress(_MsiOpenProductA, msilib, 'MsiOpenProductA');
2822   asm
2823         MOV     ESP, EBP
2824         POP     EBP
2825         JMP     [_MsiOpenProductA]
2826   end;
2827 end;
2828 
2829 var
2830   _MsiOpenProductW: Pointer;
2831 
2832 function MsiOpenProductW;
2833 begin
2834   GetProcedureAddress(_MsiOpenProductW, msilib, 'MsiOpenProductW');
2835   asm
2836         MOV     ESP, EBP
2837         POP     EBP
2838         JMP     [_MsiOpenProductW]
2839   end;
2840 end;
2841 
2842 var
2843   _MsiOpenProduct: Pointer;
2844 
2845 function MsiOpenProduct;
2846 begin
2847   GetProcedureAddress(_MsiOpenProduct, msilib, 'MsiOpenProduct' + AWSuffix);
2848   asm
2849         MOV     ESP, EBP
2850         POP     EBP
2851         JMP     [_MsiOpenProduct]
2852   end;
2853 end;
2854 
2855 var
2856   _MsiOpenPackageA: Pointer;
2857 
2858 function MsiOpenPackageA;
2859 begin
2860   GetProcedureAddress(_MsiOpenPackageA, msilib, 'MsiOpenPackageA');
2861   asm
2862         MOV     ESP, EBP
2863         POP     EBP
2864         JMP     [_MsiOpenPackageA]
2865   end;
2866 end;
2867 
2868 var
2869   _MsiOpenPackageW: Pointer;
2870 
2871 function MsiOpenPackageW;
2872 begin
2873   GetProcedureAddress(_MsiOpenPackageW, msilib, 'MsiOpenPackageW');
2874   asm
2875         MOV     ESP, EBP
2876         POP     EBP
2877         JMP     [_MsiOpenPackageW]
2878   end;
2879 end;
2880 
2881 var
2882   _MsiOpenPackage: Pointer;
2883 
2884 function MsiOpenPackage;
2885 begin
2886   GetProcedureAddress(_MsiOpenPackage, msilib, 'MsiOpenPackage' + AWSuffix);
2887   asm
2888         MOV     ESP, EBP
2889         POP     EBP
2890         JMP     [_MsiOpenPackage]
2891   end;
2892 end;
2893 
2894 var
2895   _MsiOpenPackageExA: Pointer;
2896 
2897 function MsiOpenPackageExA;
2898 begin
2899   GetProcedureAddress(_MsiOpenPackageExA, msilib, 'MsiOpenPackageExA');
2900   asm
2901         MOV     ESP, EBP
2902         POP     EBP
2903         JMP     [_MsiOpenPackageExA]
2904   end;
2905 end;
2906 
2907 var
2908   _MsiOpenPackageExW: Pointer;
2909 
2910 function MsiOpenPackageExW;
2911 begin
2912   GetProcedureAddress(_MsiOpenPackageExW, msilib, 'MsiOpenPackageExW');
2913   asm
2914         MOV     ESP, EBP
2915         POP     EBP
2916         JMP     [_MsiOpenPackageExW]
2917   end;
2918 end;
2919 
2920 var
2921   _MsiOpenPackageEx: Pointer;
2922 
2923 function MsiOpenPackageEx;
2924 begin
2925   GetProcedureAddress(_MsiOpenPackageEx, msilib, 'MsiOpenPackageEx' + AWSuffix);
2926   asm
2927         MOV     ESP, EBP
2928         POP     EBP
2929         JMP     [_MsiOpenPackageEx]
2930   end;
2931 end;
2932 
2933 var
2934   _MsiGetProductPropertyA: Pointer;
2935 
2936 function MsiGetProductPropertyA;
2937 begin
2938   GetProcedureAddress(_MsiGetProductPropertyA, msilib, 'MsiGetProductPropertyA');
2939   asm
2940         MOV     ESP, EBP
2941         POP     EBP
2942         JMP     [_MsiGetProductPropertyA]
2943   end;
2944 end;
2945 
2946 var
2947   _MsiGetProductPropertyW: Pointer;
2948 
2949 function MsiGetProductPropertyW;
2950 begin
2951   GetProcedureAddress(_MsiGetProductPropertyW, msilib, 'MsiGetProductPropertyW');
2952   asm
2953         MOV     ESP, EBP
2954         POP     EBP
2955         JMP     [_MsiGetProductPropertyW]
2956   end;
2957 end;
2958 
2959 var
2960   _MsiGetProductProperty: Pointer;
2961 
2962 function MsiGetProductProperty;
2963 begin
2964   GetProcedureAddress(_MsiGetProductProperty, msilib, 'MsiGetProductProperty' + AWSuffix);
2965   asm
2966         MOV     ESP, EBP
2967         POP     EBP
2968         JMP     [_MsiGetProductProperty]
2969   end;
2970 end;
2971 
2972 var
2973   _MsiVerifyPackageA: Pointer;
2974 
2975 function MsiVerifyPackageA;
2976 begin
2977   GetProcedureAddress(_MsiVerifyPackageA, msilib, 'MsiVerifyPackageA');
2978   asm
2979         MOV     ESP, EBP
2980         POP     EBP
2981         JMP     [_MsiVerifyPackageA]
2982   end;
2983 end;
2984 
2985 var
2986   _MsiVerifyPackageW: Pointer;
2987 
2988 function MsiVerifyPackageW;
2989 begin
2990   GetProcedureAddress(_MsiVerifyPackageW, msilib, 'MsiVerifyPackageW');
2991   asm
2992         MOV     ESP, EBP
2993         POP     EBP
2994         JMP     [_MsiVerifyPackageW]
2995   end;
2996 end;
2997 
2998 var
2999   _MsiVerifyPackage: Pointer;
3000 
3001 function MsiVerifyPackage;
3002 begin
3003   GetProcedureAddress(_MsiVerifyPackage, msilib, 'MsiVerifyPackage' + AWSuffix);
3004   asm
3005         MOV     ESP, EBP
3006         POP     EBP
3007         JMP     [_MsiVerifyPackage]
3008   end;
3009 end;
3010 
3011 var
3012   _MsiGetFeatureInfoA: Pointer;
3013 
3014 function MsiGetFeatureInfoA;
3015 begin
3016   GetProcedureAddress(_MsiGetFeatureInfoA, msilib, 'MsiGetFeatureInfoA');
3017   asm
3018         MOV     ESP, EBP
3019         POP     EBP
3020         JMP     [_MsiGetFeatureInfoA]
3021   end;
3022 end;
3023 
3024 var
3025   _MsiGetFeatureInfoW: Pointer;
3026 
3027 function MsiGetFeatureInfoW;
3028 begin
3029   GetProcedureAddress(_MsiGetFeatureInfoW, msilib, 'MsiGetFeatureInfoW');
3030   asm
3031         MOV     ESP, EBP
3032         POP     EBP
3033         JMP     [_MsiGetFeatureInfoW]
3034   end;
3035 end;
3036 
3037 var
3038   _MsiGetFeatureInfo: Pointer;
3039 
3040 function MsiGetFeatureInfo;
3041 begin
3042   GetProcedureAddress(_MsiGetFeatureInfo, msilib, 'MsiGetFeatureInfo' + AWSuffix);
3043   asm
3044         MOV     ESP, EBP
3045         POP     EBP
3046         JMP     [_MsiGetFeatureInfo]
3047   end;
3048 end;
3049 
3050 var
3051   _MsiInstallMissingComponentA: Pointer;
3052 
3053 function MsiInstallMissingComponentA;
3054 begin
3055   GetProcedureAddress(_MsiInstallMissingComponentA, msilib, 'MsiInstallMissingComponentA');
3056   asm
3057         MOV     ESP, EBP
3058         POP     EBP
3059         JMP     [_MsiInstallMissingComponentA]
3060   end;
3061 end;
3062 
3063 var
3064   _MsiInstallMissingComponentW: Pointer;
3065 
3066 function MsiInstallMissingComponentW;
3067 begin
3068   GetProcedureAddress(_MsiInstallMissingComponentW, msilib, 'MsiInstallMissingComponentW');
3069   asm
3070         MOV     ESP, EBP
3071         POP     EBP
3072         JMP     [_MsiInstallMissingComponentW]
3073   end;
3074 end;
3075 
3076 var
3077   _MsiInstallMissingComponent: Pointer;
3078 
3079 function MsiInstallMissingComponent;
3080 begin
3081   GetProcedureAddress(_MsiInstallMissingComponent, msilib, 'MsiInstallMissingComponent' + AWSuffix);
3082   asm
3083         MOV     ESP, EBP
3084         POP     EBP
3085         JMP     [_MsiInstallMissingComponent]
3086   end;
3087 end;
3088 
3089 var
3090   _MsiInstallMissingFileA: Pointer;
3091 
3092 function MsiInstallMissingFileA;
3093 begin
3094   GetProcedureAddress(_MsiInstallMissingFileA, msilib, 'MsiInstallMissingFileA');
3095   asm
3096         MOV     ESP, EBP
3097         POP     EBP
3098         JMP     [_MsiInstallMissingFileA]
3099   end;
3100 end;
3101 
3102 var
3103   _MsiInstallMissingFileW: Pointer;
3104 
3105 function MsiInstallMissingFileW;
3106 begin
3107   GetProcedureAddress(_MsiInstallMissingFileW, msilib, 'MsiInstallMissingFileW');
3108   asm
3109         MOV     ESP, EBP
3110         POP     EBP
3111         JMP     [_MsiInstallMissingFileW]
3112   end;
3113 end;
3114 
3115 var
3116   _MsiInstallMissingFile: Pointer;
3117 
3118 function MsiInstallMissingFile;
3119 begin
3120   GetProcedureAddress(_MsiInstallMissingFile, msilib, 'MsiInstallMissingFile' + AWSuffix);
3121   asm
3122         MOV     ESP, EBP
3123         POP     EBP
3124         JMP     [_MsiInstallMissingFile]
3125   end;
3126 end;
3127 
3128 var
3129   _MsiLocateComponentA: Pointer;
3130 
3131 function MsiLocateComponentA;
3132 begin
3133   GetProcedureAddress(_MsiLocateComponentA, msilib, 'MsiLocateComponentA');
3134   asm
3135         MOV     ESP, EBP
3136         POP     EBP
3137         JMP     [_MsiLocateComponentA]
3138   end;
3139 end;
3140 
3141 var
3142   _MsiLocateComponentW: Pointer;
3143 
3144 function MsiLocateComponentW;
3145 begin
3146   GetProcedureAddress(_MsiLocateComponentW, msilib, 'MsiLocateComponentW');
3147   asm
3148         MOV     ESP, EBP
3149         POP     EBP
3150         JMP     [_MsiLocateComponentW]
3151   end;
3152 end;
3153 
3154 var
3155   _MsiLocateComponent: Pointer;
3156 
3157 function MsiLocateComponent;
3158 begin
3159   GetProcedureAddress(_MsiLocateComponent, msilib, 'MsiLocateComponent' + AWSuffix);
3160   asm
3161         MOV     ESP, EBP
3162         POP     EBP
3163         JMP     [_MsiLocateComponent]
3164   end;
3165 end;
3166 
3167 {$IFDEF MSI110}
3168 
3169 var
3170   _MsiSourceListClearAllA: Pointer;
3171 
3172 function MsiSourceListClearAllA;
3173 begin
3174   GetProcedureAddress(_MsiSourceListClearAllA, msilib, 'MsiSourceListClearAllA');
3175   asm
3176         MOV     ESP, EBP
3177         POP     EBP
3178         JMP     [_MsiSourceListClearAllA]
3179   end;
3180 end;
3181 
3182 var
3183   _MsiSourceListClearAllW: Pointer;
3184 
3185 function MsiSourceListClearAllW;
3186 begin
3187   GetProcedureAddress(_MsiSourceListClearAllW, msilib, 'MsiSourceListClearAllW');
3188   asm
3189         MOV     ESP, EBP
3190         POP     EBP
3191         JMP     [_MsiSourceListClearAllW]
3192   end;
3193 end;
3194 
3195 var
3196   _MsiSourceListClearAll: Pointer;
3197 
3198 function MsiSourceListClearAll;
3199 begin
3200   GetProcedureAddress(_MsiSourceListClearAll, msilib, 'MsiSourceListClearAll' + AWSuffix);
3201   asm
3202         MOV     ESP, EBP
3203         POP     EBP
3204         JMP     [_MsiSourceListClearAll]
3205   end;
3206 end;
3207 
3208 var
3209   _MsiSourceListAddSourceA: Pointer;
3210 
3211 function MsiSourceListAddSourceA;
3212 begin
3213   GetProcedureAddress(_MsiSourceListAddSourceA, msilib, 'MsiSourceListAddSourceA');
3214   asm
3215         MOV     ESP, EBP
3216         POP     EBP
3217         JMP     [_MsiSourceListAddSourceA]
3218   end;
3219 end;
3220 
3221 var
3222   _MsiSourceListAddSourceW: Pointer;
3223 
3224 function MsiSourceListAddSourceW;
3225 begin
3226   GetProcedureAddress(_MsiSourceListAddSourceW, msilib, 'MsiSourceListAddSourceW');
3227   asm
3228         MOV     ESP, EBP
3229         POP     EBP
3230         JMP     [_MsiSourceListAddSourceW]
3231   end;
3232 end;
3233 
3234 var
3235   _MsiSourceListAddSource: Pointer;
3236 
3237 function MsiSourceListAddSource;
3238 begin
3239   GetProcedureAddress(_MsiSourceListAddSource, msilib, 'MsiSourceListAddSource' + AWSuffix);
3240   asm
3241         MOV     ESP, EBP
3242         POP     EBP
3243         JMP     [_MsiSourceListAddSource]
3244   end;
3245 end;
3246 
3247 var
3248   _MsiSourceListForceResolutionA: Pointer;
3249 
3250 function MsiSourceListForceResolutionA;
3251 begin
3252   GetProcedureAddress(_MsiSourceListForceResolutionA, msilib, 'MsiSourceListForceResolutionA');
3253   asm
3254         MOV     ESP, EBP
3255         POP     EBP
3256         JMP     [_MsiSourceListForceResolutionA]
3257   end;
3258 end;
3259 
3260 var
3261   _MsiSourceListForceResolutionW: Pointer;
3262 
3263 function MsiSourceListForceResolutionW;
3264 begin
3265   GetProcedureAddress(_MsiSourceListForceResolutionW, msilib, 'MsiSourceListForceResolutionW');
3266   asm
3267         MOV     ESP, EBP
3268         POP     EBP
3269         JMP     [_MsiSourceListForceResolutionW]
3270   end;
3271 end;
3272 
3273 var
3274   _MsiSourceListForceResolution: Pointer;
3275 
3276 function MsiSourceListForceResolution;
3277 begin
3278   GetProcedureAddress(_MsiSourceListForceResolution, msilib, 'MsiSourceListForceResolution' + AWSuffix);
3279   asm
3280         MOV     ESP, EBP
3281         POP     EBP
3282         JMP     [_MsiSourceListForceResolution]
3283   end;
3284 end;
3285 
3286 {$ENDIF MSI110}
3287 
3288 var
3289   _MsiGetFileVersionA: Pointer;
3290 
3291 function MsiGetFileVersionA;
3292 begin
3293   GetProcedureAddress(_MsiGetFileVersionA, msilib, 'MsiGetFileVersionA');
3294   asm
3295         MOV     ESP, EBP
3296         POP     EBP
3297         JMP     [_MsiGetFileVersionA]
3298   end;
3299 end;
3300 
3301 var
3302   _MsiGetFileVersionW: Pointer;
3303 
3304 function MsiGetFileVersionW;
3305 begin
3306   GetProcedureAddress(_MsiGetFileVersionW, msilib, 'MsiGetFileVersionW');
3307   asm
3308         MOV     ESP, EBP
3309         POP     EBP
3310         JMP     [_MsiGetFileVersionW]
3311   end;
3312 end;
3313 
3314 var
3315   _MsiGetFileVersion: Pointer;
3316 
3317 function MsiGetFileVersion;
3318 begin
3319   GetProcedureAddress(_MsiGetFileVersion, msilib, 'MsiGetFileVersion' + AWSuffix);
3320   asm
3321         MOV     ESP, EBP
3322         POP     EBP
3323         JMP     [_MsiGetFileVersion]
3324   end;
3325 end;
3326 
3327 var
3328   _MsiGetFileHashA: Pointer;
3329 
3330 function MsiGetFileHashA;
3331 begin
3332   GetProcedureAddress(_MsiGetFileHashA, msilib, 'MsiGetFileHashA');
3333   asm
3334         MOV     ESP, EBP
3335         POP     EBP
3336         JMP     [_MsiGetFileHashA]
3337   end;
3338 end;
3339 
3340 var
3341   _MsiGetFileHashW: Pointer;
3342 
3343 function MsiGetFileHashW;
3344 begin
3345   GetProcedureAddress(_MsiGetFileHashW, msilib, 'MsiGetFileHashW');
3346   asm
3347         MOV     ESP, EBP
3348         POP     EBP
3349         JMP     [_MsiGetFileHashW]
3350   end;
3351 end;
3352 
3353 var
3354   _MsiGetFileHash: Pointer;
3355 
3356 function MsiGetFileHash;
3357 begin
3358   GetProcedureAddress(_MsiGetFileHash, msilib, 'MsiGetFileHash' + AWSuffix);
3359   asm
3360         MOV     ESP, EBP
3361         POP     EBP
3362         JMP     [_MsiGetFileHash]
3363   end;
3364 end;
3365 
3366 var
3367   _MsiGetFileSignatureInformationA: Pointer;
3368 
3369 function MsiGetFileSignatureInformationA;
3370 begin
3371   GetProcedureAddress(_MsiGetFileSignatureInformationA, msilib, 'MsiGetFileSignatureInformationA');
3372   asm
3373         MOV     ESP, EBP
3374         POP     EBP
3375         JMP     [_MsiGetFileSignatureInformationA]
3376   end;
3377 end;
3378 
3379 var
3380   _MsiGetFileSignatureInformationW: Pointer;
3381 
3382 function MsiGetFileSignatureInformationW;
3383 begin
3384   GetProcedureAddress(_MsiGetFileSignatureInformationW, msilib, 'MsiGetFileSignatureInformationW');
3385   asm
3386         MOV     ESP, EBP
3387         POP     EBP
3388         JMP     [_MsiGetFileSignatureInformationW]
3389   end;
3390 end;
3391 
3392 var
3393   _MsiGetFileSignatureInformation: Pointer;
3394 
3395 function MsiGetFileSignatureInformation;
3396 begin
3397   GetProcedureAddress(_MsiGetFileSignatureInformation, msilib, 'MsiGetFileSignatureInformation' + AWSuffix);
3398   asm
3399         MOV     ESP, EBP
3400         POP     EBP
3401         JMP     [_MsiGetFileSignatureInformation]
3402   end;
3403 end;
3404 
3405 {$IFDEF MSI110}
3406 
3407 var
3408   _MsiGetShortcutTargetA: Pointer;
3409 
3410 function MsiGetShortcutTargetA;
3411 begin
3412   GetProcedureAddress(_MsiGetShortcutTargetA, msilib, 'MsiGetShortcutTargetA');
3413   asm
3414         MOV     ESP, EBP
3415         POP     EBP
3416         JMP     [_MsiGetShortcutTargetA]
3417   end;
3418 end;
3419 
3420 var
3421   _MsiGetShortcutTargetW: Pointer;
3422 
3423 function MsiGetShortcutTargetW;
3424 begin
3425   GetProcedureAddress(_MsiGetShortcutTargetW, msilib, 'MsiGetShortcutTargetW');
3426   asm
3427         MOV     ESP, EBP
3428         POP     EBP
3429         JMP     [_MsiGetShortcutTargetW]
3430   end;
3431 end;
3432 
3433 var
3434   _MsiGetShortcutTarget: Pointer;
3435 
3436 function MsiGetShortcutTarget;
3437 begin
3438   GetProcedureAddress(_MsiGetShortcutTarget, msilib, 'MsiGetShortcutTarget' + AWSuffix);
3439   asm
3440         MOV     ESP, EBP
3441         POP     EBP
3442         JMP     [_MsiGetShortcutTarget]
3443   end;
3444 end;
3445 
3446 {$ENDIF MSI110}
3447 
3448 var
3449   _MsiIsProductElevatedA: Pointer;
3450 
3451 function MsiIsProductElevatedA;
3452 begin
3453   GetProcedureAddress(_MsiIsProductElevatedA, msilib, 'MsiIsProductElevatedA');
3454   asm
3455         MOV     ESP, EBP
3456         POP     EBP
3457         JMP     [_MsiIsProductElevatedA]
3458   end;
3459 end;
3460 
3461 var
3462   _MsiIsProductElevatedW: Pointer;
3463 
3464 function MsiIsProductElevatedW;
3465 begin
3466   GetProcedureAddress(_MsiIsProductElevatedW, msilib, 'MsiIsProductElevatedW');
3467   asm
3468         MOV     ESP, EBP
3469         POP     EBP
3470         JMP     [_MsiIsProductElevatedW]
3471   end;
3472 end;
3473 
3474 var
3475   _MsiIsProductElevated: Pointer;
3476 
3477 function MsiIsProductElevated;
3478 begin
3479   GetProcedureAddress(_MsiIsProductElevated, msilib, 'MsiIsProductElevated' + AWSuffix);
3480   asm
3481         MOV     ESP, EBP
3482         POP     EBP
3483         JMP     [_MsiIsProductElevated]
3484   end;
3485 end;
3486 
3487 {$ELSE}
3488 
3489 function MsiCloseHandle; external msilib name 'MsiCloseHandle';
3490 function MsiCloseAllHandles; external msilib name 'MsiCloseAllHandles';
3491 function MsiSetInternalUI; external msilib name 'MsiSetInternalUI';
3492 function MsiSetExternalUIA; external msilib name 'MsiSetExternalUIA';
3493 function MsiSetExternalUIW; external msilib name 'MsiSetExternalUIW';
3494 function MsiSetExternalUI; external msilib name 'MsiSetExternalUI' + AWSuffix;
3495 function MsiEnableLogA; external msilib name 'MsiEnableLogA';
3496 function MsiEnableLogW; external msilib name 'MsiEnableLogW';
3497 function MsiEnableLog; external msilib name 'MsiEnableLog' + AWSuffix;
3498 function MsiQueryProductStateA; external msilib name 'MsiQueryProductStateA';
3499 function MsiQueryProductStateW; external msilib name 'MsiQueryProductStateW';
3500 function MsiQueryProductState; external msilib name 'MsiQueryProductState' + AWSuffix;
3501 function MsiGetProductInfoA; external msilib name 'MsiGetProductInfoA';
3502 function MsiGetProductInfoW; external msilib name 'MsiGetProductInfoW';
3503 function MsiGetProductInfo; external msilib name 'MsiGetProductInfo' + AWSuffix;
3504 function MsiInstallProductA; external msilib name 'MsiInstallProductA';
3505 function MsiInstallProductW; external msilib name 'MsiInstallProductW';
3506 function MsiInstallProduct; external msilib name 'MsiInstallProduct' + AWSuffix;
3507 function MsiConfigureProductA; external msilib name 'MsiConfigureProductA';
3508 function MsiConfigureProductW; external msilib name 'MsiConfigureProductW';
3509 function MsiConfigureProduct; external msilib name 'MsiConfigureProduct' + AWSuffix;
3510 function MsiConfigureProductExA; external msilib name 'MsiConfigureProductExA';
3511 function MsiConfigureProductExW; external msilib name 'MsiConfigureProductExW';
3512 function MsiConfigureProductEx; external msilib name 'MsiConfigureProductEx' + AWSuffix;
3513 function MsiReinstallProductA; external msilib name 'MsiReinstallProductA';
3514 function MsiReinstallProductW; external msilib name 'MsiReinstallProductW';
3515 function MsiReinstallProduct; external msilib name 'MsiReinstallProduct' + AWSuffix;
3516 function MsiAdvertiseProductExA; external msilib name 'MsiAdvertiseProductExA';
3517 function MsiAdvertiseProductExW; external msilib name 'MsiAdvertiseProductExW';
3518 function MsiAdvertiseProductEx; external msilib name 'MsiAdvertiseProductEx' + AWSuffix;
3519 function MsiAdvertiseProductA; external msilib name 'MsiAdvertiseProductA';
3520 function MsiAdvertiseProductW; external msilib name 'MsiAdvertiseProductW';
3521 function MsiAdvertiseProduct; external msilib name 'MsiAdvertiseProduct' + AWSuffix;
3522 function MsiProcessAdvertiseScriptA; external msilib name 'MsiProcessAdvertiseScriptA';
3523 function MsiProcessAdvertiseScriptW; external msilib name 'MsiProcessAdvertiseScriptW';
3524 function MsiProcessAdvertiseScript; external msilib name 'MsiProcessAdvertiseScript' + AWSuffix;
3525 function MsiAdvertiseScriptA; external msilib name 'MsiAdvertiseScriptA';
3526 function MsiAdvertiseScriptW; external msilib name 'MsiAdvertiseScriptW';
3527 function MsiAdvertiseScript; external msilib name 'MsiAdvertiseScript' + AWSuffix;
3528 function MsiGetProductInfoFromScriptA; external msilib name 'MsiGetProductInfoFromScriptA';
3529 function MsiGetProductInfoFromScriptW; external msilib name 'MsiGetProductInfoFromScriptW';
3530 function MsiGetProductInfoFromScript; external msilib name 'MsiGetProductInfoFromScript' + AWSuffix;
3531 function MsiGetProductCodeA; external msilib name 'MsiGetProductCodeA';
3532 function MsiGetProductCodeW; external msilib name 'MsiGetProductCodeW';
3533 function MsiGetProductCode; external msilib name 'MsiGetProductCode' + AWSuffix;
3534 function MsiGetUserInfoA; external msilib name 'MsiGetUserInfoA';
3535 function MsiGetUserInfoW; external msilib name 'MsiGetUserInfoW';
3536 function MsiGetUserInfo; external msilib name 'MsiGetUserInfo' + AWSuffix;
3537 function MsiCollectUserInfoA; external msilib name 'MsiCollectUserInfoA';
3538 function MsiCollectUserInfoW; external msilib name 'MsiCollectUserInfoW';
3539 function MsiCollectUserInfo; external msilib name 'MsiCollectUserInfo' + AWSuffix;
3540 function MsiApplyPatchA; external msilib name 'MsiApplyPatchA';
3541 function MsiApplyPatchW; external msilib name 'MsiApplyPatchW';
3542 function MsiApplyPatch; external msilib name 'MsiApplyPatch' + AWSuffix;
3543 function MsiGetPatchInfoA; external msilib name 'MsiGetPatchInfoA';
3544 function MsiGetPatchInfoW; external msilib name 'MsiGetPatchInfoW';
3545 function MsiGetPatchInfo; external msilib name 'MsiGetPatchInfo' + AWSuffix;
3546 function MsiEnumPatchesA; external msilib name 'MsiEnumPatchesA';
3547 function MsiEnumPatchesW; external msilib name 'MsiEnumPatchesW';
3548 function MsiEnumPatches; external msilib name 'MsiEnumPatches' + AWSuffix;
3549 function MsiQueryFeatureStateA; external msilib name 'MsiQueryFeatureStateA';
3550 function MsiQueryFeatureStateW; external msilib name 'MsiQueryFeatureStateW';
3551 function MsiQueryFeatureState; external msilib name 'MsiQueryFeatureState' + AWSuffix;
3552 function MsiUseFeatureA; external msilib name 'MsiUseFeatureA';
3553 function MsiUseFeatureW; external msilib name 'MsiUseFeatureW';
3554 function MsiUseFeature; external msilib name 'MsiUseFeature' + AWSuffix;
3555 function MsiUseFeatureExA; external msilib name 'MsiUseFeatureExA';
3556 function MsiUseFeatureExW; external msilib name 'MsiUseFeatureExW';
3557 function MsiUseFeatureEx; external msilib name 'MsiUseFeatureEx' + AWSuffix;
3558 function MsiGetFeatureUsageA; external msilib name 'MsiGetFeatureUsageA';
3559 function MsiGetFeatureUsageW; external msilib name 'MsiGetFeatureUsageW';
3560 function MsiGetFeatureUsage; external msilib name 'MsiGetFeatureUsage' + AWSuffix;
3561 function MsiConfigureFeatureA; external msilib name 'MsiConfigureFeatureA';
3562 function MsiConfigureFeatureW; external msilib name 'MsiConfigureFeatureW';
3563 function MsiConfigureFeature; external msilib name 'MsiConfigureFeature' + AWSuffix;
3564 function MsiReinstallFeatureA; external msilib name 'MsiReinstallFeatureA';
3565 function MsiReinstallFeatureW; external msilib name 'MsiReinstallFeatureW';
3566 function MsiReinstallFeature; external msilib name 'MsiReinstallFeature' + AWSuffix;
3567 function MsiProvideComponentA; external msilib name 'MsiProvideComponentA';
3568 function MsiProvideComponentW; external msilib name 'MsiProvideComponentW';
3569 function MsiProvideComponent; external msilib name 'MsiProvideComponent' + AWSuffix;
3570 function MsiProvideQualifiedComponentA; external msilib name 'MsiProvideQualifiedComponentA';
3571 function MsiProvideQualifiedComponentW; external msilib name 'MsiProvideQualifiedComponentW';
3572 function MsiProvideQualifiedComponent; external msilib name 'MsiProvideQualifiedComponent' + AWSuffix;
3573 function MsiProvideQualifiedComponentExA; external msilib name 'MsiProvideQualifiedComponentExA';
3574 function MsiProvideQualifiedComponentExW; external msilib name 'MsiProvideQualifiedComponentExW';
3575 function MsiProvideQualifiedComponentEx; external msilib name 'MsiProvideQualifiedComponentEx' + AWSuffix;
3576 function MsiGetComponentPathA; external msilib name 'MsiGetComponentPathA';
3577 function MsiGetComponentPathW; external msilib name 'MsiGetComponentPathW';
3578 function MsiGetComponentPath; external msilib name 'MsiGetComponentPath' + AWSuffix;
3579 function MsiProvideAssemblyA; external msilib name 'MsiProvideAssemblyA';
3580 function MsiProvideAssemblyW; external msilib name 'MsiProvideAssemblyW';
3581 function MsiProvideAssembly; external msilib name 'MsiProvideAssembly' + AWSuffix;
3582 function MsiEnumProductsA; external msilib name 'MsiEnumProductsA';
3583 function MsiEnumProductsW; external msilib name 'MsiEnumProductsW';
3584 function MsiEnumProducts; external msilib name 'MsiEnumProducts' + AWSuffix;
3585 {$IFDEF MSI110}
3586 function MsiEnumRelatedProductsA; external msilib name 'MsiEnumRelatedProductsA';
3587 function MsiEnumRelatedProductsW; external msilib name 'MsiEnumRelatedProductsW';
3588 function MsiEnumRelatedProducts; external msilib name 'MsiEnumRelatedProducts' + AWSuffix;
3589 {$ENDIF MSI110}
3590 function MsiEnumFeaturesA; external msilib name 'MsiEnumFeaturesA';
3591 function MsiEnumFeaturesW; external msilib name 'MsiEnumFeaturesW';
3592 function MsiEnumFeatures; external msilib name 'MsiEnumFeatures' + AWSuffix;
3593 function MsiEnumComponentsA; external msilib name 'MsiEnumComponentsA';
3594 function MsiEnumComponentsW; external msilib name 'MsiEnumComponentsW';
3595 function MsiEnumComponents; external msilib name 'MsiEnumComponents' + AWSuffix;
3596 function MsiEnumClientsA; external msilib name 'MsiEnumClientsA';
3597 function MsiEnumClientsW; external msilib name 'MsiEnumClientsW';
3598 function MsiEnumClients; external msilib name 'MsiEnumClients' + AWSuffix;
3599 function MsiEnumComponentQualifiersA; external msilib name 'MsiEnumComponentQualifiersA';
3600 function MsiEnumComponentQualifiersW; external msilib name 'MsiEnumComponentQualifiersW';
3601 function MsiEnumComponentQualifiers; external msilib name 'MsiEnumComponentQualifiers' + AWSuffix;
3602 function MsiOpenProductA; external msilib name 'MsiOpenProductA';
3603 function MsiOpenProductW; external msilib name 'MsiOpenProductW';
3604 function MsiOpenProduct; external msilib name 'MsiOpenProduct' + AWSuffix;
3605 function MsiOpenPackageA; external msilib name 'MsiOpenPackageA';
3606 function MsiOpenPackageW; external msilib name 'MsiOpenPackageW';
3607 function MsiOpenPackage; external msilib name 'MsiOpenPackage' + AWSuffix;
3608 function MsiOpenPackageExA; external msilib name 'MsiOpenPackageExA';
3609 function MsiOpenPackageExW; external msilib name 'MsiOpenPackageExW';
3610 function MsiOpenPackageEx; external msilib name 'MsiOpenPackageEx' + AWSuffix;
3611 function MsiGetProductPropertyA; external msilib name 'MsiGetProductPropertyA';
3612 function MsiGetProductPropertyW; external msilib name 'MsiGetProductPropertyW';
3613 function MsiGetProductProperty; external msilib name 'MsiGetProductProperty' + AWSuffix;
3614 function MsiVerifyPackageA; external msilib name 'MsiVerifyPackageA';
3615 function MsiVerifyPackageW; external msilib name 'MsiVerifyPackageW';
3616 function MsiVerifyPackage; external msilib name 'MsiVerifyPackage' + AWSuffix;
3617 function MsiGetFeatureInfoA; external msilib name 'MsiGetFeatureInfoA';
3618 function MsiGetFeatureInfoW; external msilib name 'MsiGetFeatureInfoW';
3619 function MsiGetFeatureInfo; external msilib name 'MsiGetFeatureInfo' + AWSuffix;
3620 function MsiInstallMissingComponentA; external msilib name 'MsiInstallMissingComponentA';
3621 function MsiInstallMissingComponentW; external msilib name 'MsiInstallMissingComponentW';
3622 function MsiInstallMissingComponent; external msilib name 'MsiInstallMissingComponent' + AWSuffix;
3623 function MsiInstallMissingFileA; external msilib name 'MsiInstallMissingFileA';
3624 function MsiInstallMissingFileW; external msilib name 'MsiInstallMissingFileW';
3625 function MsiInstallMissingFile; external msilib name 'MsiInstallMissingFile' + AWSuffix;
3626 function MsiLocateComponentA; external msilib name 'MsiLocateComponentA';
3627 function MsiLocateComponentW; external msilib name 'MsiLocateComponentW';
3628 function MsiLocateComponent; external msilib name 'MsiLocateComponent' + AWSuffix;
3629 {$IFDEF MSI110}
3630 function MsiSourceListClearAllA; external msilib name 'MsiSourceListClearAllA';
3631 function MsiSourceListClearAllW; external msilib name 'MsiSourceListClearAllW';
3632 function MsiSourceListClearAll; external msilib name 'MsiSourceListClearAll' + AWSuffix;
3633 function MsiSourceListAddSourceA; external msilib name 'MsiSourceListAddSourceA';
3634 function MsiSourceListAddSourceW; external msilib name 'MsiSourceListAddSourceW';
3635 function MsiSourceListAddSource; external msilib name 'MsiSourceListAddSource' + AWSuffix;
3636 function MsiSourceListForceResolutionA; external msilib name 'MsiSourceListForceResolutionA';
3637 function MsiSourceListForceResolutionW; external msilib name 'MsiSourceListForceResolutionW';
3638 function MsiSourceListForceResolution; external msilib name 'MsiSourceListForceResolution' + AWSuffix;
3639 {$ENDIF MSI110}
3640 function MsiGetFileVersionA; external msilib name 'MsiGetFileVersionA';
3641 function MsiGetFileVersionW; external msilib name 'MsiGetFileVersionW';
3642 function MsiGetFileVersion; external msilib name 'MsiGetFileVersion' + AWSuffix;
3643 function MsiGetFileHashA; external msilib name 'MsiGetFileHashA';
3644 function MsiGetFileHashW; external msilib name 'MsiGetFileHashW';
3645 function MsiGetFileHash; external msilib name 'MsiGetFileHash' + AWSuffix;
3646 function MsiGetFileSignatureInformationA; external msilib name 'MsiGetFileSignatureInformationA';
3647 function MsiGetFileSignatureInformationW; external msilib name 'MsiGetFileSignatureInformationW';
3648 function MsiGetFileSignatureInformation; external msilib name 'MsiGetFileSignatureInformation' + AWSuffix;
3649 {$IFDEF MSI110}
3650 function MsiGetShortcutTargetA; external msilib name 'MsiGetShortcutTargetA';
3651 function MsiGetShortcutTargetW; external msilib name 'MsiGetShortcutTargetW';
3652 function MsiGetShortcutTarget; external msilib name 'MsiGetShortcutTarget' + AWSuffix;
3653 {$ENDIF MSI110}
3654 function MsiIsProductElevatedA; external msilib name 'MsiIsProductElevatedA';
3655 function MsiIsProductElevatedW; external msilib name 'MsiIsProductElevatedW';
3656 function MsiIsProductElevated; external msilib name 'MsiIsProductElevated' + AWSuffix;
3657 
3658 {$ENDIF DYNAMIC_LINK}
3659 
3660 {$ENDIF JWA_INTERFACESECTION}
3661 
3662 
3663 {$IFNDEF JWA_OMIT_SECTIONS}
3664 end.
3665 {$ENDIF JWA_OMIT_SECTIONS}
3666