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;
35 uuid(7BDE2046-D03B-4ffc-B84C-A098F38CFF0B),
39 interface IWineMsiRemoteDatabase : IUnknown
41 HRESULT IsTablePersistent( [in] BSTR table, [out] MSICONDITION *persistent );
42 HRESULT GetPrimaryKeys( [in] BSTR table, [out] MSIHANDLE *keys );
43 HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo );
44 HRESULT OpenView( [in] BSTR query, [out] MSIHANDLE *view );
45 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
49 uuid(902B3592-9D08-4dfd-A593-D07C52546421),
53 interface IWineMsiRemotePackage : IUnknown
55 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
56 HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
57 HRESULT GetProperty( [in] BSTR property, [out] BSTR *value, [out] DWORD *size );
58 HRESULT SetProperty( [in] BSTR property, [in] BSTR value );
59 HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
60 HRESULT DoAction( [in] BSTR action );
61 HRESULT Sequence( [in] BSTR table, [in] int sequence );
62 HRESULT GetTargetPath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
63 HRESULT SetTargetPath( [in] BSTR folder, [in] BSTR value );
64 HRESULT GetSourcePath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
65 HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
66 HRESULT GetFeatureState( [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
67 HRESULT SetFeatureState( [in] BSTR feature, [in] INSTALLSTATE state );
68 HRESULT GetComponentState( [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
69 HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state );
70 HRESULT GetLanguage( [out] LANGID *language );
71 HRESULT SetInstallLevel( [in] int level );
72 HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR *value );
73 HRESULT EvaluateCondition( [in] BSTR condition );
74 HRESULT GetFeatureCost( [in] BSTR feature, [in] INT cost_tree, [in] INSTALLSTATE state, [out] INT *cost);
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;
130 msiUILevelNoChange = 0,
131 msiUILevelDefault = 1,
134 msiUILevelReduced = 4,
136 msiUILevelHideCancel = 32,
137 msiUILevelProgressOnly = 64,
138 msiUILevelEndDialog = 128,
139 msiUILevelSourceResOnly = 256
142 [ uuid(000C1090-0000-0000-C000-000000000046) ]
143 dispinterface Installer
146 [id(DISPID_INSTALLER_UILEVEL)]
149 [id(DISPID_INSTALLER_CREATERECORD)]
150 Record *CreateRecord([in] long Count);
151 [id(DISPID_INSTALLER_OPENPACKAGE)]
152 Session* OpenPackage(
153 [in] VARIANT PackagePath,
154 [in, optional, defaultvalue(0)] long Options);
155 [id(DISPID_INSTALLER_OPENDATABASE)]
156 Database *OpenDatabase(
157 [in] BSTR DatabasePath,
158 [in] VARIANT OpenMode);
159 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
161 [in] BSTR PackagePath,
162 [in, optional, defaultvalue("0")] BSTR PropertyValues);
163 [id(DISPID_INSTALLER_VERSION)]
165 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
169 [in, optional] VARIANT Value);
170 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
171 MsiInstallState ProductState(
173 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
176 [in] BSTR Attribute);
177 [id(DISPID_INSTALLER_PRODUCTS), propget]
178 StringList *Products();
179 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
180 StringList *RelatedProducts(
181 [in] BSTR UpgradeCode);
184 [ uuid(000C1093-0000-0000-C000-000000000046) ]
189 [id(DISPID_RECORD_STRINGDATA), propget]
190 BSTR StringData([in] long Field);
191 [id(DISPID_RECORD_STRINGDATA), propput]
195 [id(DISPID_RECORD_INTEGERDATA), propget]
196 long IntegerData([in] long Field);
197 [id(DISPID_RECORD_INTEGERDATA), propput]
201 [id(DISPID_RECORD_FIELDCOUNT), propget]
205 [ uuid(000C1095-0000-0000-C000-000000000046) ]
206 dispinterface StringList
210 [id(DISPID_LIST__NEWENUM)]
212 [id(DISPID_LIST_ITEM), propget]
213 BSTR Item(long Index);
214 [id(DISPID_LIST_COUNT), propget]
218 [ uuid(000C1096-0000-0000-C000-000000000046) ]
219 dispinterface RecordList
225 [ uuid(000C109A-0000-0000-C000-000000000046) ]
226 dispinterface UIPreview
232 [ uuid(000C109B-0000-0000-C000-000000000046) ]
233 dispinterface SummaryInfo
237 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
238 VARIANT Property([in] long Pid);
239 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
243 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
244 long PropertyCount();
248 msiViewModifySeek = -1,
249 msiViewModifyRefresh = 0,
250 msiViewModifyInsert = 1,
251 msiViewModifyUpdate = 2,
252 msiViewModifyAssign = 3,
253 msiViewModifyReplace = 4,
254 msiViewModifyMerge = 5,
255 msiViewModifyDelete = 6,
256 msiViewModifyInsertTemporary = 7,
257 msiViewModifyValidate = 8,
258 msiViewModifyValidateNew = 9,
259 msiViewModifyValidateField = 10,
260 msiViewModifyValidateDelete = 11,
261 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
263 [ uuid(000C109C-0000-0000-C000-000000000046) ]
268 [id(DISPID_VIEW_EXECUTE)]
269 void Execute([in, optional, defaultvalue(0)] Record *Params);
270 [id(DISPID_VIEW_FETCH)]
272 [id(DISPID_VIEW_MODIFY)]
274 [in] _MsiViewModify Mode,
276 [id(DISPID_VIEW_CLOSE)]
280 [ uuid(000C109D-0000-0000-C000-000000000046) ]
281 dispinterface Database
285 [id(DISPID_DATABASE_OPENVIEW)]
286 View* OpenView([in] BSTR Sql);
287 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
288 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
292 msiDoActionStatusNoAction = 0,
293 msiDoActionStatusSuccess = 1,
294 msiDoActionStatusUserExit = 2,
295 msiDoActionStatusFailure = 3,
296 msiDoActionStatusSuspend = 4,
297 msiDoActionStatusFinished = 5,
298 msiDoActionStatusWrongState = 6,
299 msiDoActionStatusBadActionData = 7
304 msiRunModeAdvertise = 1,
305 msiRunModeMaintenance = 2,
306 msiRunModeRollbackEnabled = 3,
307 msiRunModeLogEnabled = 4,
308 msiRunModeOperations = 5,
309 msiRunModeRebootAtEnd = 6,
310 msiRunModeRebootNow = 7,
311 msiRunModeCabinet = 8,
312 msiRunModeSourceShortNames = 9,
313 msiRunModeTargetShortNames = 10,
314 msiRunModeWindows9x = 12,
315 msiRunModeZawEnabled = 13,
316 msiRunModeScheduled = 16,
317 msiRunModeRollback = 17,
318 msiRunModeCommit = 18
322 msiEvaluateConditionFalse = 0,
323 msiEvaluateConditionTrue = 1,
324 msiEvaluateConditionNone = 2,
325 msiEvaluateConditionError = 3
326 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
329 msiMessageStatusError = -1,
330 msiMessageStatusNone = 0,
331 msiMessageStatusOk = 1,
332 msiMessageStatusCancel = 2,
333 msiMessageStatusAbort = 3,
334 msiMessageStatusRetry = 4,
335 msiMessageStatusIgnore = 5,
336 msiMessageStatusYes = 6,
337 msiMessageStatusNo = 7
341 msiMessageTypeFatalExit = 0,
342 msiMessageTypeError = 0x01000000,
343 msiMessageTypeWarning = 0x02000000,
344 msiMessageTypeUser = 0x03000000,
345 msiMessageTypeInfo = 0x04000000,
346 msiMessageTypeFilesInUse = 0x05000000,
347 msiMessageTypeResolveSource = 0x06000000,
348 msiMessageTypeOutOfDiskSpace = 0x07000000,
349 msiMessageTypeActionStart = 0x08000000,
350 msiMessageTypeActionData = 0x09000000,
351 msiMessageTypeProgress = 0x0a000000,
352 msiMessageTypeCommonData = 0x0b000000,
353 msiMessageTypeOk = 0,
354 msiMessageTypeOkCancel = 1,
355 msiMessageTypeAbortRetryIgnore = 2,
356 msiMessageTypeYesNoCancel = 3,
357 msiMessageTypeYesNo = 4,
358 msiMessageTypeRetryCancel = 5,
359 msiMessageTypeDefault1 = 0,
360 msiMessageTypeDefault2 = 256,
361 msiMessageTypeDefault3 = 512
364 [ uuid(000C109E-0000-0000-C000-000000000046) ]
365 dispinterface Session
369 [id(DISPID_SESSION_INSTALLER), propget]
370 Installer *Installer();
371 [id(DISPID_SESSION_PROPERTY), propget]
372 BSTR Property([in] BSTR Name);
373 [id(DISPID_SESSION_PROPERTY), propput]
377 [id(DISPID_SESSION_LANGUAGE), propget]
379 [id(DISPID_SESSION_MODE), propget]
380 VARIANT_BOOL Mode([in] MsiRunMode Flag);
381 [id(DISPID_SESSION_MODE), propput]
383 [in] MsiRunMode Flag,
384 [in] VARIANT_BOOL rhs);
385 [id(DISPID_SESSION_DATABASE), propget]
386 Database* Database();
387 [id(DISPID_SESSION_DOACTION)]
388 MsiDoActionStatus DoAction([in] BSTR Action);
389 [id(DISPID_SESSION_EVALUATECONDITION)]
390 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
391 [id(DISPID_SESSION_MESSAGE)]
392 MsiMessageStatus Message(
393 [in] MsiMessageType Kind,
394 [in] Record *Record);
395 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
396 MsiInstallState FeatureCurrentState([in] BSTR Feature);
397 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
398 MsiInstallState FeatureRequestState([in] BSTR Feature);
399 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
400 void FeatureRequestState(
402 [in] MsiInstallState rhs);
403 [id(DISPID_SESSION_SETINSTALLLEVEL)]
404 void SetInstallLevel([in] long Level);
407 [ uuid(000C109F-0000-0000-C000-000000000046) ]
408 dispinterface FeatureInfo
414 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
415 dispinterface Product
421 [ uuid(000C10A1-0000-0000-C000-000000000046) ]