Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / msi / msiserver.idl
blob8e4936868d67d4dd29800ff8d0bc32048d6e049a
1 /*
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"
21 import "unknwn.idl";
22 import "wtypes.idl";
23 import "objidl.idl";
24 import "oaidl.idl";
26 cpp_quote("#if 0")
27 typedef unsigned long MSIHANDLE;
28 typedef int INSTALLMESSAGE;
29 typedef int MSICONDITION;
30 typedef int MSIRUNMODE;
31 typedef int INSTALLSTATE;
32 cpp_quote("#endif")
35 uuid(7BDE2046-D03B-4ffc-B84C-A098F38CFF0B),
36 oleautomation,
37 object
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),
50 oleautomation,
51 object
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),
79 oleautomation,
80 object
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;
92 dispinterface Record;
93 dispinterface Session;
94 dispinterface Database;
95 dispinterface SummaryInfo;
96 dispinterface View;
97 dispinterface UIPreview;
98 dispinterface FeatureInfo;
99 dispinterface RecordList;
100 dispinterface StringList;
101 dispinterface Product;
102 dispinterface Patch;
104 typedef enum {
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
118 } MsiInstallState;
120 typedef enum {
121 msiOpenDatabaseModeReadOnly = 0,
122 msiOpenDatabaseModeTransact = 1,
123 msiOpenDatabaseModeDirect = 2,
124 msiOpenDatabaseModeCreate = 3,
125 msiOpenDatabaseModeCreateDirect = 4,
126 msiOpenDatabaseModePatchFile = 32
127 } MsiOpenDatabaseMode;
129 typedef enum {
130 msiUILevelNoChange = 0,
131 msiUILevelDefault = 1,
132 msiUILevelNone = 2,
133 msiUILevelBasic = 3,
134 msiUILevelReduced = 4,
135 msiUILevelFull = 5,
136 msiUILevelHideCancel = 32,
137 msiUILevelProgressOnly = 64,
138 msiUILevelEndDialog = 128,
139 msiUILevelSourceResOnly = 256
140 } MsiUILevel;
142 [ uuid(000C1090-0000-0000-C000-000000000046) ]
143 dispinterface Installer
145 properties:
146 [id(DISPID_INSTALLER_UILEVEL)]
147 MsiUILevel UILevel;
148 methods:
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_OPENPRODUCT)]
156 Session* OpenProduct(
157 [in] BSTR ProductCode);
158 [id(DISPID_INSTALLER_SUMMARYINFORMATION)]
159 SummaryInfo* SummaryInformation(
160 [in] BSTR PackagePath,
161 [in, optional, defaultvalue(0)] long UpdateCount);
162 [id(DISPID_INSTALLER_OPENDATABASE)]
163 Database *OpenDatabase(
164 [in] BSTR DatabasePath,
165 [in] VARIANT OpenMode);
166 [id(DISPID_INSTALLER_ENABLELOG)]
167 void EnableLog(
168 [in] BSTR LogMode,
169 [in] BSTR LogFile);
170 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
171 void InstallProduct(
172 [in] BSTR PackagePath,
173 [in, optional, defaultvalue("0")] BSTR PropertyValues);
174 [id(DISPID_INSTALLER_VERSION)]
175 BSTR Version();
176 [id(DISPID_INSTALLER_LASTERRORRECORD)]
177 Record* LastErrorRecord();
178 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
179 BSTR RegistryValue(
180 [in] VARIANT Root,
181 [in] BSTR Key,
182 [in, optional] VARIANT Value);
183 [id(DISPID_INSTALLER_ENVIRONMENT), propget]
184 BSTR Environment([in] BSTR Variable);
185 [id(DISPID_INSTALLER_ENVIRONMENT), propput]
186 void Environment(
187 [in] BSTR Variable,
188 [in] BSTR rhs);
189 [id(DISPID_INSTALLER_FILEATTRIBUTES)]
190 long FileAttributes([in] BSTR FilePath);
191 [id(DISPID_INSTALLER_FILESIZE)]
192 long FileSize([in] BSTR FilePath);
193 [id(DISPID_INSTALLER_FILEVERSION)]
194 BSTR FileVersion(
195 [in] BSTR FilePath,
196 [in, optional] VARIANT Language);
197 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
198 MsiInstallState ProductState(
199 [in] BSTR Product);
200 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
201 BSTR ProductInfo(
202 [in] BSTR Product,
203 [in] BSTR Attribute);
204 [id(DISPID_INSTALLER_PRODUCTS), propget]
205 StringList *Products();
206 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
207 StringList *RelatedProducts(
208 [in] BSTR UpgradeCode);
211 [ uuid(000C1093-0000-0000-C000-000000000046) ]
212 dispinterface Record
214 properties:
215 methods:
216 [id(DISPID_RECORD_STRINGDATA), propget]
217 BSTR StringData([in] long Field);
218 [id(DISPID_RECORD_STRINGDATA), propput]
219 void StringData(
220 [in] long Field,
221 [in] BSTR rhs);
222 [id(DISPID_RECORD_INTEGERDATA), propget]
223 long IntegerData([in] long Field);
224 [id(DISPID_RECORD_INTEGERDATA), propput]
225 void IntegerData(
226 [in] long Field,
227 [in] long rhs);
228 [id(DISPID_RECORD_FIELDCOUNT), propget]
229 long FieldCount();
232 [ uuid(000C1095-0000-0000-C000-000000000046) ]
233 dispinterface StringList
235 properties:
236 methods:
237 [id(DISPID_LIST__NEWENUM)]
238 IUnknown _NewEnum();
239 [id(DISPID_LIST_ITEM), propget]
240 BSTR Item(long Index);
241 [id(DISPID_LIST_COUNT), propget]
242 long Count();
245 [ uuid(000C1096-0000-0000-C000-000000000046) ]
246 dispinterface RecordList
248 properties:
249 methods:
252 [ uuid(000C109A-0000-0000-C000-000000000046) ]
253 dispinterface UIPreview
255 properties:
256 methods:
259 [ uuid(000C109B-0000-0000-C000-000000000046) ]
260 dispinterface SummaryInfo
262 properties:
263 methods:
264 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
265 VARIANT Property([in] long Pid);
266 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
267 void Property(
268 [in] long Pid,
269 [in] VARIANT rhs);
270 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
271 long PropertyCount();
274 typedef enum {
275 msiViewModifySeek = -1,
276 msiViewModifyRefresh = 0,
277 msiViewModifyInsert = 1,
278 msiViewModifyUpdate = 2,
279 msiViewModifyAssign = 3,
280 msiViewModifyReplace = 4,
281 msiViewModifyMerge = 5,
282 msiViewModifyDelete = 6,
283 msiViewModifyInsertTemporary = 7,
284 msiViewModifyValidate = 8,
285 msiViewModifyValidateNew = 9,
286 msiViewModifyValidateField = 10,
287 msiViewModifyValidateDelete = 11,
288 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
290 [ uuid(000C109C-0000-0000-C000-000000000046) ]
291 dispinterface View
293 properties:
294 methods:
295 [id(DISPID_VIEW_EXECUTE)]
296 void Execute([in, optional, defaultvalue(0)] Record *Params);
297 [id(DISPID_VIEW_FETCH)]
298 Record* Fetch();
299 [id(DISPID_VIEW_MODIFY)]
300 void Modify(
301 [in] _MsiViewModify Mode,
302 Record *Record);
303 [id(DISPID_VIEW_CLOSE)]
304 void Close();
307 [ uuid(000C109D-0000-0000-C000-000000000046) ]
308 dispinterface Database
310 properties:
311 methods:
312 [id(DISPID_DATABASE_OPENVIEW)]
313 View* OpenView([in] BSTR Sql);
314 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
315 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
318 typedef enum {
319 msiDoActionStatusNoAction = 0,
320 msiDoActionStatusSuccess = 1,
321 msiDoActionStatusUserExit = 2,
322 msiDoActionStatusFailure = 3,
323 msiDoActionStatusSuspend = 4,
324 msiDoActionStatusFinished = 5,
325 msiDoActionStatusWrongState = 6,
326 msiDoActionStatusBadActionData = 7
327 } MsiDoActionStatus;
329 typedef enum {
330 msiRunModeAdmin = 0,
331 msiRunModeAdvertise = 1,
332 msiRunModeMaintenance = 2,
333 msiRunModeRollbackEnabled = 3,
334 msiRunModeLogEnabled = 4,
335 msiRunModeOperations = 5,
336 msiRunModeRebootAtEnd = 6,
337 msiRunModeRebootNow = 7,
338 msiRunModeCabinet = 8,
339 msiRunModeSourceShortNames = 9,
340 msiRunModeTargetShortNames = 10,
341 msiRunModeWindows9x = 12,
342 msiRunModeZawEnabled = 13,
343 msiRunModeScheduled = 16,
344 msiRunModeRollback = 17,
345 msiRunModeCommit = 18
346 } MsiRunMode;
348 typedef enum {
349 msiEvaluateConditionFalse = 0,
350 msiEvaluateConditionTrue = 1,
351 msiEvaluateConditionNone = 2,
352 msiEvaluateConditionError = 3
353 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
355 typedef enum {
356 msiMessageStatusError = -1,
357 msiMessageStatusNone = 0,
358 msiMessageStatusOk = 1,
359 msiMessageStatusCancel = 2,
360 msiMessageStatusAbort = 3,
361 msiMessageStatusRetry = 4,
362 msiMessageStatusIgnore = 5,
363 msiMessageStatusYes = 6,
364 msiMessageStatusNo = 7
365 } MsiMessageStatus;
367 typedef enum {
368 msiMessageTypeFatalExit = 0,
369 msiMessageTypeError = 0x01000000,
370 msiMessageTypeWarning = 0x02000000,
371 msiMessageTypeUser = 0x03000000,
372 msiMessageTypeInfo = 0x04000000,
373 msiMessageTypeFilesInUse = 0x05000000,
374 msiMessageTypeResolveSource = 0x06000000,
375 msiMessageTypeOutOfDiskSpace = 0x07000000,
376 msiMessageTypeActionStart = 0x08000000,
377 msiMessageTypeActionData = 0x09000000,
378 msiMessageTypeProgress = 0x0a000000,
379 msiMessageTypeCommonData = 0x0b000000,
380 msiMessageTypeOk = 0,
381 msiMessageTypeOkCancel = 1,
382 msiMessageTypeAbortRetryIgnore = 2,
383 msiMessageTypeYesNoCancel = 3,
384 msiMessageTypeYesNo = 4,
385 msiMessageTypeRetryCancel = 5,
386 msiMessageTypeDefault1 = 0,
387 msiMessageTypeDefault2 = 256,
388 msiMessageTypeDefault3 = 512
389 } MsiMessageType;
391 [ uuid(000C109E-0000-0000-C000-000000000046) ]
392 dispinterface Session
394 properties:
395 methods:
396 [id(DISPID_SESSION_INSTALLER), propget]
397 Installer *Installer();
398 [id(DISPID_SESSION_PROPERTY), propget]
399 BSTR Property([in] BSTR Name);
400 [id(DISPID_SESSION_PROPERTY), propput]
401 void Property(
402 [in] BSTR Name,
403 [in] BSTR rhs);
404 [id(DISPID_SESSION_LANGUAGE), propget]
405 long Language();
406 [id(DISPID_SESSION_MODE), propget]
407 VARIANT_BOOL Mode([in] MsiRunMode Flag);
408 [id(DISPID_SESSION_MODE), propput]
409 void Mode(
410 [in] MsiRunMode Flag,
411 [in] VARIANT_BOOL rhs);
412 [id(DISPID_SESSION_DATABASE), propget]
413 Database* Database();
414 [id(DISPID_SESSION_DOACTION)]
415 MsiDoActionStatus DoAction([in] BSTR Action);
416 [id(DISPID_SESSION_EVALUATECONDITION)]
417 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
418 [id(DISPID_SESSION_MESSAGE)]
419 MsiMessageStatus Message(
420 [in] MsiMessageType Kind,
421 [in] Record *Record);
422 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
423 MsiInstallState FeatureCurrentState([in] BSTR Feature);
424 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
425 MsiInstallState FeatureRequestState([in] BSTR Feature);
426 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
427 void FeatureRequestState(
428 [in] BSTR Feature,
429 [in] MsiInstallState rhs);
430 [id(DISPID_SESSION_SETINSTALLLEVEL)]
431 void SetInstallLevel([in] long Level);
434 [ uuid(000C109F-0000-0000-C000-000000000046) ]
435 dispinterface FeatureInfo
437 properties:
438 methods:
441 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
442 dispinterface Product
444 properties:
445 methods:
448 [ uuid(000C10A1-0000-0000-C000-000000000046) ]
449 dispinterface Patch
451 properties:
452 methods: