jwamsi.pas 122 KB

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