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
);
60 uuid(56D58B64
-8780-4c22
-A8BC
-8B0B29E4A9F8
),
64 interface IWineMsiRemoteCustomAction
: IUnknown
66 HRESULT GetActionInfo
( [in] LPCGUID guid
, [out] MSIHANDLE
*handle, [out] BSTR *dllname,
67 [out] BSTR *function
, [out] IWineMsiRemotePackage
**package
);
70 [ uuid(000C1092
-0000-0000-C000
-000000000046), version(1.0) ]
71 library WindowsInstaller
73 dispinterface Installer
;
75 dispinterface Session
;
76 dispinterface Database
;
77 dispinterface SummaryInfo
;
79 dispinterface UIPreview
;
80 dispinterface FeatureInfo
;
81 dispinterface RecordList
;
82 dispinterface StringList
;
83 dispinterface Product
;
87 msiInstallStateNotUsed
= -7,
88 msiInstallStateBadConfig
= -6,
89 msiInstallStateIncomplete
= -5,
90 msiInstallStateSourceAbsent
= -4,
91 msiInstallStateInvalidArg
= -2,
92 msiInstallStateUnknown
= -1,
93 msiInstallStateBroken
= 0,
94 msiInstallStateAdvertised
= 1,
95 msiInstallStateRemoved
= 1,
96 msiInstallStateAbsent
= 2,
97 msiInstallStateLocal
= 3,
98 msiInstallStateSource
= 4,
99 msiInstallStateDefault
= 5
103 msiOpenDatabaseModeReadOnly
= 0,
104 msiOpenDatabaseModeTransact
= 1,
105 msiOpenDatabaseModeDirect
= 2,
106 msiOpenDatabaseModeCreate
= 3,
107 msiOpenDatabaseModeCreateDirect
= 4,
108 msiOpenDatabaseModePatchFile
= 32
109 } MsiOpenDatabaseMode
;
111 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
112 dispinterface Installer
116 [id(DISPID_INSTALLER_CREATERECORD
)]
117 Record
*CreateRecord
([in] long Count
);
118 [id(DISPID_INSTALLER_OPENPACKAGE
)]
119 Session
* OpenPackage
(
120 [in] VARIANT PackagePath
,
121 [in, optional, defaultvalue(0)] long Options
);
122 [id(DISPID_INSTALLER_OPENDATABASE
)]
123 Database
*OpenDatabase
(
124 [in] BSTR DatabasePath
,
125 [in] VARIANT OpenMode
);
126 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
128 [in] BSTR PackagePath
,
129 [in, optional, defaultvalue("0")] BSTR PropertyValues
);
130 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
134 [in, optional] VARIANT Value
);
135 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
136 MsiInstallState ProductState
(
138 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
141 [in] BSTR Attribute
);
142 [id(DISPID_INSTALLER_PRODUCTS
), propget]
143 StringList
*Products
();
144 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
145 StringList
*RelatedProducts
(
146 [in] BSTR UpgradeCode
);
149 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
154 [id(DISPID_RECORD_STRINGDATA
), propget]
155 BSTR StringData
([in] long Field
);
156 [id(DISPID_RECORD_STRINGDATA
), propput]
160 [id(DISPID_RECORD_INTEGERDATA
), propget]
161 long IntegerData
([in] long Field
);
162 [id(DISPID_RECORD_INTEGERDATA
), propput]
166 [id(DISPID_RECORD_FIELDCOUNT
), propget]
170 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
171 dispinterface StringList
175 [id(DISPID_LIST__NEWENUM
)]
177 [id(DISPID_LIST_ITEM
), propget]
178 BSTR Item
(long Index
);
179 [id(DISPID_LIST_COUNT
), propget]
183 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
184 dispinterface RecordList
190 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
191 dispinterface UIPreview
197 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
198 dispinterface SummaryInfo
202 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
203 VARIANT Property
([in] long Pid
);
204 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
208 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
209 long PropertyCount
();
213 msiViewModifySeek
= -1,
214 msiViewModifyRefresh
= 0,
215 msiViewModifyInsert
= 1,
216 msiViewModifyUpdate
= 2,
217 msiViewModifyAssign
= 3,
218 msiViewModifyReplace
= 4,
219 msiViewModifyMerge
= 5,
220 msiViewModifyDelete
= 6,
221 msiViewModifyInsertTemporary
= 7,
222 msiViewModifyValidate
= 8,
223 msiViewModifyValidateNew
= 9,
224 msiViewModifyValidateField
= 10,
225 msiViewModifyValidateDelete
= 11,
226 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
228 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
233 [id(DISPID_VIEW_EXECUTE
)]
234 void Execute
([in, optional, defaultvalue(0)] Record
*Params
);
235 [id(DISPID_VIEW_FETCH
)]
237 [id(DISPID_VIEW_MODIFY
)]
239 [in] _MsiViewModify Mode
,
241 [id(DISPID_VIEW_CLOSE
)]
245 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
246 dispinterface Database
250 [id(DISPID_DATABASE_OPENVIEW
)]
251 View
* OpenView
([in] BSTR Sql
);
252 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
253 SummaryInfo
*SummaryInformation
([in, optional, defaultvalue(0)] long UpdateCount
);
257 msiDoActionStatusNoAction
= 0,
258 msiDoActionStatusSuccess
= 1,
259 msiDoActionStatusUserExit
= 2,
260 msiDoActionStatusFailure
= 3,
261 msiDoActionStatusSuspend
= 4,
262 msiDoActionStatusFinished
= 5,
263 msiDoActionStatusWrongState
= 6,
264 msiDoActionStatusBadActionData
= 7
269 msiRunModeAdvertise
= 1,
270 msiRunModeMaintenance
= 2,
271 msiRunModeRollbackEnabled
= 3,
272 msiRunModeLogEnabled
= 4,
273 msiRunModeOperations
= 5,
274 msiRunModeRebootAtEnd
= 6,
275 msiRunModeRebootNow
= 7,
276 msiRunModeCabinet
= 8,
277 msiRunModeSourceShortNames
= 9,
278 msiRunModeTargetShortNames
= 10,
279 msiRunModeWindows9x
= 12,
280 msiRunModeZawEnabled
= 13,
281 msiRunModeScheduled
= 16,
282 msiRunModeRollback
= 17,
283 msiRunModeCommit
= 18
287 msiEvaluateConditionFalse
= 0,
288 msiEvaluateConditionTrue
= 1,
289 msiEvaluateConditionNone
= 2,
290 msiEvaluateConditionError
= 3
291 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
293 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
294 dispinterface Session
298 [id(DISPID_SESSION_INSTALLER
), propget]
299 Installer
*Installer
();
300 [id(DISPID_SESSION_PROPERTY
), propget]
301 BSTR Property
([in] BSTR Name
);
302 [id(DISPID_SESSION_PROPERTY
), propput]
306 [id(DISPID_SESSION_LANGUAGE
), propget]
308 [id(DISPID_SESSION_MODE
), propget]
309 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
310 [id(DISPID_SESSION_MODE
), propput]
312 [in] MsiRunMode Flag
,
313 [in] VARIANT_BOOL rhs
);
314 [id(DISPID_SESSION_DATABASE
), propget]
315 Database
* Database
();
316 [id(DISPID_SESSION_DOACTION
)]
317 MsiDoActionStatus DoAction
([in] BSTR Action
);
318 [id(DISPID_SESSION_EVALUATECONDITION
)]
319 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
320 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
321 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
322 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
323 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
324 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
325 void FeatureRequestState
(
327 [in] MsiInstallState rhs
);
328 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
329 void SetInstallLevel
([in] long Level
);
332 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
333 dispinterface FeatureInfo
339 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
340 dispinterface Product
346 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]