2 * Copyright (C) 2007 Mike McCormack
3 * Copyright (C) 2007 Misha Koshelev
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "msiserver_dispids.h"
27 typedef unsigned long MSIHANDLE;
28 typedef int INSTALLMESSAGE;
29 typedef int MSICONDITION;
30 typedef int MSIRUNMODE;
31 typedef int INSTALLSTATE;
36 uuid(7BDE2046-D03B-4ffc-B84C-A098F38CFF0B),
40 interface IWineMsiRemoteDatabase : IUnknown
42 HRESULT IsTablePersistent( [in] BSTR table, [out] MSICONDITION *persistent );
43 HRESULT GetPrimaryKeys( [in] BSTR table, [out] MSIHANDLE *keys );
44 HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo );
45 HRESULT OpenView( [in] BSTR query, [out] MSIHANDLE *view );
46 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
50 uuid(902B3592-9D08-4dfd-A593-D07C52546421),
54 interface IWineMsiRemotePackage : IUnknown
56 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
57 HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
58 HRESULT GetProperty( [in] BSTR property, [out] BSTR *value, [out] DWORD *size );
59 HRESULT SetProperty( [in] BSTR property, [in] BSTR value );
60 HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
61 HRESULT DoAction( [in] BSTR action );
62 HRESULT Sequence( [in] BSTR table, [in] int sequence );
63 HRESULT GetTargetPath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
64 HRESULT SetTargetPath( [in] BSTR folder, [in] BSTR value );
65 HRESULT GetSourcePath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
66 HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
67 HRESULT GetFeatureState( [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
68 HRESULT SetFeatureState( [in] BSTR feature, [in] INSTALLSTATE state );
69 HRESULT GetComponentState( [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
70 HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state );
71 HRESULT GetLanguage( [out] LANGID *language );
72 HRESULT SetInstallLevel( [in] int level );
73 HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR value, [out] DWORD *size );
74 HRESULT EvaluateCondition( [in] BSTR condition );
78 uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8),
82 interface IWineMsiRemoteCustomAction : IUnknown
84 HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname,
85 [out] BSTR *function, [out] IWineMsiRemotePackage **package );
88 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
89 library WindowsInstaller
91 dispinterface Installer;
93 dispinterface Session;
94 dispinterface Database;
95 dispinterface SummaryInfo;
97 dispinterface UIPreview;
98 dispinterface FeatureInfo;
99 dispinterface RecordList;
100 dispinterface StringList;
101 dispinterface Product;
105 msiInstallStateNotUsed = -7,
106 msiInstallStateBadConfig = -6,
107 msiInstallStateIncomplete = -5,
108 msiInstallStateSourceAbsent = -4,
109 msiInstallStateInvalidArg = -2,
110 msiInstallStateUnknown = -1,
111 msiInstallStateBroken = 0,
112 msiInstallStateAdvertised = 1,
113 msiInstallStateRemoved = 1,
114 msiInstallStateAbsent = 2,
115 msiInstallStateLocal = 3,
116 msiInstallStateSource = 4,
117 msiInstallStateDefault = 5
121 msiOpenDatabaseModeReadOnly = 0,
122 msiOpenDatabaseModeTransact = 1,
123 msiOpenDatabaseModeDirect = 2,
124 msiOpenDatabaseModeCreate = 3,
125 msiOpenDatabaseModeCreateDirect = 4,
126 msiOpenDatabaseModePatchFile = 32
127 } MsiOpenDatabaseMode;
129 [ uuid(000C1090-0000-0000-C000-000000000046) ]
130 dispinterface Installer
134 [id(DISPID_INSTALLER_CREATERECORD)]
135 Record *CreateRecord([in] long Count);
136 [id(DISPID_INSTALLER_OPENPACKAGE)]
137 Session* OpenPackage(
138 [in] VARIANT PackagePath,
139 [in, optional, defaultvalue(0)] long Options);
140 [id(DISPID_INSTALLER_OPENDATABASE)]
141 Database *OpenDatabase(
142 [in] BSTR DatabasePath,
143 [in] VARIANT OpenMode);
144 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
146 [in] BSTR PackagePath,
147 [in, optional, defaultvalue("0")] BSTR PropertyValues);
148 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
152 [in, optional] VARIANT Value);
153 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
154 MsiInstallState ProductState(
156 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
159 [in] BSTR Attribute);
160 [id(DISPID_INSTALLER_PRODUCTS), propget]
161 StringList *Products();
162 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
163 StringList *RelatedProducts(
164 [in] BSTR UpgradeCode);
167 [ uuid(000C1093-0000-0000-C000-000000000046) ]
172 [id(DISPID_RECORD_STRINGDATA), propget]
173 BSTR StringData([in] long Field);
174 [id(DISPID_RECORD_STRINGDATA), propput]
178 [id(DISPID_RECORD_INTEGERDATA), propget]
179 long IntegerData([in] long Field);
180 [id(DISPID_RECORD_INTEGERDATA), propput]
184 [id(DISPID_RECORD_FIELDCOUNT), propget]
188 [ uuid(000C1095-0000-0000-C000-000000000046) ]
189 dispinterface StringList
193 [id(DISPID_LIST__NEWENUM)]
195 [id(DISPID_LIST_ITEM), propget]
196 BSTR Item(long Index);
197 [id(DISPID_LIST_COUNT), propget]
201 [ uuid(000C1096-0000-0000-C000-000000000046) ]
202 dispinterface RecordList
208 [ uuid(000C109A-0000-0000-C000-000000000046) ]
209 dispinterface UIPreview
215 [ uuid(000C109B-0000-0000-C000-000000000046) ]
216 dispinterface SummaryInfo
220 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
221 VARIANT Property([in] long Pid);
222 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
226 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
227 long PropertyCount();
231 msiViewModifySeek = -1,
232 msiViewModifyRefresh = 0,
233 msiViewModifyInsert = 1,
234 msiViewModifyUpdate = 2,
235 msiViewModifyAssign = 3,
236 msiViewModifyReplace = 4,
237 msiViewModifyMerge = 5,
238 msiViewModifyDelete = 6,
239 msiViewModifyInsertTemporary = 7,
240 msiViewModifyValidate = 8,
241 msiViewModifyValidateNew = 9,
242 msiViewModifyValidateField = 10,
243 msiViewModifyValidateDelete = 11,
244 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
246 [ uuid(000C109C-0000-0000-C000-000000000046) ]
251 [id(DISPID_VIEW_EXECUTE)]
252 void Execute([in, optional, defaultvalue(0)] Record *Params);
253 [id(DISPID_VIEW_FETCH)]
255 [id(DISPID_VIEW_MODIFY)]
257 [in] _MsiViewModify Mode,
259 [id(DISPID_VIEW_CLOSE)]
263 [ uuid(000C109D-0000-0000-C000-000000000046) ]
264 dispinterface Database
268 [id(DISPID_DATABASE_OPENVIEW)]
269 View* OpenView([in] BSTR Sql);
270 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
271 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
275 msiDoActionStatusNoAction = 0,
276 msiDoActionStatusSuccess = 1,
277 msiDoActionStatusUserExit = 2,
278 msiDoActionStatusFailure = 3,
279 msiDoActionStatusSuspend = 4,
280 msiDoActionStatusFinished = 5,
281 msiDoActionStatusWrongState = 6,
282 msiDoActionStatusBadActionData = 7
287 msiRunModeAdvertise = 1,
288 msiRunModeMaintenance = 2,
289 msiRunModeRollbackEnabled = 3,
290 msiRunModeLogEnabled = 4,
291 msiRunModeOperations = 5,
292 msiRunModeRebootAtEnd = 6,
293 msiRunModeRebootNow = 7,
294 msiRunModeCabinet = 8,
295 msiRunModeSourceShortNames = 9,
296 msiRunModeTargetShortNames = 10,
297 msiRunModeWindows9x = 12,
298 msiRunModeZawEnabled = 13,
299 msiRunModeScheduled = 16,
300 msiRunModeRollback = 17,
301 msiRunModeCommit = 18
305 msiEvaluateConditionFalse = 0,
306 msiEvaluateConditionTrue = 1,
307 msiEvaluateConditionNone = 2,
308 msiEvaluateConditionError = 3
309 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
311 [ uuid(000C109E-0000-0000-C000-000000000046) ]
312 dispinterface Session
316 [id(DISPID_SESSION_INSTALLER), propget]
317 Installer *Installer();
318 [id(DISPID_SESSION_PROPERTY), propget]
319 BSTR Property([in] BSTR Name);
320 [id(DISPID_SESSION_PROPERTY), propput]
324 [id(DISPID_SESSION_LANGUAGE), propget]
326 [id(DISPID_SESSION_MODE), propget]
327 VARIANT_BOOL Mode([in] MsiRunMode Flag);
328 [id(DISPID_SESSION_MODE), propput]
330 [in] MsiRunMode Flag,
331 [in] VARIANT_BOOL rhs);
332 [id(DISPID_SESSION_DATABASE), propget]
333 Database* Database();
334 [id(DISPID_SESSION_DOACTION)]
335 MsiDoActionStatus DoAction([in] BSTR Action);
336 [id(DISPID_SESSION_EVALUATECONDITION)]
337 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
338 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
339 MsiInstallState FeatureCurrentState([in] BSTR Feature);
340 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
341 MsiInstallState FeatureRequestState([in] BSTR Feature);
342 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
343 void FeatureRequestState(
345 [in] MsiInstallState rhs);
346 [id(DISPID_SESSION_SETINSTALLLEVEL)]
347 void SetInstallLevel([in] long Level);
350 [ uuid(000C109F-0000-0000-C000-000000000046) ]
351 dispinterface FeatureInfo
357 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
358 dispinterface Product
364 [ uuid(000C10A1-0000-0000-C000-000000000046) ]