jwamsiquery.pas 96 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955
  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: msiquery.h, released June 2000. The original Pascal }
  9. { code is: MsiQuery.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. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. unit JwaMsiQuery;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "msiquery.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaMsi, JwaWinBase, JwaWinType;
  51. (*****************************************************************************\
  52. * *
  53. * MsiQuery.h - Interface to running installer for custom actions and tools *
  54. * *
  55. * Version 1.0 - 1.2 *
  56. * *
  57. * NOTES: All buffers sizes are TCHAR count, null included only on input *
  58. * Return argument pointers may be null if not interested in value *
  59. * Returned handles of all types must be closed: MsiCloseHandle(h) *
  60. * Functions with UINT return type return a system error code *
  61. * Designated functions will set or clear the last error record, *
  62. * which is then accessible with MsiGetLastErrorRecord. However, *
  63. * the following argument errors do not register an error record: *
  64. * ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, ERROR_MORE_DATA. *
  65. * *
  66. * Copyright (c) 1999-2000, Microsoft Corp. All rights reserved. *
  67. * *
  68. \*****************************************************************************)
  69. const
  70. MSI_NULL_INTEGER = DWORD($80000000); // integer value reserved for null
  71. {$EXTERNALSYM MSI_NULL_INTEGER}
  72. // MsiOpenDatabase persist predefine values, otherwise output database path is used
  73. MSIDBOPEN_READONLY = LPCTSTR(0); // database open read-only, no persistent changes
  74. {$EXTERNALSYM MSIDBOPEN_READONLY}
  75. MSIDBOPEN_TRANSACT = LPCTSTR(1); // database read/write in transaction mode
  76. {$EXTERNALSYM MSIDBOPEN_TRANSACT}
  77. MSIDBOPEN_DIRECT = LPCTSTR(2); // database direct read/write without transaction
  78. {$EXTERNALSYM MSIDBOPEN_DIRECT}
  79. MSIDBOPEN_CREATE = LPCTSTR(3); // create new database, transact mode read/write
  80. {$EXTERNALSYM MSIDBOPEN_CREATE}
  81. MSIDBOPEN_CREATEDIRECT = LPCTSTR(4); // create new database, direct mode read/write
  82. {$EXTERNALSYM MSIDBOPEN_CREATEDIRECT}
  83. MSIDBOPEN_PATCHFILE = 32 div SizeOf(TCHAR); // add flag to indicate patch file
  84. MSIDBSTATE_ERROR = DWORD(-1); // invalid database handle
  85. {$EXTERNALSYM MSIDBSTATE_ERROR}
  86. MSIDBSTATE_READ = 0; // database open read-only, no persistent changes
  87. {$EXTERNALSYM MSIDBSTATE_READ}
  88. MSIDBSTATE_WRITE = 1; // database readable and updatable
  89. {$EXTERNALSYM MSIDBSTATE_WRITE}
  90. type
  91. MSIDBSTATE = DWORD;
  92. {$EXTERNALSYM MSIDBSTATE}
  93. TMsiDbState = MSIDBSTATE;
  94. const
  95. MSIMODIFY_SEEK = DWORD(-1); // reposition to current record primary key
  96. {$EXTERNALSYM MSIMODIFY_SEEK}
  97. MSIMODIFY_REFRESH = 0; // refetch current record data
  98. {$EXTERNALSYM MSIMODIFY_REFRESH}
  99. MSIMODIFY_INSERT = 1; // insert new record, fails if matching key exists
  100. {$EXTERNALSYM MSIMODIFY_INSERT}
  101. MSIMODIFY_UPDATE = 2; // update existing non-key data of fetched record
  102. {$EXTERNALSYM MSIMODIFY_UPDATE}
  103. MSIMODIFY_ASSIGN = 3; // insert record, replacing any existing record
  104. {$EXTERNALSYM MSIMODIFY_ASSIGN}
  105. MSIMODIFY_REPLACE = 4; // update record, delete old if primary key edit
  106. {$EXTERNALSYM MSIMODIFY_REPLACE}
  107. MSIMODIFY_MERGE = 5; // fails if record with duplicate key not identical
  108. {$EXTERNALSYM MSIMODIFY_MERGE}
  109. MSIMODIFY_DELETE = 6; // remove row referenced by this record from table
  110. {$EXTERNALSYM MSIMODIFY_DELETE}
  111. MSIMODIFY_INSERT_TEMPORARY = 7; // insert a temporary record
  112. {$EXTERNALSYM MSIMODIFY_INSERT_TEMPORARY}
  113. MSIMODIFY_VALIDATE = 8; // validate a fetched record
  114. {$EXTERNALSYM MSIMODIFY_VALIDATE}
  115. MSIMODIFY_VALIDATE_NEW = 9; // validate a new record
  116. {$EXTERNALSYM MSIMODIFY_VALIDATE_NEW}
  117. MSIMODIFY_VALIDATE_FIELD = 10; // validate field(s) of an incomplete record
  118. {$EXTERNALSYM MSIMODIFY_VALIDATE_FIELD}
  119. MSIMODIFY_VALIDATE_DELETE = 11; // validate before deleting record
  120. {$EXTERNALSYM MSIMODIFY_VALIDATE_DELETE}
  121. type
  122. MSIMODIFY = DWORD;
  123. {$EXTERNALSYM MSIMODIFY}
  124. TMsiModify = MSIMODIFY;
  125. const
  126. MSICOLINFO_NAMES = 0; // return column names
  127. {$EXTERNALSYM MSICOLINFO_NAMES}
  128. MSICOLINFO_TYPES = 1; // return column definitions, datatype code followed by width
  129. {$EXTERNALSYM MSICOLINFO_TYPES}
  130. type
  131. MSICOLINFO = DWORD;
  132. {$EXTERNALSYM MSICOLINFO}
  133. TMsiColInfo = MSICOLINFO;
  134. const
  135. MSICONDITION_FALSE = 0; // expression evaluates to False
  136. {$EXTERNALSYM MSICONDITION_FALSE}
  137. MSICONDITION_TRUE = 1; // expression evaluates to True
  138. {$EXTERNALSYM MSICONDITION_TRUE}
  139. MSICONDITION_NONE = 2; // no expression present
  140. {$EXTERNALSYM MSICONDITION_NONE}
  141. MSICONDITION_ERROR = 3; // syntax error in expression
  142. {$EXTERNALSYM MSICONDITION_ERROR}
  143. type
  144. MSICONDITION = DWORD;
  145. {$EXTERNALSYM MSICONDITION}
  146. TMsiCondition = MSICONDITION;
  147. const
  148. MSICOSTTREE_SELFONLY = 0;
  149. {$EXTERNALSYM MSICOSTTREE_SELFONLY}
  150. MSICOSTTREE_CHILDREN = 1;
  151. {$EXTERNALSYM MSICOSTTREE_CHILDREN}
  152. MSICOSTTREE_PARENTS = 2;
  153. {$EXTERNALSYM MSICOSTTREE_PARENTS}
  154. MSICOSTTREE_RESERVED = 3; // Reserved for future use
  155. {$EXTERNALSYM MSICOSTTREE_RESERVED}
  156. type
  157. MSICOSTTREE = DWORD;
  158. {$EXTERNALSYM MSICOSTTREE}
  159. TMsiCostTree = MSICOSTTREE;
  160. const
  161. MSIDBERROR_INVALIDARG = DWORD(-3); // invalid argument
  162. {$EXTERNALSYM MSIDBERROR_INVALIDARG}
  163. MSIDBERROR_MOREDATA = DWORD(-2); // buffer too small
  164. {$EXTERNALSYM MSIDBERROR_MOREDATA}
  165. MSIDBERROR_FUNCTIONERROR = DWORD(-1); // function error
  166. {$EXTERNALSYM MSIDBERROR_FUNCTIONERROR}
  167. MSIDBERROR_NOERROR = 0; // no error
  168. {$EXTERNALSYM MSIDBERROR_NOERROR}
  169. MSIDBERROR_DUPLICATEKEY = 1; // new record duplicates primary keys of existing record in table
  170. {$EXTERNALSYM MSIDBERROR_DUPLICATEKEY}
  171. MSIDBERROR_REQUIRED = 2; // non-nullable column, no null values allowed
  172. {$EXTERNALSYM MSIDBERROR_REQUIRED}
  173. MSIDBERROR_BADLINK = 3; // corresponding record in foreign table not found
  174. {$EXTERNALSYM MSIDBERROR_BADLINK}
  175. MSIDBERROR_OVERFLOW = 4; // data greater than maximum value allowed
  176. {$EXTERNALSYM MSIDBERROR_OVERFLOW}
  177. MSIDBERROR_UNDERFLOW = 5; // data less than minimum value allowed
  178. {$EXTERNALSYM MSIDBERROR_UNDERFLOW}
  179. MSIDBERROR_NOTINSET = 6; // data not a member of the values permitted in the set
  180. {$EXTERNALSYM MSIDBERROR_NOTINSET}
  181. MSIDBERROR_BADVERSION = 7; // invalid version string
  182. {$EXTERNALSYM MSIDBERROR_BADVERSION}
  183. MSIDBERROR_BADCASE = 8; // invalid case, must be all upper-case or all lower-case
  184. {$EXTERNALSYM MSIDBERROR_BADCASE}
  185. MSIDBERROR_BADGUID = 9; // invalid GUID
  186. {$EXTERNALSYM MSIDBERROR_BADGUID}
  187. MSIDBERROR_BADWILDCARD = 10; // invalid wildcardfilename or use of wildcards
  188. {$EXTERNALSYM MSIDBERROR_BADWILDCARD}
  189. MSIDBERROR_BADIDENTIFIER = 11; // bad identifier
  190. {$EXTERNALSYM MSIDBERROR_BADIDENTIFIER}
  191. MSIDBERROR_BADLANGUAGE = 12; // bad language Id(s)
  192. {$EXTERNALSYM MSIDBERROR_BADLANGUAGE}
  193. MSIDBERROR_BADFILENAME = 13; // bad filename
  194. {$EXTERNALSYM MSIDBERROR_BADFILENAME}
  195. MSIDBERROR_BADPATH = 14; // bad path
  196. {$EXTERNALSYM MSIDBERROR_BADPATH}
  197. MSIDBERROR_BADCONDITION = 15; // bad conditional statement
  198. {$EXTERNALSYM MSIDBERROR_BADCONDITION}
  199. MSIDBERROR_BADFORMATTED = 16; // bad format string
  200. {$EXTERNALSYM MSIDBERROR_BADFORMATTED}
  201. MSIDBERROR_BADTEMPLATE = 17; // bad template string
  202. {$EXTERNALSYM MSIDBERROR_BADTEMPLATE}
  203. MSIDBERROR_BADDEFAULTDIR = 18; // bad string in DefaultDir column of Directory table
  204. {$EXTERNALSYM MSIDBERROR_BADDEFAULTDIR}
  205. MSIDBERROR_BADREGPATH = 19; // bad registry path string
  206. {$EXTERNALSYM MSIDBERROR_BADREGPATH}
  207. MSIDBERROR_BADCUSTOMSOURCE = 20; // bad string in CustomSource column of CustomAction table
  208. {$EXTERNALSYM MSIDBERROR_BADCUSTOMSOURCE}
  209. MSIDBERROR_BADPROPERTY = 21; // bad property string
  210. {$EXTERNALSYM MSIDBERROR_BADPROPERTY}
  211. MSIDBERROR_MISSINGDATA = 22; // _Validation table missing reference to column
  212. {$EXTERNALSYM MSIDBERROR_MISSINGDATA}
  213. MSIDBERROR_BADCATEGORY = 23; // Category column of _Validation table for column is invalid
  214. {$EXTERNALSYM MSIDBERROR_BADCATEGORY}
  215. MSIDBERROR_BADKEYTABLE = 24; // table in KeyTable column of _Validation table could not be found/loaded
  216. {$EXTERNALSYM MSIDBERROR_BADKEYTABLE}
  217. MSIDBERROR_BADMAXMINVALUES = 25; // value in MaxValue column of _Validation table is less than value in MinValue column
  218. {$EXTERNALSYM MSIDBERROR_BADMAXMINVALUES}
  219. MSIDBERROR_BADCABINET = 26; // bad cabinet name
  220. {$EXTERNALSYM MSIDBERROR_BADCABINET}
  221. MSIDBERROR_BADSHORTCUT = 27; // bad shortcut target
  222. {$EXTERNALSYM MSIDBERROR_BADSHORTCUT}
  223. MSIDBERROR_STRINGOVERFLOW = 28; // string overflow (greater than length allowed in column def)
  224. {$EXTERNALSYM MSIDBERROR_STRINGOVERFLOW}
  225. MSIDBERROR_BADLOCALIZEATTRIB = 29; // invalid localization attribute (primary keys cannot be localized)
  226. {$EXTERNALSYM MSIDBERROR_BADLOCALIZEATTRIB}
  227. type
  228. MSIDBERROR = DWORD;
  229. {$EXTERNALSYM MSIDBERROR}
  230. TMsiDbError = MSIDBERROR;
  231. const
  232. MSIRUNMODE_ADMIN = 0; // admin mode install, else product install
  233. {$EXTERNALSYM MSIRUNMODE_ADMIN}
  234. MSIRUNMODE_ADVERTISE = 1; // installing advertisements, else installing or updating product
  235. {$EXTERNALSYM MSIRUNMODE_ADVERTISE}
  236. MSIRUNMODE_MAINTENANCE = 2; // modifying an existing installation, else new installation
  237. {$EXTERNALSYM MSIRUNMODE_MAINTENANCE}
  238. MSIRUNMODE_ROLLBACKENABLED = 3; // rollback is enabled
  239. {$EXTERNALSYM MSIRUNMODE_ROLLBACKENABLED}
  240. MSIRUNMODE_LOGENABLED = 4; // log file active, enabled prior to install session
  241. {$EXTERNALSYM MSIRUNMODE_LOGENABLED}
  242. MSIRUNMODE_OPERATIONS = 5; // spooling execute operations, else in determination phase
  243. {$EXTERNALSYM MSIRUNMODE_OPERATIONS}
  244. MSIRUNMODE_REBOOTATEND = 6; // reboot needed after successful installation (settable)
  245. {$EXTERNALSYM MSIRUNMODE_REBOOTATEND}
  246. MSIRUNMODE_REBOOTNOW = 7; // reboot needed to continue installation (settable)
  247. {$EXTERNALSYM MSIRUNMODE_REBOOTNOW}
  248. MSIRUNMODE_CABINET = 8; // installing files from cabinets and files using Media table
  249. {$EXTERNALSYM MSIRUNMODE_CABINET}
  250. MSIRUNMODE_SOURCESHORTNAMES= 9; // source LongFileNames suppressed via PID_MSISOURCE summary property
  251. {$EXTERNALSYM MSIRUNMODE_SOURCESHORTNAMES}
  252. MSIRUNMODE_TARGETSHORTNAMES= 10; // target LongFileNames suppressed via SHORTFILENAMES property
  253. {$EXTERNALSYM MSIRUNMODE_TARGETSHORTNAMES}
  254. MSIRUNMODE_RESERVED11 = 11; // future use
  255. {$EXTERNALSYM MSIRUNMODE_RESERVED11}
  256. MSIRUNMODE_WINDOWS9X = 12; // operating systems is Windows9?, else Windows NT
  257. {$EXTERNALSYM MSIRUNMODE_WINDOWS9X}
  258. MSIRUNMODE_ZAWENABLED = 13; // operating system supports demand installation
  259. {$EXTERNALSYM MSIRUNMODE_ZAWENABLED}
  260. MSIRUNMODE_RESERVED14 = 14; // future use
  261. {$EXTERNALSYM MSIRUNMODE_RESERVED14}
  262. MSIRUNMODE_RESERVED15 = 15; // future use
  263. {$EXTERNALSYM MSIRUNMODE_RESERVED15}
  264. MSIRUNMODE_SCHEDULED = 16; // custom action call from install script execution
  265. {$EXTERNALSYM MSIRUNMODE_SCHEDULED}
  266. MSIRUNMODE_ROLLBACK = 17; // custom action call from rollback execution script
  267. {$EXTERNALSYM MSIRUNMODE_ROLLBACK}
  268. MSIRUNMODE_COMMIT = 18; // custom action call from commit execution script
  269. {$EXTERNALSYM MSIRUNMODE_COMMIT}
  270. type
  271. MSIRUNMODE = DWORD;
  272. {$EXTERNALSYM MSIRUNMODE}
  273. TMsiRunMode = MSIRUNMODE;
  274. const
  275. INSTALLMESSAGE_TYPEMASK = DWORD($FF000000); // mask for type code
  276. {$EXTERNALSYM INSTALLMESSAGE_TYPEMASK}
  277. // Note: INSTALLMESSAGE_ERROR, INSTALLMESSAGE_WARNING, INSTALLMESSAGE_USER are to or'd
  278. // with a message box style to indicate the buttons to display and return:
  279. // MB_OK,MB_OKCANCEL,MB_ABORTRETRYIGNORE,MB_YESNOCANCEL,MB_YESNO,MB_RETRYCANCEL
  280. // the default button (MB_DEFBUTTON1 is normal default):
  281. // MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3
  282. // and optionally an icon style:
  283. // MB_ICONERROR, MB_ICONQUESTION, MB_ICONWARNING, MB_ICONINFORMATION
  284. const
  285. MSITRANSFORM_ERROR_ADDEXISTINGROW = $00000001;
  286. {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGROW}
  287. MSITRANSFORM_ERROR_DELMISSINGROW = $00000002;
  288. {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGROW}
  289. MSITRANSFORM_ERROR_ADDEXISTINGTABLE = $00000004;
  290. {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGTABLE}
  291. MSITRANSFORM_ERROR_DELMISSINGTABLE = $00000008;
  292. {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGTABLE}
  293. MSITRANSFORM_ERROR_UPDATEMISSINGROW = $00000010;
  294. {$EXTERNALSYM MSITRANSFORM_ERROR_UPDATEMISSINGROW}
  295. MSITRANSFORM_ERROR_CHANGECODEPAGE = $00000020;
  296. {$EXTERNALSYM MSITRANSFORM_ERROR_CHANGECODEPAGE}
  297. MSITRANSFORM_ERROR_VIEWTRANSFORM = $00000100;
  298. {$EXTERNALSYM MSITRANSFORM_ERROR_VIEWTRANSFORM}
  299. type
  300. MSITRANSFORM_ERROR = DWORD;
  301. {$EXTERNALSYM MSITRANSFORM_ERROR}
  302. TMsiTransformError = MSITRANSFORM_ERROR;
  303. const
  304. MSITRANSFORM_VALIDATE_LANGUAGE = $00000001;
  305. {$EXTERNALSYM MSITRANSFORM_VALIDATE_LANGUAGE}
  306. MSITRANSFORM_VALIDATE_PRODUCT = $00000002;
  307. {$EXTERNALSYM MSITRANSFORM_VALIDATE_PRODUCT}
  308. MSITRANSFORM_VALIDATE_PLATFORM = $00000004;
  309. {$EXTERNALSYM MSITRANSFORM_VALIDATE_PLATFORM}
  310. MSITRANSFORM_VALIDATE_MAJORVERSION = $00000008;
  311. {$EXTERNALSYM MSITRANSFORM_VALIDATE_MAJORVERSION}
  312. MSITRANSFORM_VALIDATE_MINORVERSION = $00000010;
  313. {$EXTERNALSYM MSITRANSFORM_VALIDATE_MINORVERSION}
  314. MSITRANSFORM_VALIDATE_UPDATEVERSION = $00000020;
  315. {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPDATEVERSION}
  316. MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION = $00000040;
  317. {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION}
  318. MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION = $00000080;
  319. {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION}
  320. MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION = $00000100;
  321. {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION}
  322. MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION = $00000200;
  323. {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION}
  324. MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION = $00000400;
  325. {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION}
  326. MSITRANSFORM_VALIDATE_UPGRADECODE = $00000800;
  327. {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPGRADECODE}
  328. type
  329. MSITRANSFORM_VALIDATE = DWORD;
  330. {$EXTERNALSYM MSITRANSFORM_VALIDATE}
  331. TMsiTransformValidate = MSITRANSFORM_VALIDATE;
  332. // -----------------------------------------------------------------------------
  333. // Installer database access functions
  334. // -----------------------------------------------------------------------------
  335. // Prepare a database query, creating a view object
  336. // Returns ERROR_SUCCESS if successful, and the view handle is returned,
  337. // else ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_BAD_QUERY_SYNTAX, ERROR_GEN_FAILURE
  338. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  339. function MsiDatabaseOpenViewA(hDatabase: MSIHANDLE; szQuery: LPCSTR; var phView: MSIHANDLE): UINT; stdcall;
  340. {$EXTERNALSYM MsiDatabaseOpenViewA}
  341. function MsiDatabaseOpenViewW(hDatabase: MSIHANDLE; szQuery: LPCWSTR; var phView: MSIHANDLE): UINT; stdcall;
  342. {$EXTERNALSYM MsiDatabaseOpenViewW}
  343. function MsiDatabaseOpenView(hDatabase: MSIHANDLE; szQuery: LPCTSTR; var phView: MSIHANDLE): UINT; stdcall;
  344. {$EXTERNALSYM MsiDatabaseOpenView}
  345. // Returns the MSIDBERROR enum and name of the column corresponding to the error
  346. // Similar to a GetLastError function, but for the view. NOT the same as MsiGetLastErrorRecord
  347. // Returns errors of MsiViewModify.
  348. function MsiViewGetErrorA(hView: MSIHANDLE; szColumnNameBuffer: LPSTR;
  349. var pcchBuf: DWORD): MSIDBERROR; stdcall;
  350. {$EXTERNALSYM MsiViewGetErrorA}
  351. function MsiViewGetErrorW(hView: MSIHANDLE; szColumnNameBuffer: LPWSTR;
  352. var pcchBuf: DWORD): MSIDBERROR; stdcall;
  353. {$EXTERNALSYM MsiViewGetErrorW}
  354. function MsiViewGetError(hView: MSIHANDLE; szColumnNameBuffer: LPTSTR;
  355. var pcchBuf: DWORD): MSIDBERROR; stdcall;
  356. {$EXTERNALSYM MsiViewGetError}
  357. // Exectute the view query, supplying parameters as required
  358. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE
  359. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  360. function MsiViewExecute(hView: MSIHANDLE; hRecord: MSIHANDLE): UINT; stdcall;
  361. {$EXTERNALSYM MsiViewExecute}
  362. // Fetch the next sequential record from the view
  363. // Result is ERROR_SUCCESS if a row is found, and its handle is returned
  364. // else ERROR_NO_MORE_ITEMS if no records remain, and a null handle is returned
  365. // else result is error: ERROR_INVALID_HANDLE_STATE, ERROR_INVALID_HANDLE, ERROR_GEN_FAILURE
  366. function MsiViewFetch(hView: MSIHANDLE; var phRecord: MSIHANDLE): UINT; stdcall;
  367. {$EXTERNALSYM MsiViewFetch}
  368. // Modify a database record, parameters must match types in query columns
  369. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE, ERROR_ACCESS_DENIED
  370. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  371. function MsiViewModify(hView: MSIHANDLE; eModifyMode: MSIMODIFY; hRecord: MSIHANDLE): UINT; stdcall;
  372. {$EXTERNALSYM MsiViewModify}
  373. // Return the column names or specifications for the current view
  374. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, or ERROR_INVALID_HANDLE_STATE
  375. function MsiViewGetColumnInfo(hView: MSIHANDLE; eColumnInfo: MSICOLINFO;
  376. var phRecord: MSIHANDLE): UINT; stdcall;
  377. {$EXTERNALSYM MsiViewGetColumnInfo}
  378. // Release the result set for an executed view, to allow re-execution
  379. // Only needs to be called if not all records have been fetched
  380. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE
  381. function MsiViewClose(hView: MSIHANDLE): UINT; stdcall;
  382. {$EXTERNALSYM MsiViewClose}
  383. // Return a record containing the names of all primary key columns for a given table
  384. // Returns an MSIHANDLE for a record containing the name of each column.
  385. // The field count of the record corresponds to the number of primary key columns.
  386. // Field [0] of the record contains the table name.
  387. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_TABLE
  388. function MsiDatabaseGetPrimaryKeysA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
  389. var phRecord: MSIHANDLE): UINT; stdcall;
  390. {$EXTERNALSYM MsiDatabaseGetPrimaryKeysA}
  391. function MsiDatabaseGetPrimaryKeysW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
  392. var phRecord: MSIHANDLE): UINT; stdcall;
  393. {$EXTERNALSYM MsiDatabaseGetPrimaryKeysW}
  394. function MsiDatabaseGetPrimaryKeys(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
  395. var phRecord: MSIHANDLE): UINT; stdcall;
  396. {$EXTERNALSYM MsiDatabaseGetPrimaryKeys}
  397. // Return an enum defining the state of the table (temporary, unknown, or persistent).
  398. // Returns MSICONDITION_ERROR, MSICONDITION_FALSE, MSICONDITION_TRUE, MSICONDITION_NONE
  399. function MsiDatabaseIsTablePersistentA(hDatabase: MSIHANDLE; szTableName: LPCSTR): MSICONDITION; stdcall;
  400. {$EXTERNALSYM MsiDatabaseIsTablePersistentA}
  401. function MsiDatabaseIsTablePersistentW(hDatabase: MSIHANDLE; szTableName: LPCWSTR): MSICONDITION; stdcall;
  402. {$EXTERNALSYM MsiDatabaseIsTablePersistentW}
  403. function MsiDatabaseIsTablePersistent(hDatabase: MSIHANDLE; szTableName: LPCTSTR): MSICONDITION; stdcall;
  404. {$EXTERNALSYM MsiDatabaseIsTablePersistent}
  405. // --------------------------------------------------------------------------
  406. // Summary information stream management functions
  407. // --------------------------------------------------------------------------
  408. // Integer Property IDs: 1, 14, 15, 16, 19
  409. // DateTime Property IDs: 10, 11, 12, 13
  410. // Text Property IDs: 2, 3, 4, 5, 6, 7, 8, 9, 18
  411. // Unsupported Propery IDs: 0 (PID_DICTIONARY), 17 (PID_THUMBNAIL)
  412. // Obtain a handle for the _SummaryInformation stream for an MSI database
  413. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  414. function MsiGetSummaryInformationA(hDatabase: MSIHANDLE; szDatabasePath: LPCSTR;
  415. uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
  416. {$EXTERNALSYM MsiGetSummaryInformationA}
  417. function MsiGetSummaryInformationW(hDatabase: MSIHANDLE; szDatabasePath: LPCWSTR;
  418. uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
  419. {$EXTERNALSYM MsiGetSummaryInformationW}
  420. function MsiGetSummaryInformation(hDatabase: MSIHANDLE; szDatabasePath: LPCTSTR;
  421. uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
  422. {$EXTERNALSYM MsiGetSummaryInformation}
  423. // Obtain the number of existing properties in the SummaryInformation stream
  424. function MsiSummaryInfoGetPropertyCount(hSummaryInfo: MSIHANDLE; var puiPropertyCount: UINT): UINT; stdcall;
  425. {$EXTERNALSYM MsiSummaryInfoGetPropertyCount}
  426. // Set a single summary information property
  427. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
  428. function MsiSummaryInfoSetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  429. uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCSTR): UINT; stdcall;
  430. {$EXTERNALSYM MsiSummaryInfoSetPropertyA}
  431. function MsiSummaryInfoSetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  432. uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCWSTR): UINT; stdcall;
  433. {$EXTERNALSYM MsiSummaryInfoSetPropertyW}
  434. function MsiSummaryInfoSetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  435. uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCTSTR): UINT; stdcall;
  436. {$EXTERNALSYM MsiSummaryInfoSetProperty}
  437. // Get a single property from the summary information
  438. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
  439. function MsiSummaryInfoGetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  440. var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPSTR;
  441. var pcchValueBuf: DWORD): UINT; stdcall;
  442. {$EXTERNALSYM MsiSummaryInfoGetPropertyA}
  443. function MsiSummaryInfoGetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  444. var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPWSTR;
  445. var pcchValueBuf: DWORD): UINT; stdcall;
  446. {$EXTERNALSYM MsiSummaryInfoGetPropertyW}
  447. function MsiSummaryInfoGetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
  448. var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPTSTR;
  449. var pcchValueBuf: DWORD): UINT; stdcall;
  450. {$EXTERNALSYM MsiSummaryInfoGetProperty}
  451. // Write back changed information to summary information stream
  452. function MsiSummaryInfoPersist(hSummaryInfo: MSIHANDLE): UINT; stdcall;
  453. {$EXTERNALSYM MsiSummaryInfoPersist}
  454. // --------------------------------------------------------------------------
  455. // Installer database management functions - not used by custom actions
  456. // --------------------------------------------------------------------------
  457. // Open an installer database, specifying the persistance mode, which is a pointer.
  458. // Predefined persist values are reserved pointer values, requiring pointer arithmetic.
  459. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  460. function MsiOpenDatabaseA(szDatabasePath: LPCSTR; szPersist: LPCSTR;
  461. var phDatabase: MSIHANDLE): UINT; stdcall;
  462. {$EXTERNALSYM MsiOpenDatabaseA}
  463. function MsiOpenDatabaseW(szDatabasePath: LPCWSTR; szPersist: LPCWSTR;
  464. var phDatabase: MSIHANDLE): UINT; stdcall;
  465. {$EXTERNALSYM MsiOpenDatabaseW}
  466. function MsiOpenDatabase(szDatabasePath: LPCTSTR; szPersist: LPCTSTR;
  467. var phDatabase: MSIHANDLE): UINT; stdcall;
  468. {$EXTERNALSYM MsiOpenDatabase}
  469. // Import an MSI text archive table into an open database
  470. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  471. function MsiDatabaseImportA(hDatabase: MSIHANDLE; szFolderPath: LPCSTR;
  472. szFileName: LPCSTR): UINT; stdcall;
  473. {$EXTERNALSYM MsiDatabaseImportA}
  474. function MsiDatabaseImportW(hDatabase: MSIHANDLE; szFolderPath: LPCWSTR;
  475. szFileName: LPCWSTR): UINT; stdcall;
  476. {$EXTERNALSYM MsiDatabaseImportW}
  477. function MsiDatabaseImport(hDatabase: MSIHANDLE; szFolderPath: LPCTSTR;
  478. szFileName: LPCTSTR): UINT; stdcall;
  479. {$EXTERNALSYM MsiDatabaseImport}
  480. // Export an MSI table from an open database to a text archive file
  481. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  482. function MsiDatabaseExportA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
  483. szFolderPath: LPCSTR; szFileName: LPCSTR): UINT; stdcall;
  484. {$EXTERNALSYM MsiDatabaseExportA}
  485. function MsiDatabaseExportW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
  486. szFolderPath: LPCWSTR; szFileName: LPCWSTR): UINT; stdcall;
  487. {$EXTERNALSYM MsiDatabaseExportW}
  488. function MsiDatabaseExport(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
  489. szFolderPath: LPCTSTR; szFileName: LPCTSTR): UINT; stdcall;
  490. {$EXTERNALSYM MsiDatabaseExport}
  491. // Merge two database together, allowing duplicate rows
  492. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  493. function MsiDatabaseMergeA(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
  494. szTableName: LPCSTR): UINT; stdcall;
  495. {$EXTERNALSYM MsiDatabaseMergeA}
  496. function MsiDatabaseMergeW(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
  497. szTableName: LPCWSTR): UINT; stdcall;
  498. {$EXTERNALSYM MsiDatabaseMergeW}
  499. function MsiDatabaseMerge(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
  500. szTableName: LPCTSTR): UINT; stdcall;
  501. {$EXTERNALSYM MsiDatabaseMerge}
  502. // Generate a transform file of differences between two databases
  503. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  504. function MsiDatabaseGenerateTransformA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  505. szTransformFile: LPCSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
  506. {$EXTERNALSYM MsiDatabaseGenerateTransformA}
  507. function MsiDatabaseGenerateTransformW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  508. szTransformFile: LPCWSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
  509. {$EXTERNALSYM MsiDatabaseGenerateTransformW}
  510. function MsiDatabaseGenerateTransform(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  511. szTransformFile: LPCTSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
  512. {$EXTERNALSYM MsiDatabaseGenerateTransform}
  513. // Apply a transform file containing database difference
  514. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  515. function MsiDatabaseApplyTransformA(hDatabase: MSIHANDLE; szTransformFile: LPCSTR;
  516. iErrorConditions: Integer): UINT; stdcall;
  517. {$EXTERNALSYM MsiDatabaseApplyTransformA}
  518. function MsiDatabaseApplyTransformW(hDatabase: MSIHANDLE; szTransformFile: LPCWSTR;
  519. iErrorConditions: Integer): UINT; stdcall;
  520. {$EXTERNALSYM MsiDatabaseApplyTransformW}
  521. function MsiDatabaseApplyTransform(hDatabase: MSIHANDLE; szTransformFile: LPCTSTR;
  522. iErrorConditions: Integer): UINT; stdcall;
  523. {$EXTERNALSYM MsiDatabaseApplyTransform}
  524. // Create summary information of existing transform to include validation and error conditions
  525. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  526. function MsiCreateTransformSummaryInfoA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  527. szTransformFile: LPCSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
  528. {$EXTERNALSYM MsiCreateTransformSummaryInfoA}
  529. function MsiCreateTransformSummaryInfoW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  530. szTransformFile: LPCWSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
  531. {$EXTERNALSYM MsiCreateTransformSummaryInfoW}
  532. function MsiCreateTransformSummaryInfo(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
  533. szTransformFile: LPCTSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
  534. {$EXTERNALSYM MsiCreateTransformSummaryInfo}
  535. // Write out all persistent table data, ignored if database opened read-only
  536. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  537. function MsiDatabaseCommit(hDatabase: MSIHANDLE): UINT; stdcall;
  538. {$EXTERNALSYM MsiDatabaseCommit}
  539. // Return the update state of a database
  540. function MsiGetDatabaseState(hDatabase: MSIHANDLE): MSIDBSTATE; stdcall;
  541. {$EXTERNALSYM MsiGetDatabaseState}
  542. // --------------------------------------------------------------------------
  543. // Record object functions
  544. // --------------------------------------------------------------------------
  545. // Create a new record object with the requested number of fields
  546. // Field 0, not included in count, is used for format strings and op codes
  547. // All fields are initialized to null
  548. // Returns a handle to the created record, or 0 if memory could not be allocated
  549. function MsiCreateRecord(cParams: UINT): MSIHANDLE; stdcall;
  550. {$EXTERNALSYM MsiCreateRecord}
  551. // Report whether a record field is NULL
  552. // Returns TRUE if the field is null or does not exist
  553. // Returns FALSE if the field contains data, or the handle is invalid
  554. function MsiRecordIsNull(hRecord: MSIHANDLE; iField: UINT): BOOL; stdcall;
  555. {$EXTERNALSYM MsiRecordIsNull}
  556. // Return the length of a record field
  557. // Returns 0 if field is NULL or non-existent
  558. // Returns sizeof(Integer) if integer data
  559. // Returns character count if string data (not counting null terminator)
  560. // Returns bytes count if stream data
  561. function MsiRecordDataSize(hRecord: MSIHANDLE; iField: UINT): UINT; stdcall;
  562. {$EXTERNALSYM MsiRecordDataSize}
  563. // Set a record field to an integer value
  564. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
  565. function MsiRecordSetInteger(hRecord: MSIHANDLE; iField: UINT; iValue: Integer): UINT; stdcall;
  566. {$EXTERNALSYM MsiRecordSetInteger}
  567. // Copy a string into the designated field
  568. // A null string pointer and an empty string both set the field to null
  569. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
  570. function MsiRecordSetStringA(hRecord: MSIHANDLE; iField: UINT; szValue: LPCSTR): UINT; stdcall;
  571. {$EXTERNALSYM MsiRecordSetStringA}
  572. function MsiRecordSetStringW(hRecord: MSIHANDLE; iField: UINT; szValue: LPCWSTR): UINT; stdcall;
  573. {$EXTERNALSYM MsiRecordSetStringW}
  574. function MsiRecordSetString(hRecord: MSIHANDLE; iField: UINT; szValue: LPCTSTR): UINT; stdcall;
  575. {$EXTERNALSYM MsiRecordSetString}
  576. // Return the integer value from a record field
  577. // Returns the value MSI_NULL_INTEGER if the field is null
  578. // or if the field is a string that cannot be converted to an integer
  579. function MsiRecordGetInteger(hRecord: MSIHANDLE; iField: UINT): Integer; stdcall;
  580. {$EXTERNALSYM MsiRecordGetInteger}
  581. // Return the string value of a record field
  582. // Integer fields will be converted to a string
  583. // Null and non-existent fields will report a value of 0
  584. // Fields containing stream data will return ERROR_INVALID_DATATYPE
  585. // Returns ERROR_SUCCESS, ERROR_MORE_DATA,
  586. // ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD, ERROR_BAD_ARGUMENTS
  587. function MsiRecordGetStringA(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPSTR;
  588. var pcchValueBuf: DWORD): UINT; stdcall;
  589. {$EXTERNALSYM MsiRecordGetStringA}
  590. function MsiRecordGetStringW(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPWSTR;
  591. var pcchValueBuf: DWORD): UINT; stdcall;
  592. {$EXTERNALSYM MsiRecordGetStringW}
  593. function MsiRecordGetString(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPTSTR;
  594. var pcchValueBuf: DWORD): UINT; stdcall;
  595. {$EXTERNALSYM MsiRecordGetString}
  596. // Returns the number of fields allocated in the record
  597. // Does not count field 0, used for formatting and op codes
  598. function MsiRecordGetFieldCount(hRecord: MSIHANDLE): UINT; stdcall;
  599. {$EXTERNALSYM MsiRecordGetFieldCount}
  600. // Set a record stream field from a file
  601. // The contents of the specified file will be read into a stream object
  602. // The stream will be persisted if the record is inserted into the database
  603. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  604. function MsiRecordSetStreamA(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCSTR): UINT; stdcall;
  605. {$EXTERNALSYM MsiRecordSetStreamA}
  606. function MsiRecordSetStreamW(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCWSTR): UINT; stdcall;
  607. {$EXTERNALSYM MsiRecordSetStreamW}
  608. function MsiRecordSetStream(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCTSTR): UINT; stdcall;
  609. {$EXTERNALSYM MsiRecordSetStream}
  610. // Read bytes from a record stream field into a buffer
  611. // Must set the in/out argument to the requested byte count to read
  612. // The number of bytes transferred is returned through the argument
  613. // If no more bytes are available, ERROR_SUCCESS is still returned
  614. function MsiRecordReadStream(hRecord: MSIHANDLE; iField: UINT; szDataBuf: PChar;
  615. var pcbDataBuf: DWORD): UINT; stdcall;
  616. {$EXTERNALSYM MsiRecordReadStream}
  617. // Clears all data fields in a record to NULL
  618. function MsiRecordClearData(hRecord: MSIHANDLE): UINT; stdcall;
  619. {$EXTERNALSYM MsiRecordClearData}
  620. // --------------------------------------------------------------------------
  621. // Functions to access a running installation, called from custom actions
  622. // The install handle is the single argument passed to custom actions
  623. // --------------------------------------------------------------------------
  624. // Return a handle to the database currently in use by this installer instance
  625. function MsiGetActiveDatabase(hInstall: MSIHANDLE): MSIHANDLE; stdcall;
  626. {$EXTERNALSYM MsiGetActiveDatabase}
  627. // Set the value for an installer property
  628. // If the property is not defined, it will be created
  629. // If the value is null or an empty string, the property will be removed
  630. // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
  631. function MsiSetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValue: LPCSTR): UINT; stdcall;
  632. {$EXTERNALSYM MsiSetPropertyA}
  633. function MsiSetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValue: LPCWSTR): UINT; stdcall;
  634. {$EXTERNALSYM MsiSetPropertyW}
  635. function MsiSetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValue: LPCTSTR): UINT; stdcall;
  636. {$EXTERNALSYM MsiSetProperty}
  637. // Get the value for an installer property
  638. // If the property is not defined, it is equivalent to a 0-length value, not error
  639. // Returns ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
  640. function MsiGetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValueBuf: LPSTR;
  641. var pcchValueBuf: DWORD): UINT; stdcall;
  642. {$EXTERNALSYM MsiGetPropertyA}
  643. function MsiGetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValueBuf: LPWSTR;
  644. var pcchValueBuf: DWORD): UINT; stdcall;
  645. {$EXTERNALSYM MsiGetPropertyW}
  646. function MsiGetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValueBuf: LPTSTR;
  647. var pcchValueBuf: DWORD): UINT; stdcall;
  648. {$EXTERNALSYM MsiGetProperty}
  649. // Return the numeric language for the currently running install
  650. // Returns 0 if an install not running
  651. function MsiGetLanguage(hInstall: MSIHANDLE): LANGID; stdcall;
  652. {$EXTERNALSYM MsiGetLanguage}
  653. // Return one of the boolean internal installer states
  654. // Returns FALSE if the handle is not active or if the mode is not implemented
  655. function MsiGetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE): BOOL; stdcall;
  656. {$EXTERNALSYM MsiGetMode}
  657. // Set an internal install session boolean mode - Note: most modes are read-only
  658. // Returns ERROR_SUCCESS if the mode can be set to the desired state
  659. // Returns ERROR_ACCESS_DENIED if the mode is not settable
  660. // Returns ERROR_INVALID_HANDLE if the handle is not an active install session
  661. function MsiSetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE; fState: BOOL): UINT; stdcall;
  662. {$EXTERNALSYM MsiSetMode}
  663. // Format record data using a format string containing field markers and/or properties
  664. // Record field 0 must contain the format string
  665. // Other fields must contain data that may be referenced by the format string.
  666. function MsiFormatRecordA(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPSTR;
  667. var pcchResultBuf: DWORD): UINT; stdcall;
  668. {$EXTERNALSYM MsiFormatRecordA}
  669. function MsiFormatRecordW(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPWSTR;
  670. var pcchResultBuf: DWORD): UINT; stdcall;
  671. {$EXTERNALSYM MsiFormatRecordW}
  672. function MsiFormatRecord(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPTSTR;
  673. var pcchResultBuf: DWORD): UINT; stdcall;
  674. {$EXTERNALSYM MsiFormatRecord}
  675. // Execute another action, either built-in, custom, or UI wizard
  676. // Returns ERROR_FUNCTION_NOT_CALLED if action not found
  677. // Returns ERROR_SUCCESS if action completed succesfully
  678. // Returns ERROR_INSTALL_USEREXIT if user cancelled during action
  679. // Returns ERROR_INSTALL_FAILURE if action failed
  680. // Returns ERROR_INSTALL_SUSPEND if user suspended installation
  681. // Returns ERROR_MORE_DATA if action wishes to skip remaining actions
  682. // Returns ERROR_INVALID_HANDLE_STATE if install session not active
  683. // Returns ERROR_INVALID_DATA if failure calling custom action
  684. // Returns ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER if arguments invalid
  685. function MsiDoActionA(hInstall: MSIHANDLE; szAction: LPCSTR): UINT; stdcall;
  686. {$EXTERNALSYM MsiDoActionA}
  687. function MsiDoActionW(hInstall: MSIHANDLE; szAction: LPCWSTR): UINT; stdcall;
  688. {$EXTERNALSYM MsiDoActionW}
  689. function MsiDoAction(hInstall: MSIHANDLE; szAction: LPCTSTR): UINT; stdcall;
  690. {$EXTERNALSYM MsiDoAction}
  691. // Execute another action sequence, as descibed in the specified table
  692. // Returns the same error codes as MsiDoAction
  693. function MsiSequenceA(hInstall: MSIHANDLE; szTable: LPCSTR; iSequenceMode: Integer): UINT; stdcall;
  694. {$EXTERNALSYM MsiSequenceA}
  695. function MsiSequenceW(hInstall: MSIHANDLE; szTable: LPCWSTR; iSequenceMode: Integer): UINT; stdcall;
  696. {$EXTERNALSYM MsiSequenceW}
  697. function MsiSequence(hInstall: MSIHANDLE; szTable: LPCTSTR; iSequenceMode: Integer): UINT; stdcall;
  698. {$EXTERNALSYM MsiSequence}
  699. // Send an error record to the installer for processing.
  700. // If field 0 (template) is not set, field 1 must be set to the error code,
  701. // corresponding the the error message in the Error database table,
  702. // and the message will be formatted using the template from the Error table
  703. // before passing it to the UI handler for display.
  704. // Returns Win32 button codes: IDOK IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO
  705. // or 0 if no action taken, or -1 if invalid argument or handle
  706. function MsiProcessMessage(hInstall: MSIHANDLE; eMessageType: INSTALLMESSAGE;
  707. hRecord: MSIHANDLE): Integer; stdcall;
  708. {$EXTERNALSYM MsiProcessMessage}
  709. // Evaluate a conditional expression containing property names and values
  710. function MsiEvaluateConditionA(hInstall: MSIHANDLE; szCondition: LPCSTR): MSICONDITION; stdcall;
  711. {$EXTERNALSYM MsiEvaluateConditionA}
  712. function MsiEvaluateConditionW(hInstall: MSIHANDLE; szCondition: LPCWSTR): MSICONDITION; stdcall;
  713. {$EXTERNALSYM MsiEvaluateConditionW}
  714. function MsiEvaluateCondition(hInstall: MSIHANDLE; szCondition: LPCTSTR): MSICONDITION; stdcall;
  715. {$EXTERNALSYM MsiEvaluateCondition}
  716. // Get the installed state and requested action state of a feature
  717. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  718. function MsiGetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
  719. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  720. {$EXTERNALSYM MsiGetFeatureStateA}
  721. function MsiGetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
  722. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  723. {$EXTERNALSYM MsiGetFeatureStateW}
  724. function MsiGetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
  725. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  726. {$EXTERNALSYM MsiGetFeatureState}
  727. // Request a feature to be set to a specified state
  728. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  729. function MsiSetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
  730. iState: INSTALLSTATE): UINT; stdcall;
  731. {$EXTERNALSYM MsiSetFeatureStateA}
  732. function MsiSetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
  733. iState: INSTALLSTATE): UINT; stdcall;
  734. {$EXTERNALSYM MsiSetFeatureStateW}
  735. function MsiSetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
  736. iState: INSTALLSTATE): UINT; stdcall;
  737. {$EXTERNALSYM MsiSetFeatureState}
  738. // Set the attribute bits of a specified feature at runtime.
  739. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  740. function MsiSetFeatureAttributesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
  741. dwAttributes: DWORD): UINT; stdcall;
  742. {$EXTERNALSYM MsiSetFeatureAttributesA}
  743. function MsiSetFeatureAttributesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
  744. dwAttributes: DWORD): UINT; stdcall;
  745. {$EXTERNALSYM MsiSetFeatureAttributesW}
  746. function MsiSetFeatureAttributes(hInstall: MSIHANDLE; szFeature: LPCTSTR;
  747. dwAttributes: DWORD): UINT; stdcall;
  748. {$EXTERNALSYM MsiSetFeatureAttributes}
  749. // Get the installed state and requested action state of a component
  750. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  751. function MsiGetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
  752. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  753. {$EXTERNALSYM MsiGetComponentStateA}
  754. function MsiGetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
  755. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  756. {$EXTERNALSYM MsiGetComponentStateW}
  757. function MsiGetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
  758. var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
  759. {$EXTERNALSYM MsiGetComponentState}
  760. // Request a component to be set to a specified state
  761. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  762. function MsiSetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
  763. iState: INSTALLSTATE): UINT; stdcall;
  764. {$EXTERNALSYM MsiSetComponentStateA}
  765. function MsiSetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
  766. iState: INSTALLSTATE): UINT; stdcall;
  767. {$EXTERNALSYM MsiSetComponentStateW}
  768. function MsiSetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
  769. iState: INSTALLSTATE): UINT; stdcall;
  770. {$EXTERNALSYM MsiSetComponentState}
  771. // Return the disk cost for a feature and related features
  772. // Can specify either current feature state or proposed state
  773. // Can specify extent of related features to cost
  774. // Note that adding costs for several features may produce an
  775. // excessively large cost due to shared components and parents.
  776. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  777. function MsiGetFeatureCostA(hInstall: MSIHANDLE; szFeature: LPCSTR;
  778. iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
  779. {$EXTERNALSYM MsiGetFeatureCostA}
  780. function MsiGetFeatureCostW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
  781. iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
  782. {$EXTERNALSYM MsiGetFeatureCostW}
  783. function MsiGetFeatureCost(hInstall: MSIHANDLE; szFeature: LPCTSTR;
  784. iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
  785. {$EXTERNALSYM MsiGetFeatureCost}
  786. // Enumerates the costs and temporary costs per drives for
  787. // szComponent. If szComponent is set to NULL, it enumerates
  788. // the above costs for the engine, per drives.
  789. //
  790. // The enumeration is 0-based, i.e. it returns the data for
  791. // the first drive when called w/ dwIndex set to 0.
  792. //
  793. // Can specify either current feature state or proposed state.
  794. //
  795. // Execution of this function sets the error record, accessible
  796. // via MsiGetLastErrorRecord.
  797. function MsiEnumComponentCostsA(hInstall: MSIHANDLE; szComponent: LPCSTR; dwIndex: DWORD; iState: INSTALLSTATE;
  798. szDriveBuf: LPSTR; var pcchDriveBuf: DWORD; var piCost: INT; piTempCost: INT): UINT; stdcall;
  799. {$EXTERNALSYM MsiEnumComponentCostsA}
  800. function MsiEnumComponentCostsW(hInstall: MSIHANDLE; szComponent: LPCWSTR; dwIndex: DWORD; iState: INSTALLSTATE;
  801. szDriveBuf: LPWSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
  802. {$EXTERNALSYM MsiEnumComponentCostsW}
  803. function MsiEnumComponentCosts(hInstall: MSIHANDLE; szComponent: LPCTSTR; dwIndex: DWORD; iState: INSTALLSTATE;
  804. szDriveBuf: LPTSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
  805. {$EXTERNALSYM MsiEnumComponentCosts}
  806. // Set the install level for a full product installation (not a feature request)
  807. // Setting the value to 0 initialized components and features to the default level
  808. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  809. function MsiSetInstallLevel(hInstall: MSIHANDLE; iInstallLevel: Integer): UINT; stdcall;
  810. {$EXTERNALSYM MsiSetInstallLevel}
  811. // Get the valid install states for a feature, represented by bit flags
  812. // For each valid install state, a bit is set of value: (1 << INSTALLSTATE)
  813. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  814. function MsiGetFeatureValidStatesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
  815. var dwInstallStates: DWORD): UINT; stdcall;
  816. {$EXTERNALSYM MsiGetFeatureValidStatesA}
  817. function MsiGetFeatureValidStatesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
  818. var dwInstallStates: DWORD): UINT; stdcall;
  819. {$EXTERNALSYM MsiGetFeatureValidStatesW}
  820. function MsiGetFeatureValidStates(hInstall: MSIHANDLE; szFeature: LPCTSTR;
  821. var dwInstallStates: DWORD): UINT; stdcall;
  822. {$EXTERNALSYM MsiGetFeatureValidStates}
  823. // Return the full source path for a folder in the Directory table
  824. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  825. function MsiGetSourcePathA(hInstall: MSIHANDLE; szFolder: LPCSTR; szPathBuf: LPSTR;
  826. var pcchPathBuf: DWORD): UINT; stdcall;
  827. {$EXTERNALSYM MsiGetSourcePathA}
  828. function MsiGetSourcePathW(hInstall: MSIHANDLE; szFolder: LPCWSTR; szPathBuf: LPWSTR;
  829. var pcchPathBuf: DWORD): UINT; stdcall;
  830. {$EXTERNALSYM MsiGetSourcePathW}
  831. function MsiGetSourcePath(hInstall: MSIHANDLE; szFolder: LPCTSTR; szPathBuf: LPTSTR;
  832. var pcchPathBuf: DWORD): UINT; stdcall;
  833. {$EXTERNALSYM MsiGetSourcePath}
  834. // Return the full target path for a folder in the Directory table
  835. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  836. function MsiGetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
  837. szPathBuf: LPSTR; var pcchPathBuf: DWORD): UINT; stdcall;
  838. {$EXTERNALSYM MsiGetTargetPathA}
  839. function MsiGetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  840. szPathBuf: LPWSTR; var pcchPathBuf: DWORD): UINT; stdcall;
  841. {$EXTERNALSYM MsiGetTargetPathW}
  842. function MsiGetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
  843. szPathBuf: LPTSTR; var pcchPathBuf: DWORD): UINT; stdcall;
  844. {$EXTERNALSYM MsiGetTargetPath}
  845. // Set the full target path for a folder in the Directory table
  846. // Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
  847. function MsiSetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
  848. szFolderPath: LPCSTR): UINT; stdcall;
  849. {$EXTERNALSYM MsiSetTargetPathA}
  850. function MsiSetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  851. szFolderPath: LPCWSTR): UINT; stdcall;
  852. {$EXTERNALSYM MsiSetTargetPathW}
  853. function MsiSetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
  854. szFolderPath: LPCTSTR): UINT; stdcall;
  855. {$EXTERNALSYM MsiSetTargetPath}
  856. // Check to see if sufficent disk space is present for the current installation
  857. // Returns ERROR_SUCCESS, ERROR_DISK_FULL, ERROR_INVALID_HANDLE_STATE, or ERROR_INVALID_HANDLE
  858. function MsiVerifyDiskSpace(hInstall: MSIHANDLE): UINT; stdcall;
  859. {$EXTERNALSYM MsiVerifyDiskSpace}
  860. // --------------------------------------------------------------------------
  861. // Functions for rendering UI dialogs from the database representations.
  862. // Purpose is for product development, not for use during installation.
  863. // --------------------------------------------------------------------------
  864. // Enable UI in preview mode to facilitate authoring of UI dialogs.
  865. // The preview mode will end when the handle is closed.
  866. function MsiEnableUIPreview(hDatabase: MSIHANDLE; var phPreview: MSIHANDLE): UINT; stdcall;
  867. {$EXTERNALSYM MsiEnableUIPreview}
  868. // Display any UI dialog as modeless and inactive.
  869. // Supplying a null name will remove any current dialog.
  870. function MsiPreviewDialogA(hPreview: MSIHANDLE; szDialogName: LPCSTR): UINT; stdcall;
  871. {$EXTERNALSYM MsiPreviewDialogA}
  872. function MsiPreviewDialogW(hPreview: MSIHANDLE; szDialogName: LPCWSTR): UINT; stdcall;
  873. {$EXTERNALSYM MsiPreviewDialogW}
  874. function MsiPreviewDialog(hPreview: MSIHANDLE; szDialogName: LPCTSTR): UINT; stdcall;
  875. {$EXTERNALSYM MsiPreviewDialog}
  876. // Display a billboard within a host control in the displayed dialog.
  877. // Supplying a null billboard name will remove any billboard displayed.
  878. function MsiPreviewBillboardA(hPreview: MSIHANDLE; szControlName: LPCSTR;
  879. szBillboard: LPCSTR): UINT; stdcall;
  880. {$EXTERNALSYM MsiPreviewBillboardA}
  881. function MsiPreviewBillboardW(hPreview: MSIHANDLE; szControlName: LPCWSTR;
  882. szBillboard: LPCWSTR): UINT; stdcall;
  883. {$EXTERNALSYM MsiPreviewBillboardW}
  884. function MsiPreviewBillboard(hPreview: MSIHANDLE; szControlName: LPCTSTR;
  885. szBillboard: LPCTSTR): UINT; stdcall;
  886. {$EXTERNALSYM MsiPreviewBillboard}
  887. // --------------------------------------------------------------------------
  888. // Error handling not associated with any particular object
  889. // --------------------------------------------------------------------------
  890. // Return a record handle to the last function that generated an error record
  891. // Only specified functions will set the error record, or clear it if success
  892. // Field 1 of the record will contain the internal MSI error code
  893. // Other fields will contain data specific to the particular error
  894. // The error record is released internally after this function is executed
  895. function MsiGetLastErrorRecord: MSIHANDLE; stdcall;
  896. {$EXTERNALSYM MsiGetLastErrorRecord}
  897. implementation
  898. const
  899. msilib = 'msi.dll';
  900. {$IFDEF UNICODE}
  901. AWSuffix = 'W';
  902. {$ELSE}
  903. AWSuffix = 'A';
  904. {$ENDIF UNICODE}
  905. {$IFDEF DYNAMIC_LINK}
  906. var
  907. _MsiDatabaseOpenViewA: Pointer;
  908. function MsiDatabaseOpenViewA;
  909. begin
  910. GetProcedureAddress(_MsiDatabaseOpenViewA, msilib, 'MsiDatabaseOpenViewA');
  911. asm
  912. MOV ESP, EBP
  913. POP EBP
  914. JMP [_MsiDatabaseOpenViewA]
  915. end;
  916. end;
  917. var
  918. _MsiDatabaseOpenViewW: Pointer;
  919. function MsiDatabaseOpenViewW;
  920. begin
  921. GetProcedureAddress(_MsiDatabaseOpenViewW, msilib, 'MsiDatabaseOpenViewW');
  922. asm
  923. MOV ESP, EBP
  924. POP EBP
  925. JMP [_MsiDatabaseOpenViewW]
  926. end;
  927. end;
  928. var
  929. _MsiDatabaseOpenView: Pointer;
  930. function MsiDatabaseOpenView;
  931. begin
  932. GetProcedureAddress(_MsiDatabaseOpenView, msilib, 'MsiDatabaseOpenView' + AWSuffix);
  933. asm
  934. MOV ESP, EBP
  935. POP EBP
  936. JMP [_MsiDatabaseOpenView]
  937. end;
  938. end;
  939. var
  940. _MsiViewGetErrorA: Pointer;
  941. function MsiViewGetErrorA;
  942. begin
  943. GetProcedureAddress(_MsiViewGetErrorA, msilib, 'MsiViewGetErrorA');
  944. asm
  945. MOV ESP, EBP
  946. POP EBP
  947. JMP [_MsiViewGetErrorA]
  948. end;
  949. end;
  950. var
  951. _MsiViewGetErrorW: Pointer;
  952. function MsiViewGetErrorW;
  953. begin
  954. GetProcedureAddress(_MsiViewGetErrorW, msilib, 'MsiViewGetErrorW');
  955. asm
  956. MOV ESP, EBP
  957. POP EBP
  958. JMP [_MsiViewGetErrorW]
  959. end;
  960. end;
  961. var
  962. _MsiViewGetError: Pointer;
  963. function MsiViewGetError;
  964. begin
  965. GetProcedureAddress(_MsiViewGetError, msilib, 'MsiViewGetError' + AWSuffix);
  966. asm
  967. MOV ESP, EBP
  968. POP EBP
  969. JMP [_MsiViewGetError]
  970. end;
  971. end;
  972. var
  973. _MsiViewExecute: Pointer;
  974. function MsiViewExecute;
  975. begin
  976. GetProcedureAddress(_MsiViewExecute, msilib, 'MsiViewExecute');
  977. asm
  978. MOV ESP, EBP
  979. POP EBP
  980. JMP [_MsiViewExecute]
  981. end;
  982. end;
  983. var
  984. _MsiViewFetch: Pointer;
  985. function MsiViewFetch;
  986. begin
  987. GetProcedureAddress(_MsiViewFetch, msilib, 'MsiViewFetch');
  988. asm
  989. MOV ESP, EBP
  990. POP EBP
  991. JMP [_MsiViewFetch]
  992. end;
  993. end;
  994. var
  995. _MsiViewModify: Pointer;
  996. function MsiViewModify;
  997. begin
  998. GetProcedureAddress(_MsiViewModify, msilib, 'MsiViewModify');
  999. asm
  1000. MOV ESP, EBP
  1001. POP EBP
  1002. JMP [_MsiViewModify]
  1003. end;
  1004. end;
  1005. var
  1006. _MsiViewGetColumnInfo: Pointer;
  1007. function MsiViewGetColumnInfo;
  1008. begin
  1009. GetProcedureAddress(_MsiViewGetColumnInfo, msilib, 'MsiViewGetColumnInfo');
  1010. asm
  1011. MOV ESP, EBP
  1012. POP EBP
  1013. JMP [_MsiViewGetColumnInfo]
  1014. end;
  1015. end;
  1016. var
  1017. _MsiViewClose: Pointer;
  1018. function MsiViewClose;
  1019. begin
  1020. GetProcedureAddress(_MsiViewClose, msilib, 'MsiViewClose');
  1021. asm
  1022. MOV ESP, EBP
  1023. POP EBP
  1024. JMP [_MsiViewClose]
  1025. end;
  1026. end;
  1027. var
  1028. _MsiDatabaseGetPrimaryKeysA: Pointer;
  1029. function MsiDatabaseGetPrimaryKeysA;
  1030. begin
  1031. GetProcedureAddress(_MsiDatabaseGetPrimaryKeysA, msilib, 'MsiDatabaseGetPrimaryKeysA');
  1032. asm
  1033. MOV ESP, EBP
  1034. POP EBP
  1035. JMP [_MsiDatabaseGetPrimaryKeysA]
  1036. end;
  1037. end;
  1038. var
  1039. _MsiDatabaseGetPrimaryKeysW: Pointer;
  1040. function MsiDatabaseGetPrimaryKeysW;
  1041. begin
  1042. GetProcedureAddress(_MsiDatabaseGetPrimaryKeysW, msilib, 'MsiDatabaseGetPrimaryKeysW');
  1043. asm
  1044. MOV ESP, EBP
  1045. POP EBP
  1046. JMP [_MsiDatabaseGetPrimaryKeysW]
  1047. end;
  1048. end;
  1049. var
  1050. _MsiDatabaseGetPrimaryKeys: Pointer;
  1051. function MsiDatabaseGetPrimaryKeys;
  1052. begin
  1053. GetProcedureAddress(_MsiDatabaseGetPrimaryKeys, msilib, 'MsiDatabaseGetPrimaryKeys' + AWSuffix);
  1054. asm
  1055. MOV ESP, EBP
  1056. POP EBP
  1057. JMP [_MsiDatabaseGetPrimaryKeys]
  1058. end;
  1059. end;
  1060. var
  1061. _MsiDatabaseIsTablePersistentA: Pointer;
  1062. function MsiDatabaseIsTablePersistentA;
  1063. begin
  1064. GetProcedureAddress(_MsiDatabaseIsTablePersistentA, msilib, 'MsiDatabaseIsTablePersistentA');
  1065. asm
  1066. MOV ESP, EBP
  1067. POP EBP
  1068. JMP [_MsiDatabaseIsTablePersistentA]
  1069. end;
  1070. end;
  1071. var
  1072. _MsiDatabaseIsTablePersistentW: Pointer;
  1073. function MsiDatabaseIsTablePersistentW;
  1074. begin
  1075. GetProcedureAddress(_MsiDatabaseIsTablePersistentW, msilib, 'MsiDatabaseIsTablePersistentW');
  1076. asm
  1077. MOV ESP, EBP
  1078. POP EBP
  1079. JMP [_MsiDatabaseIsTablePersistentW]
  1080. end;
  1081. end;
  1082. var
  1083. _MsiDatabaseIsTablePersistent: Pointer;
  1084. function MsiDatabaseIsTablePersistent;
  1085. begin
  1086. GetProcedureAddress(_MsiDatabaseIsTablePersistent, msilib, 'MsiDatabaseIsTablePersistent' + AWSuffix);
  1087. asm
  1088. MOV ESP, EBP
  1089. POP EBP
  1090. JMP [_MsiDatabaseIsTablePersistent]
  1091. end;
  1092. end;
  1093. var
  1094. _MsiGetSummaryInformationA: Pointer;
  1095. function MsiGetSummaryInformationA;
  1096. begin
  1097. GetProcedureAddress(_MsiGetSummaryInformationA, msilib, 'MsiGetSummaryInformationA');
  1098. asm
  1099. MOV ESP, EBP
  1100. POP EBP
  1101. JMP [_MsiGetSummaryInformationA]
  1102. end;
  1103. end;
  1104. var
  1105. _MsiGetSummaryInformationW: Pointer;
  1106. function MsiGetSummaryInformationW;
  1107. begin
  1108. GetProcedureAddress(_MsiGetSummaryInformationW, msilib, 'MsiGetSummaryInformationW');
  1109. asm
  1110. MOV ESP, EBP
  1111. POP EBP
  1112. JMP [_MsiGetSummaryInformationW]
  1113. end;
  1114. end;
  1115. var
  1116. _MsiGetSummaryInformation: Pointer;
  1117. function MsiGetSummaryInformation;
  1118. begin
  1119. GetProcedureAddress(_MsiGetSummaryInformation, msilib, 'MsiGetSummaryInformation' + AWSuffix);
  1120. asm
  1121. MOV ESP, EBP
  1122. POP EBP
  1123. JMP [_MsiGetSummaryInformation]
  1124. end;
  1125. end;
  1126. var
  1127. _MsiSummaryInfoGetPropertyCount: Pointer;
  1128. function MsiSummaryInfoGetPropertyCount;
  1129. begin
  1130. GetProcedureAddress(_MsiSummaryInfoGetPropertyCount, msilib, 'MsiSummaryInfoGetPropertyCount');
  1131. asm
  1132. MOV ESP, EBP
  1133. POP EBP
  1134. JMP [_MsiSummaryInfoGetPropertyCount]
  1135. end;
  1136. end;
  1137. var
  1138. _MsiSummaryInfoSetPropertyA: Pointer;
  1139. function MsiSummaryInfoSetPropertyA;
  1140. begin
  1141. GetProcedureAddress(_MsiSummaryInfoSetPropertyA, msilib, 'MsiSummaryInfoSetPropertyA');
  1142. asm
  1143. MOV ESP, EBP
  1144. POP EBP
  1145. JMP [_MsiSummaryInfoSetPropertyA]
  1146. end;
  1147. end;
  1148. var
  1149. _MsiSummaryInfoSetPropertyW: Pointer;
  1150. function MsiSummaryInfoSetPropertyW;
  1151. begin
  1152. GetProcedureAddress(_MsiSummaryInfoSetPropertyW, msilib, 'MsiSummaryInfoSetPropertyW');
  1153. asm
  1154. MOV ESP, EBP
  1155. POP EBP
  1156. JMP [_MsiSummaryInfoSetPropertyW]
  1157. end;
  1158. end;
  1159. var
  1160. _MsiSummaryInfoSetProperty: Pointer;
  1161. function MsiSummaryInfoSetProperty;
  1162. begin
  1163. GetProcedureAddress(_MsiSummaryInfoSetProperty, msilib, 'MsiSummaryInfoSetProperty' + AWSuffix);
  1164. asm
  1165. MOV ESP, EBP
  1166. POP EBP
  1167. JMP [_MsiSummaryInfoSetProperty]
  1168. end;
  1169. end;
  1170. var
  1171. _MsiSummaryInfoGetPropertyA: Pointer;
  1172. function MsiSummaryInfoGetPropertyA;
  1173. begin
  1174. GetProcedureAddress(_MsiSummaryInfoGetPropertyA, msilib, 'MsiSummaryInfoGetPropertyA');
  1175. asm
  1176. MOV ESP, EBP
  1177. POP EBP
  1178. JMP [_MsiSummaryInfoGetPropertyA]
  1179. end;
  1180. end;
  1181. var
  1182. _MsiSummaryInfoGetPropertyW: Pointer;
  1183. function MsiSummaryInfoGetPropertyW;
  1184. begin
  1185. GetProcedureAddress(_MsiSummaryInfoGetPropertyW, msilib, 'MsiSummaryInfoGetPropertyW');
  1186. asm
  1187. MOV ESP, EBP
  1188. POP EBP
  1189. JMP [_MsiSummaryInfoGetPropertyW]
  1190. end;
  1191. end;
  1192. var
  1193. _MsiSummaryInfoGetProperty: Pointer;
  1194. function MsiSummaryInfoGetProperty;
  1195. begin
  1196. GetProcedureAddress(_MsiSummaryInfoGetProperty, msilib, 'MsiSummaryInfoGetProperty' + AWSuffix);
  1197. asm
  1198. MOV ESP, EBP
  1199. POP EBP
  1200. JMP [_MsiSummaryInfoGetProperty]
  1201. end;
  1202. end;
  1203. var
  1204. _MsiSummaryInfoPersist: Pointer;
  1205. function MsiSummaryInfoPersist;
  1206. begin
  1207. GetProcedureAddress(_MsiSummaryInfoPersist, msilib, 'MsiSummaryInfoPersist');
  1208. asm
  1209. MOV ESP, EBP
  1210. POP EBP
  1211. JMP [_MsiSummaryInfoPersist]
  1212. end;
  1213. end;
  1214. var
  1215. _MsiOpenDatabaseA: Pointer;
  1216. function MsiOpenDatabaseA;
  1217. begin
  1218. GetProcedureAddress(_MsiOpenDatabaseA, msilib, 'MsiOpenDatabaseA');
  1219. asm
  1220. MOV ESP, EBP
  1221. POP EBP
  1222. JMP [_MsiOpenDatabaseA]
  1223. end;
  1224. end;
  1225. var
  1226. _MsiOpenDatabaseW: Pointer;
  1227. function MsiOpenDatabaseW;
  1228. begin
  1229. GetProcedureAddress(_MsiOpenDatabaseW, msilib, 'MsiOpenDatabaseW');
  1230. asm
  1231. MOV ESP, EBP
  1232. POP EBP
  1233. JMP [_MsiOpenDatabaseW]
  1234. end;
  1235. end;
  1236. var
  1237. _MsiOpenDatabase: Pointer;
  1238. function MsiOpenDatabase;
  1239. begin
  1240. GetProcedureAddress(_MsiOpenDatabase, msilib, 'MsiOpenDatabase' + AWSuffix);
  1241. asm
  1242. MOV ESP, EBP
  1243. POP EBP
  1244. JMP [_MsiOpenDatabase]
  1245. end;
  1246. end;
  1247. var
  1248. _MsiDatabaseImportA: Pointer;
  1249. function MsiDatabaseImportA;
  1250. begin
  1251. GetProcedureAddress(_MsiDatabaseImportA, msilib, 'MsiDatabaseImportA');
  1252. asm
  1253. MOV ESP, EBP
  1254. POP EBP
  1255. JMP [_MsiDatabaseImportA]
  1256. end;
  1257. end;
  1258. var
  1259. _MsiDatabaseImportW: Pointer;
  1260. function MsiDatabaseImportW;
  1261. begin
  1262. GetProcedureAddress(_MsiDatabaseImportW, msilib, 'MsiDatabaseImportW');
  1263. asm
  1264. MOV ESP, EBP
  1265. POP EBP
  1266. JMP [_MsiDatabaseImportW]
  1267. end;
  1268. end;
  1269. var
  1270. _MsiDatabaseImport: Pointer;
  1271. function MsiDatabaseImport;
  1272. begin
  1273. GetProcedureAddress(_MsiDatabaseImport, msilib, 'MsiDatabaseImport' + AWSuffix);
  1274. asm
  1275. MOV ESP, EBP
  1276. POP EBP
  1277. JMP [_MsiDatabaseImport]
  1278. end;
  1279. end;
  1280. var
  1281. _MsiDatabaseExportA: Pointer;
  1282. function MsiDatabaseExportA;
  1283. begin
  1284. GetProcedureAddress(_MsiDatabaseExportA, msilib, 'MsiDatabaseExportA');
  1285. asm
  1286. MOV ESP, EBP
  1287. POP EBP
  1288. JMP [_MsiDatabaseExportA]
  1289. end;
  1290. end;
  1291. var
  1292. _MsiDatabaseExportW: Pointer;
  1293. function MsiDatabaseExportW;
  1294. begin
  1295. GetProcedureAddress(_MsiDatabaseExportW, msilib, 'MsiDatabaseExportW');
  1296. asm
  1297. MOV ESP, EBP
  1298. POP EBP
  1299. JMP [_MsiDatabaseExportW]
  1300. end;
  1301. end;
  1302. var
  1303. _MsiDatabaseExport: Pointer;
  1304. function MsiDatabaseExport;
  1305. begin
  1306. GetProcedureAddress(_MsiDatabaseExport, msilib, 'MsiDatabaseExport' + AWSuffix);
  1307. asm
  1308. MOV ESP, EBP
  1309. POP EBP
  1310. JMP [_MsiDatabaseExport]
  1311. end;
  1312. end;
  1313. var
  1314. _MsiDatabaseMergeA: Pointer;
  1315. function MsiDatabaseMergeA;
  1316. begin
  1317. GetProcedureAddress(_MsiDatabaseMergeA, msilib, 'MsiDatabaseMergeA');
  1318. asm
  1319. MOV ESP, EBP
  1320. POP EBP
  1321. JMP [_MsiDatabaseMergeA]
  1322. end;
  1323. end;
  1324. var
  1325. _MsiDatabaseMergeW: Pointer;
  1326. function MsiDatabaseMergeW;
  1327. begin
  1328. GetProcedureAddress(_MsiDatabaseMergeW, msilib, 'MsiDatabaseMergeW');
  1329. asm
  1330. MOV ESP, EBP
  1331. POP EBP
  1332. JMP [_MsiDatabaseMergeW]
  1333. end;
  1334. end;
  1335. var
  1336. _MsiDatabaseMerge: Pointer;
  1337. function MsiDatabaseMerge;
  1338. begin
  1339. GetProcedureAddress(_MsiDatabaseMerge, msilib, 'MsiDatabaseMerge' + AWSuffix);
  1340. asm
  1341. MOV ESP, EBP
  1342. POP EBP
  1343. JMP [_MsiDatabaseMerge]
  1344. end;
  1345. end;
  1346. var
  1347. _MsiDatabaseGenerateTransformA: Pointer;
  1348. function MsiDatabaseGenerateTransformA;
  1349. begin
  1350. GetProcedureAddress(_MsiDatabaseGenerateTransformA, msilib, 'MsiDatabaseGenerateTransformA');
  1351. asm
  1352. MOV ESP, EBP
  1353. POP EBP
  1354. JMP [_MsiDatabaseGenerateTransformA]
  1355. end;
  1356. end;
  1357. var
  1358. _MsiDatabaseGenerateTransformW: Pointer;
  1359. function MsiDatabaseGenerateTransformW;
  1360. begin
  1361. GetProcedureAddress(_MsiDatabaseGenerateTransformW, msilib, 'MsiDatabaseGenerateTransformW');
  1362. asm
  1363. MOV ESP, EBP
  1364. POP EBP
  1365. JMP [_MsiDatabaseGenerateTransformW]
  1366. end;
  1367. end;
  1368. var
  1369. _MsiDatabaseGenerateTransform: Pointer;
  1370. function MsiDatabaseGenerateTransform;
  1371. begin
  1372. GetProcedureAddress(_MsiDatabaseGenerateTransform, msilib, 'MsiDatabaseGenerateTransform' + AWSuffix);
  1373. asm
  1374. MOV ESP, EBP
  1375. POP EBP
  1376. JMP [_MsiDatabaseGenerateTransform]
  1377. end;
  1378. end;
  1379. var
  1380. _MsiDatabaseApplyTransformA: Pointer;
  1381. function MsiDatabaseApplyTransformA;
  1382. begin
  1383. GetProcedureAddress(_MsiDatabaseApplyTransformA, msilib, 'MsiDatabaseApplyTransformA');
  1384. asm
  1385. MOV ESP, EBP
  1386. POP EBP
  1387. JMP [_MsiDatabaseApplyTransformA]
  1388. end;
  1389. end;
  1390. var
  1391. _MsiDatabaseApplyTransformW: Pointer;
  1392. function MsiDatabaseApplyTransformW;
  1393. begin
  1394. GetProcedureAddress(_MsiDatabaseApplyTransformW, msilib, 'MsiDatabaseApplyTransformW');
  1395. asm
  1396. MOV ESP, EBP
  1397. POP EBP
  1398. JMP [_MsiDatabaseApplyTransformW]
  1399. end;
  1400. end;
  1401. var
  1402. _MsiDatabaseApplyTransform: Pointer;
  1403. function MsiDatabaseApplyTransform;
  1404. begin
  1405. GetProcedureAddress(_MsiDatabaseApplyTransform, msilib, 'MsiDatabaseApplyTransform' + AWSuffix);
  1406. asm
  1407. MOV ESP, EBP
  1408. POP EBP
  1409. JMP [_MsiDatabaseApplyTransform]
  1410. end;
  1411. end;
  1412. var
  1413. _MsiCreateTransformSummaryInfoA: Pointer;
  1414. function MsiCreateTransformSummaryInfoA;
  1415. begin
  1416. GetProcedureAddress(_MsiCreateTransformSummaryInfoA, msilib, 'MsiCreateTransformSummaryInfoA');
  1417. asm
  1418. MOV ESP, EBP
  1419. POP EBP
  1420. JMP [_MsiCreateTransformSummaryInfoA]
  1421. end;
  1422. end;
  1423. var
  1424. _MsiCreateTransformSummaryInfoW: Pointer;
  1425. function MsiCreateTransformSummaryInfoW;
  1426. begin
  1427. GetProcedureAddress(_MsiCreateTransformSummaryInfoW, msilib, 'MsiCreateTransformSummaryInfoW');
  1428. asm
  1429. MOV ESP, EBP
  1430. POP EBP
  1431. JMP [_MsiCreateTransformSummaryInfoW]
  1432. end;
  1433. end;
  1434. var
  1435. _MsiCreateTransformSummaryInfo: Pointer;
  1436. function MsiCreateTransformSummaryInfo;
  1437. begin
  1438. GetProcedureAddress(_MsiCreateTransformSummaryInfo, msilib, 'MsiCreateTransformSummaryInfo' + AWSuffix);
  1439. asm
  1440. MOV ESP, EBP
  1441. POP EBP
  1442. JMP [_MsiCreateTransformSummaryInfo]
  1443. end;
  1444. end;
  1445. var
  1446. _MsiDatabaseCommit: Pointer;
  1447. function MsiDatabaseCommit;
  1448. begin
  1449. GetProcedureAddress(_MsiDatabaseCommit, msilib, 'MsiDatabaseCommit');
  1450. asm
  1451. MOV ESP, EBP
  1452. POP EBP
  1453. JMP [_MsiDatabaseCommit]
  1454. end;
  1455. end;
  1456. var
  1457. _MsiGetDatabaseState: Pointer;
  1458. function MsiGetDatabaseState;
  1459. begin
  1460. GetProcedureAddress(_MsiGetDatabaseState, msilib, 'MsiGetDatabaseState');
  1461. asm
  1462. MOV ESP, EBP
  1463. POP EBP
  1464. JMP [_MsiGetDatabaseState]
  1465. end;
  1466. end;
  1467. var
  1468. _MsiCreateRecord: Pointer;
  1469. function MsiCreateRecord;
  1470. begin
  1471. GetProcedureAddress(_MsiCreateRecord, msilib, 'MsiCreateRecord');
  1472. asm
  1473. MOV ESP, EBP
  1474. POP EBP
  1475. JMP [_MsiCreateRecord]
  1476. end;
  1477. end;
  1478. var
  1479. _MsiRecordIsNull: Pointer;
  1480. function MsiRecordIsNull;
  1481. begin
  1482. GetProcedureAddress(_MsiRecordIsNull, msilib, 'MsiRecordIsNull');
  1483. asm
  1484. MOV ESP, EBP
  1485. POP EBP
  1486. JMP [_MsiRecordIsNull]
  1487. end;
  1488. end;
  1489. var
  1490. _MsiRecordDataSize: Pointer;
  1491. function MsiRecordDataSize;
  1492. begin
  1493. GetProcedureAddress(_MsiRecordDataSize, msilib, 'MsiRecordDataSize');
  1494. asm
  1495. MOV ESP, EBP
  1496. POP EBP
  1497. JMP [_MsiRecordDataSize]
  1498. end;
  1499. end;
  1500. var
  1501. _MsiRecordSetInteger: Pointer;
  1502. function MsiRecordSetInteger;
  1503. begin
  1504. GetProcedureAddress(_MsiRecordSetInteger, msilib, 'MsiRecordSetInteger');
  1505. asm
  1506. MOV ESP, EBP
  1507. POP EBP
  1508. JMP [_MsiRecordSetInteger]
  1509. end;
  1510. end;
  1511. var
  1512. _MsiRecordSetStringA: Pointer;
  1513. function MsiRecordSetStringA;
  1514. begin
  1515. GetProcedureAddress(_MsiRecordSetStringA, msilib, 'MsiRecordSetStringA');
  1516. asm
  1517. MOV ESP, EBP
  1518. POP EBP
  1519. JMP [_MsiRecordSetStringA]
  1520. end;
  1521. end;
  1522. var
  1523. _MsiRecordSetStringW: Pointer;
  1524. function MsiRecordSetStringW;
  1525. begin
  1526. GetProcedureAddress(_MsiRecordSetStringW, msilib, 'MsiRecordSetStringW');
  1527. asm
  1528. MOV ESP, EBP
  1529. POP EBP
  1530. JMP [_MsiRecordSetStringW]
  1531. end;
  1532. end;
  1533. var
  1534. _MsiRecordSetString: Pointer;
  1535. function MsiRecordSetString;
  1536. begin
  1537. GetProcedureAddress(_MsiRecordSetString, msilib, 'MsiRecordSetString' + AWSuffix);
  1538. asm
  1539. MOV ESP, EBP
  1540. POP EBP
  1541. JMP [_MsiRecordSetString]
  1542. end;
  1543. end;
  1544. var
  1545. _MsiRecordGetInteger: Pointer;
  1546. function MsiRecordGetInteger;
  1547. begin
  1548. GetProcedureAddress(_MsiRecordGetInteger, msilib, 'MsiRecordGetInteger');
  1549. asm
  1550. MOV ESP, EBP
  1551. POP EBP
  1552. JMP [_MsiRecordGetInteger]
  1553. end;
  1554. end;
  1555. var
  1556. _MsiRecordGetStringA: Pointer;
  1557. function MsiRecordGetStringA;
  1558. begin
  1559. GetProcedureAddress(_MsiRecordGetStringA, msilib, 'MsiRecordGetStringA');
  1560. asm
  1561. MOV ESP, EBP
  1562. POP EBP
  1563. JMP [_MsiRecordGetStringA]
  1564. end;
  1565. end;
  1566. var
  1567. _MsiRecordGetStringW: Pointer;
  1568. function MsiRecordGetStringW;
  1569. begin
  1570. GetProcedureAddress(_MsiRecordGetStringW, msilib, 'MsiRecordGetStringW');
  1571. asm
  1572. MOV ESP, EBP
  1573. POP EBP
  1574. JMP [_MsiRecordGetStringW]
  1575. end;
  1576. end;
  1577. var
  1578. _MsiRecordGetString: Pointer;
  1579. function MsiRecordGetString;
  1580. begin
  1581. GetProcedureAddress(_MsiRecordGetString, msilib, 'MsiRecordGetString' + AWSuffix);
  1582. asm
  1583. MOV ESP, EBP
  1584. POP EBP
  1585. JMP [_MsiRecordGetString]
  1586. end;
  1587. end;
  1588. var
  1589. _MsiRecordGetFieldCount: Pointer;
  1590. function MsiRecordGetFieldCount;
  1591. begin
  1592. GetProcedureAddress(_MsiRecordGetFieldCount, msilib, 'MsiRecordGetFieldCount');
  1593. asm
  1594. MOV ESP, EBP
  1595. POP EBP
  1596. JMP [_MsiRecordGetFieldCount]
  1597. end;
  1598. end;
  1599. var
  1600. _MsiRecordSetStreamA: Pointer;
  1601. function MsiRecordSetStreamA;
  1602. begin
  1603. GetProcedureAddress(_MsiRecordSetStreamA, msilib, 'MsiRecordSetStreamA');
  1604. asm
  1605. MOV ESP, EBP
  1606. POP EBP
  1607. JMP [_MsiRecordSetStreamA]
  1608. end;
  1609. end;
  1610. var
  1611. _MsiRecordSetStreamW: Pointer;
  1612. function MsiRecordSetStreamW;
  1613. begin
  1614. GetProcedureAddress(_MsiRecordSetStreamW, msilib, 'MsiRecordSetStreamW');
  1615. asm
  1616. MOV ESP, EBP
  1617. POP EBP
  1618. JMP [_MsiRecordSetStreamW]
  1619. end;
  1620. end;
  1621. var
  1622. _MsiRecordSetStream: Pointer;
  1623. function MsiRecordSetStream;
  1624. begin
  1625. GetProcedureAddress(_MsiRecordSetStream, msilib, 'MsiRecordSetStream' + AWSuffix);
  1626. asm
  1627. MOV ESP, EBP
  1628. POP EBP
  1629. JMP [_MsiRecordSetStream]
  1630. end;
  1631. end;
  1632. var
  1633. _MsiRecordReadStream: Pointer;
  1634. function MsiRecordReadStream;
  1635. begin
  1636. GetProcedureAddress(_MsiRecordReadStream, msilib, 'MsiRecordReadStream');
  1637. asm
  1638. MOV ESP, EBP
  1639. POP EBP
  1640. JMP [_MsiRecordReadStream]
  1641. end;
  1642. end;
  1643. var
  1644. _MsiRecordClearData: Pointer;
  1645. function MsiRecordClearData;
  1646. begin
  1647. GetProcedureAddress(_MsiRecordClearData, msilib, 'MsiRecordClearData');
  1648. asm
  1649. MOV ESP, EBP
  1650. POP EBP
  1651. JMP [_MsiRecordClearData]
  1652. end;
  1653. end;
  1654. var
  1655. _MsiGetActiveDatabase: Pointer;
  1656. function MsiGetActiveDatabase;
  1657. begin
  1658. GetProcedureAddress(_MsiGetActiveDatabase, msilib, 'MsiGetActiveDatabase');
  1659. asm
  1660. MOV ESP, EBP
  1661. POP EBP
  1662. JMP [_MsiGetActiveDatabase]
  1663. end;
  1664. end;
  1665. var
  1666. _MsiSetPropertyA: Pointer;
  1667. function MsiSetPropertyA;
  1668. begin
  1669. GetProcedureAddress(_MsiSetPropertyA, msilib, 'MsiSetPropertyA');
  1670. asm
  1671. MOV ESP, EBP
  1672. POP EBP
  1673. JMP [_MsiSetPropertyA]
  1674. end;
  1675. end;
  1676. var
  1677. _MsiSetPropertyW: Pointer;
  1678. function MsiSetPropertyW;
  1679. begin
  1680. GetProcedureAddress(_MsiSetPropertyW, msilib, 'MsiSetPropertyW');
  1681. asm
  1682. MOV ESP, EBP
  1683. POP EBP
  1684. JMP [_MsiSetPropertyW]
  1685. end;
  1686. end;
  1687. var
  1688. _MsiSetProperty: Pointer;
  1689. function MsiSetProperty;
  1690. begin
  1691. GetProcedureAddress(_MsiSetProperty, msilib, 'MsiSetProperty' + AWSuffix);
  1692. asm
  1693. MOV ESP, EBP
  1694. POP EBP
  1695. JMP [_MsiSetProperty]
  1696. end;
  1697. end;
  1698. var
  1699. _MsiGetPropertyA: Pointer;
  1700. function MsiGetPropertyA;
  1701. begin
  1702. GetProcedureAddress(_MsiGetPropertyA, msilib, 'MsiGetPropertyA');
  1703. asm
  1704. MOV ESP, EBP
  1705. POP EBP
  1706. JMP [_MsiGetPropertyA]
  1707. end;
  1708. end;
  1709. var
  1710. _MsiGetPropertyW: Pointer;
  1711. function MsiGetPropertyW;
  1712. begin
  1713. GetProcedureAddress(_MsiGetPropertyW, msilib, 'MsiGetPropertyW');
  1714. asm
  1715. MOV ESP, EBP
  1716. POP EBP
  1717. JMP [_MsiGetPropertyW]
  1718. end;
  1719. end;
  1720. var
  1721. _MsiGetProperty: Pointer;
  1722. function MsiGetProperty;
  1723. begin
  1724. GetProcedureAddress(_MsiGetProperty, msilib, 'MsiGetProperty' + AWSuffix);
  1725. asm
  1726. MOV ESP, EBP
  1727. POP EBP
  1728. JMP [_MsiGetProperty]
  1729. end;
  1730. end;
  1731. var
  1732. _MsiGetLanguage: Pointer;
  1733. function MsiGetLanguage;
  1734. begin
  1735. GetProcedureAddress(_MsiGetLanguage, msilib, 'MsiGetLanguage');
  1736. asm
  1737. MOV ESP, EBP
  1738. POP EBP
  1739. JMP [_MsiGetLanguage]
  1740. end;
  1741. end;
  1742. var
  1743. _MsiGetMode: Pointer;
  1744. function MsiGetMode;
  1745. begin
  1746. GetProcedureAddress(_MsiGetMode, msilib, 'MsiGetMode');
  1747. asm
  1748. MOV ESP, EBP
  1749. POP EBP
  1750. JMP [_MsiGetMode]
  1751. end;
  1752. end;
  1753. var
  1754. _MsiSetMode: Pointer;
  1755. function MsiSetMode;
  1756. begin
  1757. GetProcedureAddress(_MsiSetMode, msilib, 'MsiSetMode');
  1758. asm
  1759. MOV ESP, EBP
  1760. POP EBP
  1761. JMP [_MsiSetMode]
  1762. end;
  1763. end;
  1764. var
  1765. _MsiFormatRecordA: Pointer;
  1766. function MsiFormatRecordA;
  1767. begin
  1768. GetProcedureAddress(_MsiFormatRecordA, msilib, 'MsiFormatRecordA');
  1769. asm
  1770. MOV ESP, EBP
  1771. POP EBP
  1772. JMP [_MsiFormatRecordA]
  1773. end;
  1774. end;
  1775. var
  1776. _MsiFormatRecordW: Pointer;
  1777. function MsiFormatRecordW;
  1778. begin
  1779. GetProcedureAddress(_MsiFormatRecordW, msilib, 'MsiFormatRecordW');
  1780. asm
  1781. MOV ESP, EBP
  1782. POP EBP
  1783. JMP [_MsiFormatRecordW]
  1784. end;
  1785. end;
  1786. var
  1787. _MsiFormatRecord: Pointer;
  1788. function MsiFormatRecord;
  1789. begin
  1790. GetProcedureAddress(_MsiFormatRecord, msilib, 'MsiFormatRecord' + AWSuffix);
  1791. asm
  1792. MOV ESP, EBP
  1793. POP EBP
  1794. JMP [_MsiFormatRecord]
  1795. end;
  1796. end;
  1797. var
  1798. _MsiDoActionA: Pointer;
  1799. function MsiDoActionA;
  1800. begin
  1801. GetProcedureAddress(_MsiDoActionA, msilib, 'MsiDoActionA');
  1802. asm
  1803. MOV ESP, EBP
  1804. POP EBP
  1805. JMP [_MsiDoActionA]
  1806. end;
  1807. end;
  1808. var
  1809. _MsiDoActionW: Pointer;
  1810. function MsiDoActionW;
  1811. begin
  1812. GetProcedureAddress(_MsiDoActionW, msilib, 'MsiDoActionW');
  1813. asm
  1814. MOV ESP, EBP
  1815. POP EBP
  1816. JMP [_MsiDoActionW]
  1817. end;
  1818. end;
  1819. var
  1820. _MsiDoAction: Pointer;
  1821. function MsiDoAction;
  1822. begin
  1823. GetProcedureAddress(_MsiDoAction, msilib, 'MsiDoAction' + AWSuffix);
  1824. asm
  1825. MOV ESP, EBP
  1826. POP EBP
  1827. JMP [_MsiDoAction]
  1828. end;
  1829. end;
  1830. var
  1831. _MsiSequenceA: Pointer;
  1832. function MsiSequenceA;
  1833. begin
  1834. GetProcedureAddress(_MsiSequenceA, msilib, 'MsiSequenceA');
  1835. asm
  1836. MOV ESP, EBP
  1837. POP EBP
  1838. JMP [_MsiSequenceA]
  1839. end;
  1840. end;
  1841. var
  1842. _MsiSequenceW: Pointer;
  1843. function MsiSequenceW;
  1844. begin
  1845. GetProcedureAddress(_MsiSequenceW, msilib, 'MsiSequenceW');
  1846. asm
  1847. MOV ESP, EBP
  1848. POP EBP
  1849. JMP [_MsiSequenceW]
  1850. end;
  1851. end;
  1852. var
  1853. _MsiSequence: Pointer;
  1854. function MsiSequence;
  1855. begin
  1856. GetProcedureAddress(_MsiSequence, msilib, 'MsiSequence' + AWSuffix);
  1857. asm
  1858. MOV ESP, EBP
  1859. POP EBP
  1860. JMP [_MsiSequence]
  1861. end;
  1862. end;
  1863. var
  1864. _MsiProcessMessage: Pointer;
  1865. function MsiProcessMessage;
  1866. begin
  1867. GetProcedureAddress(_MsiProcessMessage, msilib, 'MsiProcessMessage');
  1868. asm
  1869. MOV ESP, EBP
  1870. POP EBP
  1871. JMP [_MsiProcessMessage]
  1872. end;
  1873. end;
  1874. var
  1875. _MsiEvaluateConditionA: Pointer;
  1876. function MsiEvaluateConditionA;
  1877. begin
  1878. GetProcedureAddress(_MsiEvaluateConditionA, msilib, 'MsiEvaluateConditionA');
  1879. asm
  1880. MOV ESP, EBP
  1881. POP EBP
  1882. JMP [_MsiEvaluateConditionA]
  1883. end;
  1884. end;
  1885. var
  1886. _MsiEvaluateConditionW: Pointer;
  1887. function MsiEvaluateConditionW;
  1888. begin
  1889. GetProcedureAddress(_MsiEvaluateConditionW, msilib, 'MsiEvaluateConditionW');
  1890. asm
  1891. MOV ESP, EBP
  1892. POP EBP
  1893. JMP [_MsiEvaluateConditionW]
  1894. end;
  1895. end;
  1896. var
  1897. _MsiEvaluateCondition: Pointer;
  1898. function MsiEvaluateCondition;
  1899. begin
  1900. GetProcedureAddress(_MsiEvaluateCondition, msilib, 'MsiEvaluateCondition' + AWSuffix);
  1901. asm
  1902. MOV ESP, EBP
  1903. POP EBP
  1904. JMP [_MsiEvaluateCondition]
  1905. end;
  1906. end;
  1907. var
  1908. _MsiGetFeatureStateA: Pointer;
  1909. function MsiGetFeatureStateA;
  1910. begin
  1911. GetProcedureAddress(_MsiGetFeatureStateA, msilib, 'MsiGetFeatureStateA');
  1912. asm
  1913. MOV ESP, EBP
  1914. POP EBP
  1915. JMP [_MsiGetFeatureStateA]
  1916. end;
  1917. end;
  1918. var
  1919. _MsiGetFeatureStateW: Pointer;
  1920. function MsiGetFeatureStateW;
  1921. begin
  1922. GetProcedureAddress(_MsiGetFeatureStateW, msilib, 'MsiGetFeatureStateW');
  1923. asm
  1924. MOV ESP, EBP
  1925. POP EBP
  1926. JMP [_MsiGetFeatureStateW]
  1927. end;
  1928. end;
  1929. var
  1930. _MsiGetFeatureState: Pointer;
  1931. function MsiGetFeatureState;
  1932. begin
  1933. GetProcedureAddress(_MsiGetFeatureState, msilib, 'MsiGetFeatureState' + AWSuffix);
  1934. asm
  1935. MOV ESP, EBP
  1936. POP EBP
  1937. JMP [_MsiGetFeatureState]
  1938. end;
  1939. end;
  1940. var
  1941. _MsiSetFeatureStateA: Pointer;
  1942. function MsiSetFeatureStateA;
  1943. begin
  1944. GetProcedureAddress(_MsiSetFeatureStateA, msilib, 'MsiSetFeatureStateA');
  1945. asm
  1946. MOV ESP, EBP
  1947. POP EBP
  1948. JMP [_MsiSetFeatureStateA]
  1949. end;
  1950. end;
  1951. var
  1952. _MsiSetFeatureStateW: Pointer;
  1953. function MsiSetFeatureStateW;
  1954. begin
  1955. GetProcedureAddress(_MsiSetFeatureStateW, msilib, 'MsiSetFeatureStateW');
  1956. asm
  1957. MOV ESP, EBP
  1958. POP EBP
  1959. JMP [_MsiSetFeatureStateW]
  1960. end;
  1961. end;
  1962. var
  1963. _MsiSetFeatureState: Pointer;
  1964. function MsiSetFeatureState;
  1965. begin
  1966. GetProcedureAddress(_MsiSetFeatureState, msilib, 'MsiSetFeatureState' + AWSuffix);
  1967. asm
  1968. MOV ESP, EBP
  1969. POP EBP
  1970. JMP [_MsiSetFeatureState]
  1971. end;
  1972. end;
  1973. var
  1974. _MsiSetFeatureAttributesA: Pointer;
  1975. function MsiSetFeatureAttributesA;
  1976. begin
  1977. GetProcedureAddress(_MsiSetFeatureAttributesA, msilib, 'MsiSetFeatureAttributesA');
  1978. asm
  1979. MOV ESP, EBP
  1980. POP EBP
  1981. JMP [_MsiSetFeatureAttributesA]
  1982. end;
  1983. end;
  1984. var
  1985. _MsiSetFeatureAttributesW: Pointer;
  1986. function MsiSetFeatureAttributesW;
  1987. begin
  1988. GetProcedureAddress(_MsiSetFeatureAttributesW, msilib, 'MsiSetFeatureAttributesW');
  1989. asm
  1990. MOV ESP, EBP
  1991. POP EBP
  1992. JMP [_MsiSetFeatureAttributesW]
  1993. end;
  1994. end;
  1995. var
  1996. _MsiSetFeatureAttributes: Pointer;
  1997. function MsiSetFeatureAttributes;
  1998. begin
  1999. GetProcedureAddress(_MsiSetFeatureAttributes, msilib, 'MsiSetFeatureAttributes' + AWSuffix);
  2000. asm
  2001. MOV ESP, EBP
  2002. POP EBP
  2003. JMP [_MsiSetFeatureAttributes]
  2004. end;
  2005. end;
  2006. var
  2007. _MsiGetComponentStateA: Pointer;
  2008. function MsiGetComponentStateA;
  2009. begin
  2010. GetProcedureAddress(_MsiGetComponentStateA, msilib, 'MsiGetComponentStateA');
  2011. asm
  2012. MOV ESP, EBP
  2013. POP EBP
  2014. JMP [_MsiGetComponentStateA]
  2015. end;
  2016. end;
  2017. var
  2018. _MsiGetComponentStateW: Pointer;
  2019. function MsiGetComponentStateW;
  2020. begin
  2021. GetProcedureAddress(_MsiGetComponentStateW, msilib, 'MsiGetComponentStateW');
  2022. asm
  2023. MOV ESP, EBP
  2024. POP EBP
  2025. JMP [_MsiGetComponentStateW]
  2026. end;
  2027. end;
  2028. var
  2029. _MsiGetComponentState: Pointer;
  2030. function MsiGetComponentState;
  2031. begin
  2032. GetProcedureAddress(_MsiGetComponentState, msilib, 'MsiGetComponentState' + AWSuffix);
  2033. asm
  2034. MOV ESP, EBP
  2035. POP EBP
  2036. JMP [_MsiGetComponentState]
  2037. end;
  2038. end;
  2039. var
  2040. _MsiSetComponentStateA: Pointer;
  2041. function MsiSetComponentStateA;
  2042. begin
  2043. GetProcedureAddress(_MsiSetComponentStateA, msilib, 'MsiSetComponentStateA');
  2044. asm
  2045. MOV ESP, EBP
  2046. POP EBP
  2047. JMP [_MsiSetComponentStateA]
  2048. end;
  2049. end;
  2050. var
  2051. _MsiSetComponentStateW: Pointer;
  2052. function MsiSetComponentStateW;
  2053. begin
  2054. GetProcedureAddress(_MsiSetComponentStateW, msilib, 'MsiSetComponentStateW');
  2055. asm
  2056. MOV ESP, EBP
  2057. POP EBP
  2058. JMP [_MsiSetComponentStateW]
  2059. end;
  2060. end;
  2061. var
  2062. _MsiSetComponentState: Pointer;
  2063. function MsiSetComponentState;
  2064. begin
  2065. GetProcedureAddress(_MsiSetComponentState, msilib, 'MsiSetComponentState' + AWSuffix);
  2066. asm
  2067. MOV ESP, EBP
  2068. POP EBP
  2069. JMP [_MsiSetComponentState]
  2070. end;
  2071. end;
  2072. var
  2073. _MsiGetFeatureCostA: Pointer;
  2074. function MsiGetFeatureCostA;
  2075. begin
  2076. GetProcedureAddress(_MsiGetFeatureCostA, msilib, 'MsiGetFeatureCostA');
  2077. asm
  2078. MOV ESP, EBP
  2079. POP EBP
  2080. JMP [_MsiGetFeatureCostA]
  2081. end;
  2082. end;
  2083. var
  2084. _MsiGetFeatureCostW: Pointer;
  2085. function MsiGetFeatureCostW;
  2086. begin
  2087. GetProcedureAddress(_MsiGetFeatureCostW, msilib, 'MsiGetFeatureCostW');
  2088. asm
  2089. MOV ESP, EBP
  2090. POP EBP
  2091. JMP [_MsiGetFeatureCostW]
  2092. end;
  2093. end;
  2094. var
  2095. _MsiGetFeatureCost: Pointer;
  2096. function MsiGetFeatureCost;
  2097. begin
  2098. GetProcedureAddress(_MsiGetFeatureCost, msilib, 'MsiGetFeatureCost' + AWSuffix);
  2099. asm
  2100. MOV ESP, EBP
  2101. POP EBP
  2102. JMP [_MsiGetFeatureCost]
  2103. end;
  2104. end;
  2105. var
  2106. _MsiEnumComponentCostsA: Pointer;
  2107. function MsiEnumComponentCostsA;
  2108. begin
  2109. GetProcedureAddress(_MsiEnumComponentCostsA, msilib, 'MsiEnumComponentCostsA');
  2110. asm
  2111. MOV ESP, EBP
  2112. POP EBP
  2113. JMP [_MsiEnumComponentCostsA]
  2114. end;
  2115. end;
  2116. var
  2117. _MsiEnumComponentCostsW: Pointer;
  2118. function MsiEnumComponentCostsW;
  2119. begin
  2120. GetProcedureAddress(_MsiEnumComponentCostsW, msilib, 'MsiEnumComponentCostsW');
  2121. asm
  2122. MOV ESP, EBP
  2123. POP EBP
  2124. JMP [_MsiEnumComponentCostsW]
  2125. end;
  2126. end;
  2127. var
  2128. _MsiEnumComponentCosts: Pointer;
  2129. function MsiEnumComponentCosts;
  2130. begin
  2131. GetProcedureAddress(_MsiEnumComponentCosts, msilib, 'MsiEnumComponentCosts' + AWSuffix);
  2132. asm
  2133. MOV ESP, EBP
  2134. POP EBP
  2135. JMP [_MsiEnumComponentCosts]
  2136. end;
  2137. end;
  2138. var
  2139. _MsiSetInstallLevel: Pointer;
  2140. function MsiSetInstallLevel;
  2141. begin
  2142. GetProcedureAddress(_MsiSetInstallLevel, msilib, 'MsiSetInstallLevel');
  2143. asm
  2144. MOV ESP, EBP
  2145. POP EBP
  2146. JMP [_MsiSetInstallLevel]
  2147. end;
  2148. end;
  2149. var
  2150. _MsiGetFeatureValidStatesA: Pointer;
  2151. function MsiGetFeatureValidStatesA;
  2152. begin
  2153. GetProcedureAddress(_MsiGetFeatureValidStatesA, msilib, 'MsiGetFeatureValidStatesA');
  2154. asm
  2155. MOV ESP, EBP
  2156. POP EBP
  2157. JMP [_MsiGetFeatureValidStatesA]
  2158. end;
  2159. end;
  2160. var
  2161. _MsiGetFeatureValidStatesW: Pointer;
  2162. function MsiGetFeatureValidStatesW;
  2163. begin
  2164. GetProcedureAddress(_MsiGetFeatureValidStatesW, msilib, 'MsiGetFeatureValidStatesW');
  2165. asm
  2166. MOV ESP, EBP
  2167. POP EBP
  2168. JMP [_MsiGetFeatureValidStatesW]
  2169. end;
  2170. end;
  2171. var
  2172. _MsiGetFeatureValidStates: Pointer;
  2173. function MsiGetFeatureValidStates;
  2174. begin
  2175. GetProcedureAddress(_MsiGetFeatureValidStates, msilib, 'MsiGetFeatureValidStates' + AWSuffix);
  2176. asm
  2177. MOV ESP, EBP
  2178. POP EBP
  2179. JMP [_MsiGetFeatureValidStates]
  2180. end;
  2181. end;
  2182. var
  2183. _MsiGetSourcePathA: Pointer;
  2184. function MsiGetSourcePathA;
  2185. begin
  2186. GetProcedureAddress(_MsiGetSourcePathA, msilib, 'MsiGetSourcePathA');
  2187. asm
  2188. MOV ESP, EBP
  2189. POP EBP
  2190. JMP [_MsiGetSourcePathA]
  2191. end;
  2192. end;
  2193. var
  2194. _MsiGetSourcePathW: Pointer;
  2195. function MsiGetSourcePathW;
  2196. begin
  2197. GetProcedureAddress(_MsiGetSourcePathW, msilib, 'MsiGetSourcePathW');
  2198. asm
  2199. MOV ESP, EBP
  2200. POP EBP
  2201. JMP [_MsiGetSourcePathW]
  2202. end;
  2203. end;
  2204. var
  2205. _MsiGetSourcePath: Pointer;
  2206. function MsiGetSourcePath;
  2207. begin
  2208. GetProcedureAddress(_MsiGetSourcePath, msilib, 'MsiGetSourcePath' + AWSuffix);
  2209. asm
  2210. MOV ESP, EBP
  2211. POP EBP
  2212. JMP [_MsiGetSourcePath]
  2213. end;
  2214. end;
  2215. var
  2216. _MsiGetTargetPathA: Pointer;
  2217. function MsiGetTargetPathA;
  2218. begin
  2219. GetProcedureAddress(_MsiGetTargetPathA, msilib, 'MsiGetTargetPathA');
  2220. asm
  2221. MOV ESP, EBP
  2222. POP EBP
  2223. JMP [_MsiGetTargetPathA]
  2224. end;
  2225. end;
  2226. var
  2227. _MsiGetTargetPathW: Pointer;
  2228. function MsiGetTargetPathW;
  2229. begin
  2230. GetProcedureAddress(_MsiGetTargetPathW, msilib, 'MsiGetTargetPathW');
  2231. asm
  2232. MOV ESP, EBP
  2233. POP EBP
  2234. JMP [_MsiGetTargetPathW]
  2235. end;
  2236. end;
  2237. var
  2238. _MsiGetTargetPath: Pointer;
  2239. function MsiGetTargetPath;
  2240. begin
  2241. GetProcedureAddress(_MsiGetTargetPath, msilib, 'MsiGetTargetPath' + AWSuffix);
  2242. asm
  2243. MOV ESP, EBP
  2244. POP EBP
  2245. JMP [_MsiGetTargetPath]
  2246. end;
  2247. end;
  2248. var
  2249. _MsiSetTargetPathA: Pointer;
  2250. function MsiSetTargetPathA;
  2251. begin
  2252. GetProcedureAddress(_MsiSetTargetPathA, msilib, 'MsiSetTargetPathA');
  2253. asm
  2254. MOV ESP, EBP
  2255. POP EBP
  2256. JMP [_MsiSetTargetPathA]
  2257. end;
  2258. end;
  2259. var
  2260. _MsiSetTargetPathW: Pointer;
  2261. function MsiSetTargetPathW;
  2262. begin
  2263. GetProcedureAddress(_MsiSetTargetPathW, msilib, 'MsiSetTargetPathW');
  2264. asm
  2265. MOV ESP, EBP
  2266. POP EBP
  2267. JMP [_MsiSetTargetPathW]
  2268. end;
  2269. end;
  2270. var
  2271. _MsiSetTargetPath: Pointer;
  2272. function MsiSetTargetPath;
  2273. begin
  2274. GetProcedureAddress(_MsiSetTargetPath, msilib, 'MsiSetTargetPath' + AWSuffix);
  2275. asm
  2276. MOV ESP, EBP
  2277. POP EBP
  2278. JMP [_MsiSetTargetPath]
  2279. end;
  2280. end;
  2281. var
  2282. _MsiVerifyDiskSpace: Pointer;
  2283. function MsiVerifyDiskSpace;
  2284. begin
  2285. GetProcedureAddress(_MsiVerifyDiskSpace, msilib, 'MsiVerifyDiskSpace');
  2286. asm
  2287. MOV ESP, EBP
  2288. POP EBP
  2289. JMP [_MsiVerifyDiskSpace]
  2290. end;
  2291. end;
  2292. var
  2293. _MsiEnableUIPreview: Pointer;
  2294. function MsiEnableUIPreview;
  2295. begin
  2296. GetProcedureAddress(_MsiEnableUIPreview, msilib, 'MsiEnableUIPreview');
  2297. asm
  2298. MOV ESP, EBP
  2299. POP EBP
  2300. JMP [_MsiEnableUIPreview]
  2301. end;
  2302. end;
  2303. var
  2304. _MsiPreviewDialogA: Pointer;
  2305. function MsiPreviewDialogA;
  2306. begin
  2307. GetProcedureAddress(_MsiPreviewDialogA, msilib, 'MsiPreviewDialogA');
  2308. asm
  2309. MOV ESP, EBP
  2310. POP EBP
  2311. JMP [_MsiPreviewDialogA]
  2312. end;
  2313. end;
  2314. var
  2315. _MsiPreviewDialogW: Pointer;
  2316. function MsiPreviewDialogW;
  2317. begin
  2318. GetProcedureAddress(_MsiPreviewDialogW, msilib, 'MsiPreviewDialogW');
  2319. asm
  2320. MOV ESP, EBP
  2321. POP EBP
  2322. JMP [_MsiPreviewDialogW]
  2323. end;
  2324. end;
  2325. var
  2326. _MsiPreviewDialog: Pointer;
  2327. function MsiPreviewDialog;
  2328. begin
  2329. GetProcedureAddress(_MsiPreviewDialog, msilib, 'MsiPreviewDialog' + AWSuffix);
  2330. asm
  2331. MOV ESP, EBP
  2332. POP EBP
  2333. JMP [_MsiPreviewDialog]
  2334. end;
  2335. end;
  2336. var
  2337. _MsiPreviewBillboardA: Pointer;
  2338. function MsiPreviewBillboardA;
  2339. begin
  2340. GetProcedureAddress(_MsiPreviewBillboardA, msilib, 'MsiPreviewBillboardA');
  2341. asm
  2342. MOV ESP, EBP
  2343. POP EBP
  2344. JMP [_MsiPreviewBillboardA]
  2345. end;
  2346. end;
  2347. var
  2348. _MsiPreviewBillboardW: Pointer;
  2349. function MsiPreviewBillboardW;
  2350. begin
  2351. GetProcedureAddress(_MsiPreviewBillboardW, msilib, 'MsiPreviewBillboardW');
  2352. asm
  2353. MOV ESP, EBP
  2354. POP EBP
  2355. JMP [_MsiPreviewBillboardW]
  2356. end;
  2357. end;
  2358. var
  2359. _MsiPreviewBillboard: Pointer;
  2360. function MsiPreviewBillboard;
  2361. begin
  2362. GetProcedureAddress(_MsiPreviewBillboard, msilib, 'MsiPreviewBillboard' + AWSuffix);
  2363. asm
  2364. MOV ESP, EBP
  2365. POP EBP
  2366. JMP [_MsiPreviewBillboard]
  2367. end;
  2368. end;
  2369. var
  2370. _MsiGetLastErrorRecord: Pointer;
  2371. function MsiGetLastErrorRecord;
  2372. begin
  2373. GetProcedureAddress(_MsiGetLastErrorRecord, msilib, 'MsiGetLastErrorRecord');
  2374. asm
  2375. MOV ESP, EBP
  2376. POP EBP
  2377. JMP [_MsiGetLastErrorRecord]
  2378. end;
  2379. end;
  2380. {$ELSE}
  2381. function MsiDatabaseOpenViewA; external msilib name 'MsiDatabaseOpenViewA';
  2382. function MsiDatabaseOpenViewW; external msilib name 'MsiDatabaseOpenViewW';
  2383. function MsiDatabaseOpenView; external msilib name 'MsiDatabaseOpenView' + AWSuffix;
  2384. function MsiViewGetErrorA; external msilib name 'MsiViewGetErrorA';
  2385. function MsiViewGetErrorW; external msilib name 'MsiViewGetErrorW';
  2386. function MsiViewGetError; external msilib name 'MsiViewGetError' + AWSuffix;
  2387. function MsiViewExecute; external msilib name 'MsiViewExecute';
  2388. function MsiViewFetch; external msilib name 'MsiViewFetch';
  2389. function MsiViewModify; external msilib name 'MsiViewModify';
  2390. function MsiViewGetColumnInfo; external msilib name 'MsiViewGetColumnInfo';
  2391. function MsiViewClose; external msilib name 'MsiViewClose';
  2392. function MsiDatabaseGetPrimaryKeysA; external msilib name 'MsiDatabaseGetPrimaryKeysA';
  2393. function MsiDatabaseGetPrimaryKeysW; external msilib name 'MsiDatabaseGetPrimaryKeysW';
  2394. function MsiDatabaseGetPrimaryKeys; external msilib name 'MsiDatabaseGetPrimaryKeys' + AWSuffix;
  2395. function MsiDatabaseIsTablePersistentA; external msilib name 'MsiDatabaseIsTablePersistentA';
  2396. function MsiDatabaseIsTablePersistentW; external msilib name 'MsiDatabaseIsTablePersistentW';
  2397. function MsiDatabaseIsTablePersistent; external msilib name 'MsiDatabaseIsTablePersistent' + AWSuffix;
  2398. function MsiGetSummaryInformationA; external msilib name 'MsiGetSummaryInformationA';
  2399. function MsiGetSummaryInformationW; external msilib name 'MsiGetSummaryInformationW';
  2400. function MsiGetSummaryInformation; external msilib name 'MsiGetSummaryInformation' + AWSuffix;
  2401. function MsiSummaryInfoGetPropertyCount; external msilib name 'MsiSummaryInfoGetPropertyCount';
  2402. function MsiSummaryInfoSetPropertyA; external msilib name 'MsiSummaryInfoSetPropertyA';
  2403. function MsiSummaryInfoSetPropertyW; external msilib name 'MsiSummaryInfoSetPropertyW';
  2404. function MsiSummaryInfoSetProperty; external msilib name 'MsiSummaryInfoSetProperty' + AWSuffix;
  2405. function MsiSummaryInfoGetPropertyA; external msilib name 'MsiSummaryInfoGetPropertyA';
  2406. function MsiSummaryInfoGetPropertyW; external msilib name 'MsiSummaryInfoGetPropertyW';
  2407. function MsiSummaryInfoGetProperty; external msilib name 'MsiSummaryInfoGetProperty' + AWSuffix;
  2408. function MsiSummaryInfoPersist; external msilib name 'MsiSummaryInfoPersist';
  2409. function MsiOpenDatabaseA; external msilib name 'MsiOpenDatabaseA';
  2410. function MsiOpenDatabaseW; external msilib name 'MsiOpenDatabaseW';
  2411. function MsiOpenDatabase; external msilib name 'MsiOpenDatabase' + AWSuffix;
  2412. function MsiDatabaseImportA; external msilib name 'MsiDatabaseImportA';
  2413. function MsiDatabaseImportW; external msilib name 'MsiDatabaseImportW';
  2414. function MsiDatabaseImport; external msilib name 'MsiDatabaseImport' + AWSuffix;
  2415. function MsiDatabaseExportA; external msilib name 'MsiDatabaseExportA';
  2416. function MsiDatabaseExportW; external msilib name 'MsiDatabaseExportW';
  2417. function MsiDatabaseExport; external msilib name 'MsiDatabaseExport' + AWSuffix;
  2418. function MsiDatabaseMergeA; external msilib name 'MsiDatabaseMergeA';
  2419. function MsiDatabaseMergeW; external msilib name 'MsiDatabaseMergeW';
  2420. function MsiDatabaseMerge; external msilib name 'MsiDatabaseMerge' + AWSuffix;
  2421. function MsiDatabaseGenerateTransformA; external msilib name 'MsiDatabaseGenerateTransformA';
  2422. function MsiDatabaseGenerateTransformW; external msilib name 'MsiDatabaseGenerateTransformW';
  2423. function MsiDatabaseGenerateTransform; external msilib name 'MsiDatabaseGenerateTransform' + AWSuffix;
  2424. function MsiDatabaseApplyTransformA; external msilib name 'MsiDatabaseApplyTransformA';
  2425. function MsiDatabaseApplyTransformW; external msilib name 'MsiDatabaseApplyTransformW';
  2426. function MsiDatabaseApplyTransform; external msilib name 'MsiDatabaseApplyTransform' + AWSuffix;
  2427. function MsiCreateTransformSummaryInfoA; external msilib name 'MsiCreateTransformSummaryInfoA';
  2428. function MsiCreateTransformSummaryInfoW; external msilib name 'MsiCreateTransformSummaryInfoW';
  2429. function MsiCreateTransformSummaryInfo; external msilib name 'MsiCreateTransformSummaryInfo' + AWSuffix;
  2430. function MsiDatabaseCommit; external msilib name 'MsiDatabaseCommit';
  2431. function MsiGetDatabaseState; external msilib name 'MsiGetDatabaseState';
  2432. function MsiCreateRecord; external msilib name 'MsiCreateRecord';
  2433. function MsiRecordIsNull; external msilib name 'MsiRecordIsNull';
  2434. function MsiRecordDataSize; external msilib name 'MsiRecordDataSize';
  2435. function MsiRecordSetInteger; external msilib name 'MsiRecordSetInteger';
  2436. function MsiRecordSetStringA; external msilib name 'MsiRecordSetStringA';
  2437. function MsiRecordSetStringW; external msilib name 'MsiRecordSetStringW';
  2438. function MsiRecordSetString; external msilib name 'MsiRecordSetString' + AWSuffix;
  2439. function MsiRecordGetInteger; external msilib name 'MsiRecordGetInteger';
  2440. function MsiRecordGetStringA; external msilib name 'MsiRecordGetStringA';
  2441. function MsiRecordGetStringW; external msilib name 'MsiRecordGetStringW';
  2442. function MsiRecordGetString; external msilib name 'MsiRecordGetString' + AWSuffix;
  2443. function MsiRecordGetFieldCount; external msilib name 'MsiRecordGetFieldCount';
  2444. function MsiRecordSetStreamA; external msilib name 'MsiRecordSetStreamA';
  2445. function MsiRecordSetStreamW; external msilib name 'MsiRecordSetStreamW';
  2446. function MsiRecordSetStream; external msilib name 'MsiRecordSetStream' + AWSuffix;
  2447. function MsiRecordReadStream; external msilib name 'MsiRecordReadStream';
  2448. function MsiRecordClearData; external msilib name 'MsiRecordClearData';
  2449. function MsiGetActiveDatabase; external msilib name 'MsiGetActiveDatabase';
  2450. function MsiSetPropertyA; external msilib name 'MsiSetPropertyA';
  2451. function MsiSetPropertyW; external msilib name 'MsiSetPropertyW';
  2452. function MsiSetProperty; external msilib name 'MsiSetProperty' + AWSuffix;
  2453. function MsiGetPropertyA; external msilib name 'MsiGetPropertyA';
  2454. function MsiGetPropertyW; external msilib name 'MsiGetPropertyW';
  2455. function MsiGetProperty; external msilib name 'MsiGetProperty' + AWSuffix;
  2456. function MsiGetLanguage; external msilib name 'MsiGetLanguage';
  2457. function MsiGetMode; external msilib name 'MsiGetMode';
  2458. function MsiSetMode; external msilib name 'MsiSetMode';
  2459. function MsiFormatRecordA; external msilib name 'MsiFormatRecordA';
  2460. function MsiFormatRecordW; external msilib name 'MsiFormatRecordW';
  2461. function MsiFormatRecord; external msilib name 'MsiFormatRecord' + AWSuffix;
  2462. function MsiDoActionA; external msilib name 'MsiDoActionA';
  2463. function MsiDoActionW; external msilib name 'MsiDoActionW';
  2464. function MsiDoAction; external msilib name 'MsiDoAction' + AWSuffix;
  2465. function MsiSequenceA; external msilib name 'MsiSequenceA';
  2466. function MsiSequenceW; external msilib name 'MsiSequenceW';
  2467. function MsiSequence; external msilib name 'MsiSequence' + AWSuffix;
  2468. function MsiProcessMessage; external msilib name 'MsiProcessMessage';
  2469. function MsiEvaluateConditionA; external msilib name 'MsiEvaluateConditionA';
  2470. function MsiEvaluateConditionW; external msilib name 'MsiEvaluateConditionW';
  2471. function MsiEvaluateCondition; external msilib name 'MsiEvaluateCondition' + AWSuffix;
  2472. function MsiGetFeatureStateA; external msilib name 'MsiGetFeatureStateA';
  2473. function MsiGetFeatureStateW; external msilib name 'MsiGetFeatureStateW';
  2474. function MsiGetFeatureState; external msilib name 'MsiGetFeatureState' + AWSuffix;
  2475. function MsiSetFeatureStateA; external msilib name 'MsiSetFeatureStateA';
  2476. function MsiSetFeatureStateW; external msilib name 'MsiSetFeatureStateW';
  2477. function MsiSetFeatureState; external msilib name 'MsiSetFeatureState' + AWSuffix;
  2478. function MsiSetFeatureAttributesA; external msilib name 'MsiSetFeatureAttributesA';
  2479. function MsiSetFeatureAttributesW; external msilib name 'MsiSetFeatureAttributesW';
  2480. function MsiSetFeatureAttributes; external msilib name 'MsiSetFeatureAttributes' + AWSuffix;
  2481. function MsiGetComponentStateA; external msilib name 'MsiGetComponentStateA';
  2482. function MsiGetComponentStateW; external msilib name 'MsiGetComponentStateW';
  2483. function MsiGetComponentState; external msilib name 'MsiGetComponentState' + AWSuffix;
  2484. function MsiSetComponentStateA; external msilib name 'MsiSetComponentStateA';
  2485. function MsiSetComponentStateW; external msilib name 'MsiSetComponentStateW';
  2486. function MsiSetComponentState; external msilib name 'MsiSetComponentState' + AWSuffix;
  2487. function MsiGetFeatureCostA; external msilib name 'MsiGetFeatureCostA';
  2488. function MsiGetFeatureCostW; external msilib name 'MsiGetFeatureCostW';
  2489. function MsiGetFeatureCost; external msilib name 'MsiGetFeatureCost' + AWSuffix;
  2490. function MsiEnumComponentCostsA; external msilib name 'MsiEnumComponentCostsA';
  2491. function MsiEnumComponentCostsW; external msilib name 'MsiEnumComponentCostsW';
  2492. function MsiEnumComponentCosts; external msilib name 'MsiEnumComponentCosts' + AWSuffix;
  2493. function MsiSetInstallLevel; external msilib name 'MsiSetInstallLevel';
  2494. function MsiGetFeatureValidStatesA; external msilib name 'MsiGetFeatureValidStatesA';
  2495. function MsiGetFeatureValidStatesW; external msilib name 'MsiGetFeatureValidStatesW';
  2496. function MsiGetFeatureValidStates; external msilib name 'MsiGetFeatureValidStates' + AWSuffix;
  2497. function MsiGetSourcePathA; external msilib name 'MsiGetSourcePathA';
  2498. function MsiGetSourcePathW; external msilib name 'MsiGetSourcePathW';
  2499. function MsiGetSourcePath; external msilib name 'MsiGetSourcePath' + AWSuffix;
  2500. function MsiGetTargetPathA; external msilib name 'MsiGetTargetPathA';
  2501. function MsiGetTargetPathW; external msilib name 'MsiGetTargetPathW';
  2502. function MsiGetTargetPath; external msilib name 'MsiGetTargetPath' + AWSuffix;
  2503. function MsiSetTargetPathA; external msilib name 'MsiSetTargetPathA';
  2504. function MsiSetTargetPathW; external msilib name 'MsiSetTargetPathW';
  2505. function MsiSetTargetPath; external msilib name 'MsiSetTargetPath' + AWSuffix;
  2506. function MsiVerifyDiskSpace; external msilib name 'MsiVerifyDiskSpace';
  2507. function MsiEnableUIPreview; external msilib name 'MsiEnableUIPreview';
  2508. function MsiPreviewDialogA; external msilib name 'MsiPreviewDialogA';
  2509. function MsiPreviewDialogW; external msilib name 'MsiPreviewDialogW';
  2510. function MsiPreviewDialog; external msilib name 'MsiPreviewDialog' + AWSuffix;
  2511. function MsiPreviewBillboardA; external msilib name 'MsiPreviewBillboardA';
  2512. function MsiPreviewBillboardW; external msilib name 'MsiPreviewBillboardW';
  2513. function MsiPreviewBillboard; external msilib name 'MsiPreviewBillboard' + AWSuffix;
  2514. function MsiGetLastErrorRecord; external msilib name 'MsiGetLastErrorRecord';
  2515. {$ENDIF DYNAMIC_LINK}
  2516. end.