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
);
77 uuid(56D58B64
-8780-4c22
-A8BC
-8B0B29E4A9F8
),
81 interface IWineMsiRemoteCustomAction
: IUnknown
83 HRESULT GetActionInfo
( [in] LPCGUID guid
, [out] INT *type
, [out] MSIHANDLE
*handle, [out] BSTR *dllname,
84 [out] BSTR *function
, [out] IWineMsiRemotePackage
**package
);
87 [ uuid(000C1092
-0000-0000-C000
-000000000046), version(1.0) ]
88 library WindowsInstaller
90 dispinterface Installer
;
92 dispinterface Session
;
93 dispinterface Database
;
94 dispinterface SummaryInfo
;
96 dispinterface UIPreview
;
97 dispinterface FeatureInfo
;
98 dispinterface RecordList
;
99 dispinterface StringList
;
100 dispinterface Product
;
104 msiInstallStateNotUsed
= -7,
105 msiInstallStateBadConfig
= -6,
106 msiInstallStateIncomplete
= -5,
107 msiInstallStateSourceAbsent
= -4,
108 msiInstallStateInvalidArg
= -2,
109 msiInstallStateUnknown
= -1,
110 msiInstallStateBroken
= 0,
111 msiInstallStateAdvertised
= 1,
112 msiInstallStateRemoved
= 1,
113 msiInstallStateAbsent
= 2,
114 msiInstallStateLocal
= 3,
115 msiInstallStateSource
= 4,
116 msiInstallStateDefault
= 5
120 msiOpenDatabaseModeReadOnly
= 0,
121 msiOpenDatabaseModeTransact
= 1,
122 msiOpenDatabaseModeDirect
= 2,
123 msiOpenDatabaseModeCreate
= 3,
124 msiOpenDatabaseModeCreateDirect
= 4,
125 msiOpenDatabaseModePatchFile
= 32
126 } MsiOpenDatabaseMode
;
129 msiUILevelNoChange
= 0,
130 msiUILevelDefault
= 1,
133 msiUILevelReduced
= 4,
135 msiUILevelHideCancel
= 32,
136 msiUILevelProgressOnly
= 64,
137 msiUILevelEndDialog
= 128,
138 msiUILevelSourceResOnly
= 256
141 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
142 dispinterface Installer
145 [id(DISPID_INSTALLER_UILEVEL
)]
148 [id(DISPID_INSTALLER_CREATERECORD
)]
149 Record
*CreateRecord
([in] long Count
);
150 [id(DISPID_INSTALLER_OPENPACKAGE
)]
151 Session
* OpenPackage
(
152 [in] VARIANT PackagePath
,
153 [in, optional, defaultvalue(0)] long Options
);
154 [id(DISPID_INSTALLER_OPENDATABASE
)]
155 Database
*OpenDatabase
(
156 [in] BSTR DatabasePath
,
157 [in] VARIANT OpenMode
);
158 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
160 [in] BSTR PackagePath
,
161 [in, optional, defaultvalue("0")] BSTR PropertyValues
);
162 [id(DISPID_INSTALLER_VERSION
)]
164 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
168 [in, optional] VARIANT Value
);
169 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
170 MsiInstallState ProductState
(
172 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
175 [in] BSTR Attribute
);
176 [id(DISPID_INSTALLER_PRODUCTS
), propget]
177 StringList
*Products
();
178 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
179 StringList
*RelatedProducts
(
180 [in] BSTR UpgradeCode
);
183 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
188 [id(DISPID_RECORD_STRINGDATA
), propget]
189 BSTR StringData
([in] long Field
);
190 [id(DISPID_RECORD_STRINGDATA
), propput]
194 [id(DISPID_RECORD_INTEGERDATA
), propget]
195 long IntegerData
([in] long Field
);
196 [id(DISPID_RECORD_INTEGERDATA
), propput]
200 [id(DISPID_RECORD_FIELDCOUNT
), propget]
204 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
205 dispinterface StringList
209 [id(DISPID_LIST__NEWENUM
)]
211 [id(DISPID_LIST_ITEM
), propget]
212 BSTR Item
(long Index
);
213 [id(DISPID_LIST_COUNT
), propget]
217 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
218 dispinterface RecordList
224 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
225 dispinterface UIPreview
231 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
232 dispinterface SummaryInfo
236 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
237 VARIANT Property
([in] long Pid
);
238 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
242 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
243 long PropertyCount
();
247 msiViewModifySeek
= -1,
248 msiViewModifyRefresh
= 0,
249 msiViewModifyInsert
= 1,
250 msiViewModifyUpdate
= 2,
251 msiViewModifyAssign
= 3,
252 msiViewModifyReplace
= 4,
253 msiViewModifyMerge
= 5,
254 msiViewModifyDelete
= 6,
255 msiViewModifyInsertTemporary
= 7,
256 msiViewModifyValidate
= 8,
257 msiViewModifyValidateNew
= 9,
258 msiViewModifyValidateField
= 10,
259 msiViewModifyValidateDelete
= 11,
260 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
262 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
267 [id(DISPID_VIEW_EXECUTE
)]
268 void Execute
([in, optional, defaultvalue(0)] Record
*Params
);
269 [id(DISPID_VIEW_FETCH
)]
271 [id(DISPID_VIEW_MODIFY
)]
273 [in] _MsiViewModify Mode
,
275 [id(DISPID_VIEW_CLOSE
)]
279 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
280 dispinterface Database
284 [id(DISPID_DATABASE_OPENVIEW
)]
285 View
* OpenView
([in] BSTR Sql
);
286 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
287 SummaryInfo
*SummaryInformation
([in, optional, defaultvalue(0)] long UpdateCount
);
291 msiDoActionStatusNoAction
= 0,
292 msiDoActionStatusSuccess
= 1,
293 msiDoActionStatusUserExit
= 2,
294 msiDoActionStatusFailure
= 3,
295 msiDoActionStatusSuspend
= 4,
296 msiDoActionStatusFinished
= 5,
297 msiDoActionStatusWrongState
= 6,
298 msiDoActionStatusBadActionData
= 7
303 msiRunModeAdvertise
= 1,
304 msiRunModeMaintenance
= 2,
305 msiRunModeRollbackEnabled
= 3,
306 msiRunModeLogEnabled
= 4,
307 msiRunModeOperations
= 5,
308 msiRunModeRebootAtEnd
= 6,
309 msiRunModeRebootNow
= 7,
310 msiRunModeCabinet
= 8,
311 msiRunModeSourceShortNames
= 9,
312 msiRunModeTargetShortNames
= 10,
313 msiRunModeWindows9x
= 12,
314 msiRunModeZawEnabled
= 13,
315 msiRunModeScheduled
= 16,
316 msiRunModeRollback
= 17,
317 msiRunModeCommit
= 18
321 msiEvaluateConditionFalse
= 0,
322 msiEvaluateConditionTrue
= 1,
323 msiEvaluateConditionNone
= 2,
324 msiEvaluateConditionError
= 3
325 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
328 msiMessageStatusError
= -1,
329 msiMessageStatusNone
= 0,
330 msiMessageStatusOk
= 1,
331 msiMessageStatusCancel
= 2,
332 msiMessageStatusAbort
= 3,
333 msiMessageStatusRetry
= 4,
334 msiMessageStatusIgnore
= 5,
335 msiMessageStatusYes
= 6,
336 msiMessageStatusNo
= 7
340 msiMessageTypeFatalExit
= 0,
341 msiMessageTypeError
= 0x01000000,
342 msiMessageTypeWarning
= 0x02000000,
343 msiMessageTypeUser
= 0x03000000,
344 msiMessageTypeInfo
= 0x04000000,
345 msiMessageTypeFilesInUse
= 0x05000000,
346 msiMessageTypeResolveSource
= 0x06000000,
347 msiMessageTypeOutOfDiskSpace
= 0x07000000,
348 msiMessageTypeActionStart
= 0x08000000,
349 msiMessageTypeActionData
= 0x09000000,
350 msiMessageTypeProgress
= 0x0a000000,
351 msiMessageTypeCommonData
= 0x0b000000,
352 msiMessageTypeOk
= 0,
353 msiMessageTypeOkCancel
= 1,
354 msiMessageTypeAbortRetryIgnore
= 2,
355 msiMessageTypeYesNoCancel
= 3,
356 msiMessageTypeYesNo
= 4,
357 msiMessageTypeRetryCancel
= 5,
358 msiMessageTypeDefault1
= 0,
359 msiMessageTypeDefault2
= 256,
360 msiMessageTypeDefault3
= 512
363 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
364 dispinterface Session
368 [id(DISPID_SESSION_INSTALLER
), propget]
369 Installer
*Installer
();
370 [id(DISPID_SESSION_PROPERTY
), propget]
371 BSTR Property
([in] BSTR Name
);
372 [id(DISPID_SESSION_PROPERTY
), propput]
376 [id(DISPID_SESSION_LANGUAGE
), propget]
378 [id(DISPID_SESSION_MODE
), propget]
379 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
380 [id(DISPID_SESSION_MODE
), propput]
382 [in] MsiRunMode Flag
,
383 [in] VARIANT_BOOL rhs
);
384 [id(DISPID_SESSION_DATABASE
), propget]
385 Database
* Database
();
386 [id(DISPID_SESSION_DOACTION
)]
387 MsiDoActionStatus DoAction
([in] BSTR Action
);
388 [id(DISPID_SESSION_EVALUATECONDITION
)]
389 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
390 [id(DISPID_SESSION_MESSAGE
)]
391 MsiMessageStatus
Message(
392 [in] MsiMessageType Kind
,
393 [in] Record
*Record
);
394 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
395 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
396 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
397 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
398 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
399 void FeatureRequestState
(
401 [in] MsiInstallState rhs
);
402 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
403 void SetInstallLevel
([in] long Level
);
406 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
407 dispinterface FeatureInfo
413 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
414 dispinterface Product
420 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]