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] LPCWSTR table, [out] MSICONDITION *persistent );
42 HRESULT GetPrimaryKeys( [in] LPCWSTR table, [out] MSIHANDLE *keys );
43 HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo );
44 HRESULT OpenView( [in] LPCWSTR 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 SetMode( [in] MSIRUNMODE mode, [in] BOOL state );
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 );
74 HRESULT EvaluateCondition( [in] BSTR condition );
75 HRESULT GetFeatureCost( [in] BSTR feature, [in] INT cost_tree, [in] INSTALLSTATE state, [out] INT *cost);
79 uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8),
83 interface IWineMsiRemoteCustomAction : IUnknown
85 HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname,
86 [out] BSTR *function, [out] IWineMsiRemotePackage **package );
89 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
90 library WindowsInstaller
92 dispinterface Installer;
94 dispinterface Session;
95 dispinterface Database;
96 dispinterface SummaryInfo;
98 dispinterface UIPreview;
99 dispinterface FeatureInfo;
100 dispinterface RecordList;
101 dispinterface StringList;
102 dispinterface Product;
106 msiInstallStateNotUsed = -7,
107 msiInstallStateBadConfig = -6,
108 msiInstallStateIncomplete = -5,
109 msiInstallStateSourceAbsent = -4,
110 msiInstallStateInvalidArg = -2,
111 msiInstallStateUnknown = -1,
112 msiInstallStateBroken = 0,
113 msiInstallStateAdvertised = 1,
114 msiInstallStateRemoved = 1,
115 msiInstallStateAbsent = 2,
116 msiInstallStateLocal = 3,
117 msiInstallStateSource = 4,
118 msiInstallStateDefault = 5
122 msiOpenDatabaseModeReadOnly = 0,
123 msiOpenDatabaseModeTransact = 1,
124 msiOpenDatabaseModeDirect = 2,
125 msiOpenDatabaseModeCreate = 3,
126 msiOpenDatabaseModeCreateDirect = 4,
127 msiOpenDatabaseModePatchFile = 32
128 } MsiOpenDatabaseMode;
131 msiUILevelNoChange = 0,
132 msiUILevelDefault = 1,
135 msiUILevelReduced = 4,
137 msiUILevelHideCancel = 32,
138 msiUILevelProgressOnly = 64,
139 msiUILevelEndDialog = 128,
140 msiUILevelSourceResOnly = 256
143 [ uuid(000C1090-0000-0000-C000-000000000046) ]
144 dispinterface Installer
147 [id(DISPID_INSTALLER_UILEVEL)]
150 [id(DISPID_INSTALLER_CREATERECORD)]
151 Record *CreateRecord([in] long Count);
152 [id(DISPID_INSTALLER_OPENPACKAGE)]
153 Session* OpenPackage(
154 [in] VARIANT PackagePath,
155 [in, optional, defaultvalue(0)] long Options);
156 [id(DISPID_INSTALLER_OPENPRODUCT)]
157 Session* OpenProduct(
158 [in] BSTR ProductCode);
159 [id(DISPID_INSTALLER_SUMMARYINFORMATION)]
160 SummaryInfo* SummaryInformation(
161 [in] BSTR PackagePath,
162 [in, optional, defaultvalue(0)] long UpdateCount);
163 [id(DISPID_INSTALLER_OPENDATABASE)]
164 Database *OpenDatabase(
165 [in] BSTR DatabasePath,
166 [in] VARIANT OpenMode);
167 [id(DISPID_INSTALLER_ENABLELOG)]
171 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
173 [in] BSTR PackagePath,
174 [in, optional, defaultvalue("0")] BSTR PropertyValues);
175 [id(DISPID_INSTALLER_VERSION)]
177 [id(DISPID_INSTALLER_LASTERRORRECORD)]
178 Record* LastErrorRecord();
179 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
183 [in, optional] VARIANT Value);
184 [id(DISPID_INSTALLER_ENVIRONMENT), propget]
185 BSTR Environment([in] BSTR Variable);
186 [id(DISPID_INSTALLER_ENVIRONMENT), propput]
190 [id(DISPID_INSTALLER_FILEATTRIBUTES)]
191 long FileAttributes([in] BSTR FilePath);
192 [id(DISPID_INSTALLER_FILESIZE)]
193 long FileSize([in] BSTR FilePath);
194 [id(DISPID_INSTALLER_FILEVERSION)]
197 [in, optional] VARIANT Language);
198 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
199 MsiInstallState ProductState(
201 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
204 [in] BSTR Attribute);
205 [id(DISPID_INSTALLER_PRODUCTS), propget]
206 StringList *Products();
207 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
208 StringList *RelatedProducts(
209 [in] BSTR UpgradeCode);
212 [ uuid(000C1093-0000-0000-C000-000000000046) ]
217 [id(DISPID_RECORD_STRINGDATA), propget]
218 BSTR StringData([in] long Field);
219 [id(DISPID_RECORD_STRINGDATA), propput]
223 [id(DISPID_RECORD_INTEGERDATA), propget]
224 long IntegerData([in] long Field);
225 [id(DISPID_RECORD_INTEGERDATA), propput]
229 [id(DISPID_RECORD_FIELDCOUNT), propget]
233 [ uuid(000C1095-0000-0000-C000-000000000046) ]
234 dispinterface StringList
238 [id(DISPID_LIST__NEWENUM)]
240 [id(DISPID_LIST_ITEM), propget]
241 BSTR Item(long Index);
242 [id(DISPID_LIST_COUNT), propget]
246 [ uuid(000C1096-0000-0000-C000-000000000046) ]
247 dispinterface RecordList
253 [ uuid(000C109A-0000-0000-C000-000000000046) ]
254 dispinterface UIPreview
260 [ uuid(000C109B-0000-0000-C000-000000000046) ]
261 dispinterface SummaryInfo
265 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
266 VARIANT Property([in] long Pid);
267 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
271 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
272 long PropertyCount();
276 msiViewModifySeek = -1,
277 msiViewModifyRefresh = 0,
278 msiViewModifyInsert = 1,
279 msiViewModifyUpdate = 2,
280 msiViewModifyAssign = 3,
281 msiViewModifyReplace = 4,
282 msiViewModifyMerge = 5,
283 msiViewModifyDelete = 6,
284 msiViewModifyInsertTemporary = 7,
285 msiViewModifyValidate = 8,
286 msiViewModifyValidateNew = 9,
287 msiViewModifyValidateField = 10,
288 msiViewModifyValidateDelete = 11,
289 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
291 [ uuid(000C109C-0000-0000-C000-000000000046) ]
296 [id(DISPID_VIEW_EXECUTE)]
297 void Execute([in, optional, defaultvalue(0)] Record *Params);
298 [id(DISPID_VIEW_FETCH)]
300 [id(DISPID_VIEW_MODIFY)]
302 [in] _MsiViewModify Mode,
304 [id(DISPID_VIEW_CLOSE)]
308 [ uuid(000C109D-0000-0000-C000-000000000046) ]
309 dispinterface Database
313 [id(DISPID_DATABASE_OPENVIEW)]
314 View* OpenView([in] BSTR Sql);
315 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
316 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
320 msiDoActionStatusNoAction = 0,
321 msiDoActionStatusSuccess = 1,
322 msiDoActionStatusUserExit = 2,
323 msiDoActionStatusFailure = 3,
324 msiDoActionStatusSuspend = 4,
325 msiDoActionStatusFinished = 5,
326 msiDoActionStatusWrongState = 6,
327 msiDoActionStatusBadActionData = 7
332 msiRunModeAdvertise = 1,
333 msiRunModeMaintenance = 2,
334 msiRunModeRollbackEnabled = 3,
335 msiRunModeLogEnabled = 4,
336 msiRunModeOperations = 5,
337 msiRunModeRebootAtEnd = 6,
338 msiRunModeRebootNow = 7,
339 msiRunModeCabinet = 8,
340 msiRunModeSourceShortNames = 9,
341 msiRunModeTargetShortNames = 10,
342 msiRunModeWindows9x = 12,
343 msiRunModeZawEnabled = 13,
344 msiRunModeScheduled = 16,
345 msiRunModeRollback = 17,
346 msiRunModeCommit = 18
350 msiEvaluateConditionFalse = 0,
351 msiEvaluateConditionTrue = 1,
352 msiEvaluateConditionNone = 2,
353 msiEvaluateConditionError = 3
354 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
357 msiMessageStatusError = -1,
358 msiMessageStatusNone = 0,
359 msiMessageStatusOk = 1,
360 msiMessageStatusCancel = 2,
361 msiMessageStatusAbort = 3,
362 msiMessageStatusRetry = 4,
363 msiMessageStatusIgnore = 5,
364 msiMessageStatusYes = 6,
365 msiMessageStatusNo = 7
369 msiMessageTypeFatalExit = 0,
370 msiMessageTypeError = 0x01000000,
371 msiMessageTypeWarning = 0x02000000,
372 msiMessageTypeUser = 0x03000000,
373 msiMessageTypeInfo = 0x04000000,
374 msiMessageTypeFilesInUse = 0x05000000,
375 msiMessageTypeResolveSource = 0x06000000,
376 msiMessageTypeOutOfDiskSpace = 0x07000000,
377 msiMessageTypeActionStart = 0x08000000,
378 msiMessageTypeActionData = 0x09000000,
379 msiMessageTypeProgress = 0x0a000000,
380 msiMessageTypeCommonData = 0x0b000000,
381 msiMessageTypeOk = 0,
382 msiMessageTypeOkCancel = 1,
383 msiMessageTypeAbortRetryIgnore = 2,
384 msiMessageTypeYesNoCancel = 3,
385 msiMessageTypeYesNo = 4,
386 msiMessageTypeRetryCancel = 5,
387 msiMessageTypeDefault1 = 0,
388 msiMessageTypeDefault2 = 256,
389 msiMessageTypeDefault3 = 512
392 [ uuid(000C109E-0000-0000-C000-000000000046) ]
393 dispinterface Session
397 [id(DISPID_SESSION_INSTALLER), propget]
398 Installer *Installer();
399 [id(DISPID_SESSION_PROPERTY), propget]
400 BSTR Property([in] BSTR Name);
401 [id(DISPID_SESSION_PROPERTY), propput]
405 [id(DISPID_SESSION_LANGUAGE), propget]
407 [id(DISPID_SESSION_MODE), propget]
408 VARIANT_BOOL Mode([in] MsiRunMode Flag);
409 [id(DISPID_SESSION_MODE), propput]
411 [in] MsiRunMode Flag,
412 [in] VARIANT_BOOL rhs);
413 [id(DISPID_SESSION_DATABASE), propget]
414 Database* Database();
415 [id(DISPID_SESSION_DOACTION)]
416 MsiDoActionStatus DoAction([in] BSTR Action);
417 [id(DISPID_SESSION_EVALUATECONDITION)]
418 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
419 [id(DISPID_SESSION_MESSAGE)]
420 MsiMessageStatus Message(
421 [in] MsiMessageType Kind,
422 [in] Record *Record);
423 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
424 MsiInstallState FeatureCurrentState([in] BSTR Feature);
425 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
426 MsiInstallState FeatureRequestState([in] BSTR Feature);
427 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
428 void FeatureRequestState(
430 [in] MsiInstallState rhs);
431 [id(DISPID_SESSION_SETINSTALLLEVEL)]
432 void SetInstallLevel([in] long Level);
435 [ uuid(000C109F-0000-0000-C000-000000000046) ]
436 dispinterface FeatureInfo
442 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
443 dispinterface Product
449 [ uuid(000C10A1-0000-0000-C000-000000000046) ]