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
;
36 uuid(7BDE2046
-D03B
-4ffc
-B84C
-A098F38CFF0B
),
40 interface IWineMsiRemoteDatabase
: IUnknown
42 HRESULT IsTablePersistent
( [in] BSTR table
, [out] MSICONDITION
*persistent
);
43 HRESULT GetPrimaryKeys
( [in] BSTR table
, [out] MSIHANDLE
*keys
);
44 HRESULT GetSummaryInformation
( [in] UINT updatecount
, [out] MSIHANDLE
*suminfo
);
45 HRESULT OpenView
( [in] BSTR query
, [out] MSIHANDLE
*view
);
46 HRESULT SetMsiHandle
( [in] MSIHANDLE
handle );
50 uuid(902B3592
-9D08
-4dfd
-A593
-D07C52546421
),
54 interface IWineMsiRemotePackage
: IUnknown
56 HRESULT SetMsiHandle
( [in] MSIHANDLE
handle );
57 HRESULT GetActiveDatabase
( [out] MSIHANDLE
*handle );
58 HRESULT GetProperty
( [in] BSTR property
, [out] BSTR *value
, [out] DWORD
*size
);
59 HRESULT SetProperty
( [in] BSTR property
, [in] BSTR value
);
60 HRESULT ProcessMessage
( [in] INSTALLMESSAGE
message, [in] MSIHANDLE record
);
61 HRESULT DoAction
( [in] BSTR action
);
62 HRESULT Sequence
( [in] BSTR table
, [in] int sequence
);
63 HRESULT GetTargetPath
( [in] BSTR folder
, [out] BSTR *value
, [out] DWORD
*size
);
64 HRESULT SetTargetPath
( [in] BSTR folder
, [in] BSTR value
);
65 HRESULT GetSourcePath
( [in] BSTR folder
, [out] BSTR *value
, [out] DWORD
*size
);
66 HRESULT GetMode
( [in] MSIRUNMODE mode
, [out] BOOL
*ret
);
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
, [out] DWORD
*size
);
74 HRESULT EvaluateCondition
( [in] BSTR condition
);
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
;
129 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
130 dispinterface Installer
134 [id(DISPID_INSTALLER_CREATERECORD
)]
135 Record
*CreateRecord
([in] long Count
);
136 [id(DISPID_INSTALLER_OPENPACKAGE
)]
137 Session
* OpenPackage
(
138 [in] VARIANT PackagePath
,
139 [in, optional, defaultvalue(0)] long Options
);
140 [id(DISPID_INSTALLER_OPENDATABASE
)]
141 Database
*OpenDatabase
(
142 [in] BSTR DatabasePath
,
143 [in] VARIANT OpenMode
);
144 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
146 [in] BSTR PackagePath
,
147 [in, optional, defaultvalue("0")] BSTR PropertyValues
);
148 [id(DISPID_INSTALLER_VERSION
)]
150 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
154 [in, optional] VARIANT Value
);
155 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
156 MsiInstallState ProductState
(
158 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
161 [in] BSTR Attribute
);
162 [id(DISPID_INSTALLER_PRODUCTS
), propget]
163 StringList
*Products
();
164 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
165 StringList
*RelatedProducts
(
166 [in] BSTR UpgradeCode
);
169 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
174 [id(DISPID_RECORD_STRINGDATA
), propget]
175 BSTR StringData
([in] long Field
);
176 [id(DISPID_RECORD_STRINGDATA
), propput]
180 [id(DISPID_RECORD_INTEGERDATA
), propget]
181 long IntegerData
([in] long Field
);
182 [id(DISPID_RECORD_INTEGERDATA
), propput]
186 [id(DISPID_RECORD_FIELDCOUNT
), propget]
190 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
191 dispinterface StringList
195 [id(DISPID_LIST__NEWENUM
)]
197 [id(DISPID_LIST_ITEM
), propget]
198 BSTR Item
(long Index
);
199 [id(DISPID_LIST_COUNT
), propget]
203 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
204 dispinterface RecordList
210 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
211 dispinterface UIPreview
217 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
218 dispinterface SummaryInfo
222 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
223 VARIANT Property
([in] long Pid
);
224 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
228 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
229 long PropertyCount
();
233 msiViewModifySeek
= -1,
234 msiViewModifyRefresh
= 0,
235 msiViewModifyInsert
= 1,
236 msiViewModifyUpdate
= 2,
237 msiViewModifyAssign
= 3,
238 msiViewModifyReplace
= 4,
239 msiViewModifyMerge
= 5,
240 msiViewModifyDelete
= 6,
241 msiViewModifyInsertTemporary
= 7,
242 msiViewModifyValidate
= 8,
243 msiViewModifyValidateNew
= 9,
244 msiViewModifyValidateField
= 10,
245 msiViewModifyValidateDelete
= 11,
246 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
248 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
253 [id(DISPID_VIEW_EXECUTE
)]
254 void Execute
([in, optional, defaultvalue(0)] Record
*Params
);
255 [id(DISPID_VIEW_FETCH
)]
257 [id(DISPID_VIEW_MODIFY
)]
259 [in] _MsiViewModify Mode
,
261 [id(DISPID_VIEW_CLOSE
)]
265 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
266 dispinterface Database
270 [id(DISPID_DATABASE_OPENVIEW
)]
271 View
* OpenView
([in] BSTR Sql
);
272 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
273 SummaryInfo
*SummaryInformation
([in, optional, defaultvalue(0)] long UpdateCount
);
277 msiDoActionStatusNoAction
= 0,
278 msiDoActionStatusSuccess
= 1,
279 msiDoActionStatusUserExit
= 2,
280 msiDoActionStatusFailure
= 3,
281 msiDoActionStatusSuspend
= 4,
282 msiDoActionStatusFinished
= 5,
283 msiDoActionStatusWrongState
= 6,
284 msiDoActionStatusBadActionData
= 7
289 msiRunModeAdvertise
= 1,
290 msiRunModeMaintenance
= 2,
291 msiRunModeRollbackEnabled
= 3,
292 msiRunModeLogEnabled
= 4,
293 msiRunModeOperations
= 5,
294 msiRunModeRebootAtEnd
= 6,
295 msiRunModeRebootNow
= 7,
296 msiRunModeCabinet
= 8,
297 msiRunModeSourceShortNames
= 9,
298 msiRunModeTargetShortNames
= 10,
299 msiRunModeWindows9x
= 12,
300 msiRunModeZawEnabled
= 13,
301 msiRunModeScheduled
= 16,
302 msiRunModeRollback
= 17,
303 msiRunModeCommit
= 18
307 msiEvaluateConditionFalse
= 0,
308 msiEvaluateConditionTrue
= 1,
309 msiEvaluateConditionNone
= 2,
310 msiEvaluateConditionError
= 3
311 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
313 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
314 dispinterface Session
318 [id(DISPID_SESSION_INSTALLER
), propget]
319 Installer
*Installer
();
320 [id(DISPID_SESSION_PROPERTY
), propget]
321 BSTR Property
([in] BSTR Name
);
322 [id(DISPID_SESSION_PROPERTY
), propput]
326 [id(DISPID_SESSION_LANGUAGE
), propget]
328 [id(DISPID_SESSION_MODE
), propget]
329 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
330 [id(DISPID_SESSION_MODE
), propput]
332 [in] MsiRunMode Flag
,
333 [in] VARIANT_BOOL rhs
);
334 [id(DISPID_SESSION_DATABASE
), propget]
335 Database
* Database
();
336 [id(DISPID_SESSION_DOACTION
)]
337 MsiDoActionStatus DoAction
([in] BSTR Action
);
338 [id(DISPID_SESSION_EVALUATECONDITION
)]
339 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
340 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
341 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
342 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
343 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
344 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
345 void FeatureRequestState
(
347 [in] MsiInstallState rhs
);
348 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
349 void SetInstallLevel
([in] long Level
);
352 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
353 dispinterface FeatureInfo
359 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
360 dispinterface Product
366 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]