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] LPCWSTR table
, [out] MSICONDITION
*persistent
);
42 HRESULT GetPrimaryKeys
( [in] LPCWSTR table
, [out] MSIHANDLE
*keys
);
43 HRESULT GetSummaryInformation
( [in] UINT updatecount
, [out] MSIHANDLE
*suminfo
);
44 HRESULT OpenView
( [in] LPCWSTR 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 SetMode
( [in] MSIRUNMODE mode
, [in] BOOL state
);
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
);
74 HRESULT EvaluateCondition
( [in] BSTR condition
);
75 HRESULT GetFeatureCost
( [in] BSTR feature
, [in] INT cost_tree
, [in] INSTALLSTATE state
, [out] INT *cost
);
79 uuid(56D58B64
-8780-4c22
-A8BC
-8B0B29E4A9F8
),
83 interface IWineMsiRemoteCustomAction
: IUnknown
85 HRESULT GetActionInfo
( [in] LPCGUID guid
, [out] INT *type
, [out] MSIHANDLE
*handle, [out] BSTR *dllname,
86 [out] BSTR *function
, [out] IWineMsiRemotePackage
**package
);
90 uuid(000c101c
-0000-0000-c000
-000000000046),
94 interface IMsiServer
: IUnknown
100 uuid(000c101d
-0000-0000-c000
-000000000046),
104 interface IMsiMessage
: IUnknown
110 uuid(000c1025
-0000-0000-c000
-000000000046),
114 interface IMsiCustomAction
: IUnknown
120 uuid(000c1033
-0000-0000-c000
-000000000046),
124 interface IMsiRemoteAPI
: IUnknown
130 helpstring("Msi install server"),
131 progid
("IMsiServer"),
132 uuid(000c101c
-0000-0000-c000
-000000000046)
134 coclass MsiServer
{ interface IMsiServer
; }
137 helpstring("Microsoft Windows Installer Message RPC"),
138 progid
("WindowsInstaller.Message"),
139 uuid(000c101d
-0000-0000-c000
-000000000046)
141 coclass MsiServerMessage
{ interface IMsiMessage
; }
145 uuid(000c103e
-0000
-0000-c000
-000000000046)
147 coclass PSFactoryBuffer
{ interface IPSFactoryBuffer
; }
150 uuid(000c1082
-0000-0000-c000
-000000000046)
152 coclass MsiTransform
{ }
155 uuid(000c1084
-0000-0000-c000
-000000000046)
157 coclass MsiDatabase
{ }
160 uuid(000c1086
-0000-0000-c000
-000000000046)
165 threading
(apartment
),
166 uuid(000c1094
-0000-0000-c000
-000000000046)
168 /* FIXME: unidentified class */
169 coclass MsiServerX3
{ interface IMsiServer
; }
172 uuid(ba26e6fa
-4f27
-4f56
-953a
-3f90272018aa
)
174 coclass WineMsiRemoteCustomAction
{ interface WineMsiRemoteCustomAction
; }
177 uuid(902b3592
-9d08
-4dfd
-a593
-d07c52546421
)
179 coclass WineMsiRemotePackage
{ interface WineMsiRemotePackage
; }
182 [ uuid(000C1092
-0000-0000-C000
-000000000046), version(1.0) ]
183 library WindowsInstaller
185 dispinterface Installer
;
186 dispinterface Record
;
187 dispinterface Session
;
188 dispinterface Database
;
189 dispinterface SummaryInfo
;
191 dispinterface UIPreview
;
192 dispinterface FeatureInfo
;
193 dispinterface RecordList
;
194 dispinterface StringList
;
195 dispinterface Product
;
199 msiInstallStateNotUsed
= -7,
200 msiInstallStateBadConfig
= -6,
201 msiInstallStateIncomplete
= -5,
202 msiInstallStateSourceAbsent
= -4,
203 msiInstallStateInvalidArg
= -2,
204 msiInstallStateUnknown
= -1,
205 msiInstallStateBroken
= 0,
206 msiInstallStateAdvertised
= 1,
207 msiInstallStateRemoved
= 1,
208 msiInstallStateAbsent
= 2,
209 msiInstallStateLocal
= 3,
210 msiInstallStateSource
= 4,
211 msiInstallStateDefault
= 5
215 msiOpenDatabaseModeReadOnly
= 0,
216 msiOpenDatabaseModeTransact
= 1,
217 msiOpenDatabaseModeDirect
= 2,
218 msiOpenDatabaseModeCreate
= 3,
219 msiOpenDatabaseModeCreateDirect
= 4,
220 msiOpenDatabaseModePatchFile
= 32
221 } MsiOpenDatabaseMode
;
224 msiUILevelNoChange
= 0,
225 msiUILevelDefault
= 1,
228 msiUILevelReduced
= 4,
230 msiUILevelHideCancel
= 32,
231 msiUILevelProgressOnly
= 64,
232 msiUILevelEndDialog
= 128,
233 msiUILevelSourceResOnly
= 256
236 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
237 dispinterface Installer
240 [id(DISPID_INSTALLER_UILEVEL
)]
243 [id(DISPID_INSTALLER_CREATERECORD
)]
244 Record
*CreateRecord
([in] long Count
);
245 [id(DISPID_INSTALLER_OPENPACKAGE
)]
246 Session
* OpenPackage
(
247 [in] VARIANT PackagePath
,
248 [in, optional, defaultvalue(0)] long Options
);
249 [id(DISPID_INSTALLER_OPENPRODUCT
)]
250 Session
* OpenProduct
(
251 [in] BSTR ProductCode
);
252 [id(DISPID_INSTALLER_SUMMARYINFORMATION
)]
253 SummaryInfo
* SummaryInformation
(
254 [in] BSTR PackagePath
,
255 [in, optional, defaultvalue(0)] long UpdateCount
);
256 [id(DISPID_INSTALLER_OPENDATABASE
)]
257 Database
*OpenDatabase
(
258 [in] BSTR DatabasePath
,
259 [in] VARIANT OpenMode
);
260 [id(DISPID_INSTALLER_ENABLELOG
)]
264 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
266 [in] BSTR PackagePath
,
267 [in, optional, defaultvalue("0")] BSTR PropertyValues
);
268 [id(DISPID_INSTALLER_VERSION
)]
270 [id(DISPID_INSTALLER_LASTERRORRECORD
)]
271 Record
* LastErrorRecord
();
272 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
276 [in, optional] VARIANT Value
);
277 [id(DISPID_INSTALLER_ENVIRONMENT
), propget]
278 BSTR Environment
([in] BSTR Variable
);
279 [id(DISPID_INSTALLER_ENVIRONMENT
), propput]
283 [id(DISPID_INSTALLER_FILEATTRIBUTES
)]
284 long FileAttributes
([in] BSTR FilePath
);
285 [id(DISPID_INSTALLER_FILESIZE
)]
286 long FileSize
([in] BSTR FilePath
);
287 [id(DISPID_INSTALLER_FILEVERSION
)]
290 [in, optional] VARIANT Language
);
291 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
292 MsiInstallState ProductState
(
294 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
297 [in] BSTR Attribute
);
298 [id(DISPID_INSTALLER_PRODUCTS
), propget]
299 StringList
*Products
();
300 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
301 StringList
*RelatedProducts
(
302 [in] BSTR UpgradeCode
);
305 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
310 [id(DISPID_RECORD_STRINGDATA
), propget]
311 BSTR StringData
([in] long Field
);
312 [id(DISPID_RECORD_STRINGDATA
), propput]
316 [id(DISPID_RECORD_INTEGERDATA
), propget]
317 long IntegerData
([in] long Field
);
318 [id(DISPID_RECORD_INTEGERDATA
), propput]
322 [id(DISPID_RECORD_FIELDCOUNT
), propget]
326 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
327 dispinterface StringList
331 [id(DISPID_LIST__NEWENUM
)]
333 [id(DISPID_LIST_ITEM
), propget]
334 BSTR Item
(long Index
);
335 [id(DISPID_LIST_COUNT
), propget]
339 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
340 dispinterface RecordList
346 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
347 dispinterface UIPreview
353 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
354 dispinterface SummaryInfo
358 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
359 VARIANT Property
([in] long Pid
);
360 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
364 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
365 long PropertyCount
();
369 msiViewModifySeek
= -1,
370 msiViewModifyRefresh
= 0,
371 msiViewModifyInsert
= 1,
372 msiViewModifyUpdate
= 2,
373 msiViewModifyAssign
= 3,
374 msiViewModifyReplace
= 4,
375 msiViewModifyMerge
= 5,
376 msiViewModifyDelete
= 6,
377 msiViewModifyInsertTemporary
= 7,
378 msiViewModifyValidate
= 8,
379 msiViewModifyValidateNew
= 9,
380 msiViewModifyValidateField
= 10,
381 msiViewModifyValidateDelete
= 11,
382 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
384 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
389 [id(DISPID_VIEW_EXECUTE
)]
390 void Execute
([in, optional, defaultvalue(0)] Record
*Params
);
391 [id(DISPID_VIEW_FETCH
)]
393 [id(DISPID_VIEW_MODIFY
)]
395 [in] _MsiViewModify Mode
,
397 [id(DISPID_VIEW_CLOSE
)]
401 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
402 dispinterface Database
406 [id(DISPID_DATABASE_OPENVIEW
)]
407 View
* OpenView
([in] BSTR Sql
);
408 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
409 SummaryInfo
*SummaryInformation
([in, optional, defaultvalue(0)] long UpdateCount
);
413 msiDoActionStatusNoAction
= 0,
414 msiDoActionStatusSuccess
= 1,
415 msiDoActionStatusUserExit
= 2,
416 msiDoActionStatusFailure
= 3,
417 msiDoActionStatusSuspend
= 4,
418 msiDoActionStatusFinished
= 5,
419 msiDoActionStatusWrongState
= 6,
420 msiDoActionStatusBadActionData
= 7
425 msiRunModeAdvertise
= 1,
426 msiRunModeMaintenance
= 2,
427 msiRunModeRollbackEnabled
= 3,
428 msiRunModeLogEnabled
= 4,
429 msiRunModeOperations
= 5,
430 msiRunModeRebootAtEnd
= 6,
431 msiRunModeRebootNow
= 7,
432 msiRunModeCabinet
= 8,
433 msiRunModeSourceShortNames
= 9,
434 msiRunModeTargetShortNames
= 10,
435 msiRunModeWindows9x
= 12,
436 msiRunModeZawEnabled
= 13,
437 msiRunModeScheduled
= 16,
438 msiRunModeRollback
= 17,
439 msiRunModeCommit
= 18
443 msiEvaluateConditionFalse
= 0,
444 msiEvaluateConditionTrue
= 1,
445 msiEvaluateConditionNone
= 2,
446 msiEvaluateConditionError
= 3
447 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
450 msiMessageStatusError
= -1,
451 msiMessageStatusNone
= 0,
452 msiMessageStatusOk
= 1,
453 msiMessageStatusCancel
= 2,
454 msiMessageStatusAbort
= 3,
455 msiMessageStatusRetry
= 4,
456 msiMessageStatusIgnore
= 5,
457 msiMessageStatusYes
= 6,
458 msiMessageStatusNo
= 7
462 msiMessageTypeFatalExit
= 0,
463 msiMessageTypeError
= 0x01000000,
464 msiMessageTypeWarning
= 0x02000000,
465 msiMessageTypeUser
= 0x03000000,
466 msiMessageTypeInfo
= 0x04000000,
467 msiMessageTypeFilesInUse
= 0x05000000,
468 msiMessageTypeResolveSource
= 0x06000000,
469 msiMessageTypeOutOfDiskSpace
= 0x07000000,
470 msiMessageTypeActionStart
= 0x08000000,
471 msiMessageTypeActionData
= 0x09000000,
472 msiMessageTypeProgress
= 0x0a000000,
473 msiMessageTypeCommonData
= 0x0b000000,
474 msiMessageTypeOk
= 0,
475 msiMessageTypeOkCancel
= 1,
476 msiMessageTypeAbortRetryIgnore
= 2,
477 msiMessageTypeYesNoCancel
= 3,
478 msiMessageTypeYesNo
= 4,
479 msiMessageTypeRetryCancel
= 5,
480 msiMessageTypeDefault1
= 0,
481 msiMessageTypeDefault2
= 256,
482 msiMessageTypeDefault3
= 512
485 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
486 dispinterface Session
490 [id(DISPID_SESSION_INSTALLER
), propget]
491 Installer
*Installer
();
492 [id(DISPID_SESSION_PROPERTY
), propget]
493 BSTR Property
([in] BSTR Name
);
494 [id(DISPID_SESSION_PROPERTY
), propput]
498 [id(DISPID_SESSION_LANGUAGE
), propget]
500 [id(DISPID_SESSION_MODE
), propget]
501 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
502 [id(DISPID_SESSION_MODE
), propput]
504 [in] MsiRunMode Flag
,
505 [in] VARIANT_BOOL rhs
);
506 [id(DISPID_SESSION_DATABASE
), propget]
507 Database
* Database
();
508 [id(DISPID_SESSION_DOACTION
)]
509 MsiDoActionStatus DoAction
([in] BSTR Action
);
510 [id(DISPID_SESSION_EVALUATECONDITION
)]
511 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
512 [id(DISPID_SESSION_MESSAGE
)]
513 MsiMessageStatus
Message(
514 [in] MsiMessageType Kind
,
515 [in] Record
*Record
);
516 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
517 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
518 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
519 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
520 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
521 void FeatureRequestState
(
523 [in] MsiInstallState rhs
);
524 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
525 void SetInstallLevel
([in] long Level
);
528 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
529 dispinterface FeatureInfo
535 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
536 dispinterface Product
542 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]
550 helpstring("Microsoft Windows Installer"),
551 threading
(apartment
),
552 progid
("WindowsInstaller.Installer"),
553 uuid(000c1090
-0000-0000-c000
-000000000046)
555 coclass MsiInstaller
{ interface Installer
; }