jwamsi.pas 122 KB

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