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 MSIRUNMODE;
30 typedef int INSTALLSTATE;
35 uuid(902B3592-9D08-4dfd-A593-D07C52546421),
39 interface IWineMsiRemotePackage : IUnknown
41 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
42 HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
43 HRESULT GetProperty( [in] BSTR property, [out] BSTR *value, [out] DWORD *size );
44 HRESULT SetProperty( [in] BSTR property, [in] BSTR value );
45 HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
46 HRESULT DoAction( [in] BSTR action );
47 HRESULT Sequence( [in] BSTR table, [in] int sequence );
48 HRESULT GetTargetPath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
49 HRESULT SetTargetPath( [in] BSTR folder, [in] BSTR value );
50 HRESULT GetSourcePath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
51 HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
52 HRESULT GetFeatureState( [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
53 HRESULT SetFeatureState( [in] BSTR feature, [in] INSTALLSTATE state );
54 HRESULT GetComponentState( [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
55 HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state );
56 HRESULT GetLanguage( [out] LANGID *language );
57 HRESULT SetInstallLevel( [in] int level );
58 HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR value, [out] DWORD *size );
59 HRESULT EvaluateCondition( [in] BSTR condition );
63 uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8),
67 interface IWineMsiRemoteCustomAction : IUnknown
69 HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname,
70 [out] BSTR *function, [out] IWineMsiRemotePackage **package );
73 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
74 library WindowsInstaller
76 dispinterface Installer;
78 dispinterface Session;
79 dispinterface Database;
80 dispinterface SummaryInfo;
82 dispinterface UIPreview;
83 dispinterface FeatureInfo;
84 dispinterface RecordList;
85 dispinterface StringList;
86 dispinterface Product;
90 msiInstallStateNotUsed = -7,
91 msiInstallStateBadConfig = -6,
92 msiInstallStateIncomplete = -5,
93 msiInstallStateSourceAbsent = -4,
94 msiInstallStateInvalidArg = -2,
95 msiInstallStateUnknown = -1,
96 msiInstallStateBroken = 0,
97 msiInstallStateAdvertised = 1,
98 msiInstallStateRemoved = 1,
99 msiInstallStateAbsent = 2,
100 msiInstallStateLocal = 3,
101 msiInstallStateSource = 4,
102 msiInstallStateDefault = 5
106 msiOpenDatabaseModeReadOnly = 0,
107 msiOpenDatabaseModeTransact = 1,
108 msiOpenDatabaseModeDirect = 2,
109 msiOpenDatabaseModeCreate = 3,
110 msiOpenDatabaseModeCreateDirect = 4,
111 msiOpenDatabaseModePatchFile = 32
112 } MsiOpenDatabaseMode;
114 [ uuid(000C1090-0000-0000-C000-000000000046) ]
115 dispinterface Installer
119 [id(DISPID_INSTALLER_CREATERECORD)]
120 Record *CreateRecord([in] long Count);
121 [id(DISPID_INSTALLER_OPENPACKAGE)]
122 Session* OpenPackage(
123 [in] VARIANT PackagePath,
124 [in, optional, defaultvalue(0)] long Options);
125 [id(DISPID_INSTALLER_OPENDATABASE)]
126 Database *OpenDatabase(
127 [in] BSTR DatabasePath,
128 [in] VARIANT OpenMode);
129 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
131 [in] BSTR PackagePath,
132 [in, optional, defaultvalue("0")] BSTR PropertyValues);
133 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
137 [in, optional] VARIANT Value);
138 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
139 MsiInstallState ProductState(
141 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
144 [in] BSTR Attribute);
145 [id(DISPID_INSTALLER_PRODUCTS), propget]
146 StringList *Products();
147 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
148 StringList *RelatedProducts(
149 [in] BSTR UpgradeCode);
152 [ uuid(000C1093-0000-0000-C000-000000000046) ]
157 [id(DISPID_RECORD_STRINGDATA), propget]
158 BSTR StringData([in] long Field);
159 [id(DISPID_RECORD_STRINGDATA), propput]
163 [id(DISPID_RECORD_INTEGERDATA), propget]
164 long IntegerData([in] long Field);
165 [id(DISPID_RECORD_INTEGERDATA), propput]
169 [id(DISPID_RECORD_FIELDCOUNT), propget]
173 [ uuid(000C1095-0000-0000-C000-000000000046) ]
174 dispinterface StringList
178 [id(DISPID_LIST__NEWENUM)]
180 [id(DISPID_LIST_ITEM), propget]
181 BSTR Item(long Index);
182 [id(DISPID_LIST_COUNT), propget]
186 [ uuid(000C1096-0000-0000-C000-000000000046) ]
187 dispinterface RecordList
193 [ uuid(000C109A-0000-0000-C000-000000000046) ]
194 dispinterface UIPreview
200 [ uuid(000C109B-0000-0000-C000-000000000046) ]
201 dispinterface SummaryInfo
205 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
206 VARIANT Property([in] long Pid);
207 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
211 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
212 long PropertyCount();
216 msiViewModifySeek = -1,
217 msiViewModifyRefresh = 0,
218 msiViewModifyInsert = 1,
219 msiViewModifyUpdate = 2,
220 msiViewModifyAssign = 3,
221 msiViewModifyReplace = 4,
222 msiViewModifyMerge = 5,
223 msiViewModifyDelete = 6,
224 msiViewModifyInsertTemporary = 7,
225 msiViewModifyValidate = 8,
226 msiViewModifyValidateNew = 9,
227 msiViewModifyValidateField = 10,
228 msiViewModifyValidateDelete = 11,
229 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
231 [ uuid(000C109C-0000-0000-C000-000000000046) ]
236 [id(DISPID_VIEW_EXECUTE)]
237 void Execute([in, optional, defaultvalue(0)] Record *Params);
238 [id(DISPID_VIEW_FETCH)]
240 [id(DISPID_VIEW_MODIFY)]
242 [in] _MsiViewModify Mode,
244 [id(DISPID_VIEW_CLOSE)]
248 [ uuid(000C109D-0000-0000-C000-000000000046) ]
249 dispinterface Database
253 [id(DISPID_DATABASE_OPENVIEW)]
254 View* OpenView([in] BSTR Sql);
255 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
256 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
260 msiDoActionStatusNoAction = 0,
261 msiDoActionStatusSuccess = 1,
262 msiDoActionStatusUserExit = 2,
263 msiDoActionStatusFailure = 3,
264 msiDoActionStatusSuspend = 4,
265 msiDoActionStatusFinished = 5,
266 msiDoActionStatusWrongState = 6,
267 msiDoActionStatusBadActionData = 7
272 msiRunModeAdvertise = 1,
273 msiRunModeMaintenance = 2,
274 msiRunModeRollbackEnabled = 3,
275 msiRunModeLogEnabled = 4,
276 msiRunModeOperations = 5,
277 msiRunModeRebootAtEnd = 6,
278 msiRunModeRebootNow = 7,
279 msiRunModeCabinet = 8,
280 msiRunModeSourceShortNames = 9,
281 msiRunModeTargetShortNames = 10,
282 msiRunModeWindows9x = 12,
283 msiRunModeZawEnabled = 13,
284 msiRunModeScheduled = 16,
285 msiRunModeRollback = 17,
286 msiRunModeCommit = 18
290 msiEvaluateConditionFalse = 0,
291 msiEvaluateConditionTrue = 1,
292 msiEvaluateConditionNone = 2,
293 msiEvaluateConditionError = 3
294 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
296 [ uuid(000C109E-0000-0000-C000-000000000046) ]
297 dispinterface Session
301 [id(DISPID_SESSION_INSTALLER), propget]
302 Installer *Installer();
303 [id(DISPID_SESSION_PROPERTY), propget]
304 BSTR Property([in] BSTR Name);
305 [id(DISPID_SESSION_PROPERTY), propput]
309 [id(DISPID_SESSION_LANGUAGE), propget]
311 [id(DISPID_SESSION_MODE), propget]
312 VARIANT_BOOL Mode([in] MsiRunMode Flag);
313 [id(DISPID_SESSION_MODE), propput]
315 [in] MsiRunMode Flag,
316 [in] VARIANT_BOOL rhs);
317 [id(DISPID_SESSION_DATABASE), propget]
318 Database* Database();
319 [id(DISPID_SESSION_DOACTION)]
320 MsiDoActionStatus DoAction([in] BSTR Action);
321 [id(DISPID_SESSION_EVALUATECONDITION)]
322 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
323 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
324 MsiInstallState FeatureCurrentState([in] BSTR Feature);
325 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
326 MsiInstallState FeatureRequestState([in] BSTR Feature);
327 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
328 void FeatureRequestState(
330 [in] MsiInstallState rhs);
331 [id(DISPID_SESSION_SETINSTALLLEVEL)]
332 void SetInstallLevel([in] long Level);
335 [ uuid(000C109F-0000-0000-C000-000000000046) ]
336 dispinterface FeatureInfo
342 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
343 dispinterface Product
349 [ uuid(000C10A1-0000-0000-C000-000000000046) ]