jwamsiquery.pas 96 KB

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