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
21 #pragma makedep register
22 #pragma makedep regtypelib
24 #include
"msiserver_dispids.h"
31 typedef unsigned long MSIHANDLE
;
32 typedef int INSTALLMESSAGE
;
33 typedef int MSICONDITION
;
34 typedef int MSIRUNMODE
;
35 typedef int INSTALLSTATE
;
39 uuid(7BDE2046
-D03B
-4ffc
-B84C
-A098F38CFF0B
),
43 interface IWineMsiRemoteDatabase
: IUnknown
45 HRESULT IsTablePersistent
( [in] LPCWSTR table
, [out] MSICONDITION
*persistent
);
46 HRESULT GetPrimaryKeys
( [in] LPCWSTR table
, [out] MSIHANDLE
*keys
);
47 HRESULT GetSummaryInformation
( [in] UINT updatecount
, [out] MSIHANDLE
*suminfo
);
48 HRESULT OpenView
( [in] LPCWSTR query
, [out] MSIHANDLE
*view
);
49 HRESULT SetMsiHandle
( [in] MSIHANDLE
handle );
53 uuid(902B3592
-9D08
-4dfd
-A593
-D07C52546421
),
57 interface IWineMsiRemotePackage
: IUnknown
59 HRESULT SetMsiHandle
( [in] MSIHANDLE
handle );
60 HRESULT GetActiveDatabase
( [out] MSIHANDLE
*handle );
61 HRESULT GetProperty
( [in] BSTR property
, [out, size_is(*size
)] BSTR value
, [in, out] DWORD
*size
);
62 HRESULT SetProperty
( [in] BSTR property
, [in] BSTR value
);
63 HRESULT ProcessMessage
( [in] INSTALLMESSAGE
message, [in] MSIHANDLE record
);
64 HRESULT DoAction
( [in] BSTR action
);
65 HRESULT Sequence
( [in] BSTR table
, [in] int sequence
);
66 HRESULT GetTargetPath
( [in] BSTR folder
, [out, size_is(*size
)] BSTR value
, [in, out] DWORD
*size
);
67 HRESULT SetTargetPath
( [in] BSTR folder
, [in] BSTR value
);
68 HRESULT GetSourcePath
( [in] BSTR folder
, [out, size_is(*size
)] BSTR value
, [in, out] DWORD
*size
);
69 HRESULT GetMode
( [in] MSIRUNMODE mode
, [out] BOOL
*ret
);
70 HRESULT SetMode
( [in] MSIRUNMODE mode
, [in] BOOL state
);
71 HRESULT GetFeatureState
( [in] BSTR feature
, [out] INSTALLSTATE
*installed
, [out] INSTALLSTATE
*action
);
72 HRESULT SetFeatureState
( [in] BSTR feature
, [in] INSTALLSTATE state
);
73 HRESULT GetComponentState
( [in] BSTR component
, [out] INSTALLSTATE
*installed
, [out] INSTALLSTATE
*action
);
74 HRESULT SetComponentState
( [in] BSTR component
, [in] INSTALLSTATE state
);
75 HRESULT GetLanguage
( [out] LANGID
*language
);
76 HRESULT SetInstallLevel
( [in] int level
);
77 HRESULT FormatRecord
( [in] MSIHANDLE record
, [out] BSTR *value
);
78 HRESULT EvaluateCondition
( [in] BSTR condition
);
79 HRESULT GetFeatureCost
( [in] BSTR feature
, [in] INT cost_tree
, [in] INSTALLSTATE state
, [out] INT *cost
);
80 HRESULT EnumComponentCosts
( [in] BSTR component
, [in] DWORD index
, [in] INSTALLSTATE state
,
81 [out, size_is(*buflen
)] BSTR drive
, [in, out] DWORD
*buflen
, [out] INT *cost
, [out] INT *temp
);
85 uuid(56D58B64
-8780-4c22
-A8BC
-8B0B29E4A9F8
),
89 interface IWineMsiRemoteCustomAction
: IUnknown
91 HRESULT GetActionInfo
( [in] LPCGUID guid
, [out] INT *type
, [out] MSIHANDLE
*handle, [out] BSTR *dllname,
92 [out] BSTR *function
, [out] IWineMsiRemotePackage
**package
);
96 uuid(000c101c
-0000-0000-c000
-000000000046),
100 interface IMsiServer
: IUnknown
106 uuid(000c101d
-0000-0000-c000
-000000000046),
110 interface IMsiMessage
: IUnknown
116 uuid(000c1025
-0000-0000-c000
-000000000046),
120 interface IMsiCustomAction
: IUnknown
126 uuid(000c1033
-0000-0000-c000
-000000000046),
130 interface IMsiRemoteAPI
: IUnknown
136 helpstring("Msi install server"),
137 progid
("IMsiServer"),
138 uuid(000c101c
-0000-0000-c000
-000000000046)
140 coclass MsiServer
{ interface IMsiServer
; }
143 helpstring("Microsoft Windows Installer Message RPC"),
144 progid
("WindowsInstaller.Message"),
145 uuid(000c101d
-0000-0000-c000
-000000000046)
147 coclass MsiServerMessage
{ interface IMsiMessage
; }
151 uuid(000c103e
-0000
-0000-c000
-000000000046)
153 coclass PSFactoryBuffer
{ interface IPSFactoryBuffer
; }
156 helpstring("Microsoft Windows Installer"),
157 threading
(apartment
),
158 progid
("WindowsInstaller.Installer"),
159 uuid(000c1090
-0000-0000-c000
-000000000046)
161 coclass MsiInstaller
{ interface Installer
; }
164 uuid(000c1082
-0000-0000-c000
-000000000046)
166 coclass MsiTransform
{ }
169 uuid(000c1084
-0000-0000-c000
-000000000046)
171 coclass MsiDatabase
{ }
174 uuid(000c1086
-0000-0000-c000
-000000000046)
179 threading
(apartment
),
180 uuid(000c1094
-0000-0000-c000
-000000000046)
182 /* FIXME: unidentified class */
183 coclass MsiServerX3
{ interface IMsiServer
; }
186 uuid(ba26e6fa
-4f27
-4f56
-953a
-3f90272018aa
)
188 coclass WineMsiRemoteCustomAction
{ interface WineMsiRemoteCustomAction
; }
191 uuid(902b3592
-9d08
-4dfd
-a593
-d07c52546421
)
193 coclass WineMsiRemotePackage
{ interface WineMsiRemotePackage
; }
195 [ uuid(000C1092
-0000-0000-C000
-000000000046), version(1.0) ]
196 library WindowsInstaller
198 dispinterface Installer
;
199 dispinterface Record
;
200 dispinterface Session
;
201 dispinterface Database
;
202 dispinterface SummaryInfo
;
204 dispinterface UIPreview
;
205 dispinterface FeatureInfo
;
206 dispinterface RecordList
;
207 dispinterface StringList
;
208 dispinterface Product
;
212 msiInstallStateNotUsed
= -7,
213 msiInstallStateBadConfig
= -6,
214 msiInstallStateIncomplete
= -5,
215 msiInstallStateSourceAbsent
= -4,
216 msiInstallStateInvalidArg
= -2,
217 msiInstallStateUnknown
= -1,
218 msiInstallStateBroken
= 0,
219 msiInstallStateAdvertised
= 1,
220 msiInstallStateRemoved
= 1,
221 msiInstallStateAbsent
= 2,
222 msiInstallStateLocal
= 3,
223 msiInstallStateSource
= 4,
224 msiInstallStateDefault
= 5
228 msiOpenDatabaseModeReadOnly
= 0,
229 msiOpenDatabaseModeTransact
= 1,
230 msiOpenDatabaseModeDirect
= 2,
231 msiOpenDatabaseModeCreate
= 3,
232 msiOpenDatabaseModeCreateDirect
= 4,
233 msiOpenDatabaseModePatchFile
= 32
234 } MsiOpenDatabaseMode
;
237 msiUILevelNoChange
= 0,
238 msiUILevelDefault
= 1,
241 msiUILevelReduced
= 4,
243 msiUILevelHideCancel
= 32,
244 msiUILevelProgressOnly
= 64,
245 msiUILevelEndDialog
= 128,
246 msiUILevelSourceResOnly
= 256
249 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
250 dispinterface Installer
253 [id(DISPID_INSTALLER_UILEVEL
)]
256 [id(DISPID_INSTALLER_CREATERECORD
)]
257 Record
*CreateRecord
([in] long Count
);
258 [id(DISPID_INSTALLER_OPENPACKAGE
)]
259 Session
* OpenPackage
(
260 [in] VARIANT PackagePath
,
261 [in, defaultvalue(0)] long Options
);
262 [id(DISPID_INSTALLER_OPENPRODUCT
)]
263 Session
* OpenProduct
(
264 [in] BSTR ProductCode
);
265 [id(DISPID_INSTALLER_SUMMARYINFORMATION
)]
266 SummaryInfo
* SummaryInformation
(
267 [in] BSTR PackagePath
,
268 [in, defaultvalue(0)] long UpdateCount
);
269 [id(DISPID_INSTALLER_OPENDATABASE
)]
270 Database
*OpenDatabase
(
271 [in] BSTR DatabasePath
,
272 [in] VARIANT OpenMode
);
273 [id(DISPID_INSTALLER_ENABLELOG
)]
277 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
279 [in] BSTR PackagePath
,
280 [in, defaultvalue("0")] BSTR PropertyValues
);
281 [id(DISPID_INSTALLER_VERSION
)]
283 [id(DISPID_INSTALLER_LASTERRORRECORD
)]
284 Record
* LastErrorRecord
();
285 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
289 [in, optional] VARIANT Value
);
290 [id(DISPID_INSTALLER_ENVIRONMENT
), propget]
291 BSTR Environment
([in] BSTR Variable
);
292 [id(DISPID_INSTALLER_ENVIRONMENT
), propput]
296 [id(DISPID_INSTALLER_FILEATTRIBUTES
)]
297 long FileAttributes
([in] BSTR FilePath
);
298 [id(DISPID_INSTALLER_FILESIZE
)]
299 long FileSize
([in] BSTR FilePath
);
300 [id(DISPID_INSTALLER_FILEVERSION
)]
303 [in, optional] VARIANT Language
);
304 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
305 MsiInstallState ProductState
(
307 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
310 [in] BSTR Attribute
);
311 [id(DISPID_INSTALLER_PRODUCTS
), propget]
312 StringList
*Products
();
313 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
314 StringList
*RelatedProducts
(
315 [in] BSTR UpgradeCode
);
318 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
323 [id(DISPID_RECORD_STRINGDATA
), propget]
324 BSTR StringData
([in] long Field
);
325 [id(DISPID_RECORD_STRINGDATA
), propput]
329 [id(DISPID_RECORD_INTEGERDATA
), propget]
330 long IntegerData
([in] long Field
);
331 [id(DISPID_RECORD_INTEGERDATA
), propput]
335 [id(DISPID_RECORD_FIELDCOUNT
), propget]
339 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
340 dispinterface StringList
344 [id(DISPID_LIST__NEWENUM
)]
346 [id(DISPID_LIST_ITEM
), propget]
347 BSTR Item
(long Index
);
348 [id(DISPID_LIST_COUNT
), propget]
352 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
353 dispinterface RecordList
359 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
360 dispinterface UIPreview
366 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
367 dispinterface SummaryInfo
371 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
372 VARIANT Property
([in] long Pid
);
373 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
377 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
378 long PropertyCount
();
382 msiViewModifySeek
= -1,
383 msiViewModifyRefresh
= 0,
384 msiViewModifyInsert
= 1,
385 msiViewModifyUpdate
= 2,
386 msiViewModifyAssign
= 3,
387 msiViewModifyReplace
= 4,
388 msiViewModifyMerge
= 5,
389 msiViewModifyDelete
= 6,
390 msiViewModifyInsertTemporary
= 7,
391 msiViewModifyValidate
= 8,
392 msiViewModifyValidateNew
= 9,
393 msiViewModifyValidateField
= 10,
394 msiViewModifyValidateDelete
= 11,
395 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
397 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
402 [id(DISPID_VIEW_EXECUTE
)]
403 void Execute
([in, defaultvalue(0)] Record
*Params
);
404 [id(DISPID_VIEW_FETCH
)]
406 [id(DISPID_VIEW_MODIFY
)]
408 [in] _MsiViewModify Mode
,
410 [id(DISPID_VIEW_CLOSE
)]
414 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
415 dispinterface Database
419 [id(DISPID_DATABASE_OPENVIEW
)]
420 View
* OpenView
([in] BSTR Sql
);
421 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
422 SummaryInfo
*SummaryInformation
([in, defaultvalue(0)] long UpdateCount
);
426 msiDoActionStatusNoAction
= 0,
427 msiDoActionStatusSuccess
= 1,
428 msiDoActionStatusUserExit
= 2,
429 msiDoActionStatusFailure
= 3,
430 msiDoActionStatusSuspend
= 4,
431 msiDoActionStatusFinished
= 5,
432 msiDoActionStatusWrongState
= 6,
433 msiDoActionStatusBadActionData
= 7
438 msiRunModeAdvertise
= 1,
439 msiRunModeMaintenance
= 2,
440 msiRunModeRollbackEnabled
= 3,
441 msiRunModeLogEnabled
= 4,
442 msiRunModeOperations
= 5,
443 msiRunModeRebootAtEnd
= 6,
444 msiRunModeRebootNow
= 7,
445 msiRunModeCabinet
= 8,
446 msiRunModeSourceShortNames
= 9,
447 msiRunModeTargetShortNames
= 10,
448 msiRunModeWindows9x
= 12,
449 msiRunModeZawEnabled
= 13,
450 msiRunModeScheduled
= 16,
451 msiRunModeRollback
= 17,
452 msiRunModeCommit
= 18
456 msiEvaluateConditionFalse
= 0,
457 msiEvaluateConditionTrue
= 1,
458 msiEvaluateConditionNone
= 2,
459 msiEvaluateConditionError
= 3
460 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
463 msiMessageStatusError
= -1,
464 msiMessageStatusNone
= 0,
465 msiMessageStatusOk
= 1,
466 msiMessageStatusCancel
= 2,
467 msiMessageStatusAbort
= 3,
468 msiMessageStatusRetry
= 4,
469 msiMessageStatusIgnore
= 5,
470 msiMessageStatusYes
= 6,
471 msiMessageStatusNo
= 7
475 msiMessageTypeFatalExit
= 0,
476 msiMessageTypeError
= 0x01000000,
477 msiMessageTypeWarning
= 0x02000000,
478 msiMessageTypeUser
= 0x03000000,
479 msiMessageTypeInfo
= 0x04000000,
480 msiMessageTypeFilesInUse
= 0x05000000,
481 msiMessageTypeResolveSource
= 0x06000000,
482 msiMessageTypeOutOfDiskSpace
= 0x07000000,
483 msiMessageTypeActionStart
= 0x08000000,
484 msiMessageTypeActionData
= 0x09000000,
485 msiMessageTypeProgress
= 0x0a000000,
486 msiMessageTypeCommonData
= 0x0b000000,
487 msiMessageTypeOk
= 0,
488 msiMessageTypeOkCancel
= 1,
489 msiMessageTypeAbortRetryIgnore
= 2,
490 msiMessageTypeYesNoCancel
= 3,
491 msiMessageTypeYesNo
= 4,
492 msiMessageTypeRetryCancel
= 5,
493 msiMessageTypeDefault1
= 0,
494 msiMessageTypeDefault2
= 256,
495 msiMessageTypeDefault3
= 512
498 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
499 dispinterface Session
503 [id(DISPID_SESSION_INSTALLER
), propget]
504 Installer
*Installer
();
505 [id(DISPID_SESSION_PROPERTY
), propget]
506 BSTR Property
([in] BSTR Name
);
507 [id(DISPID_SESSION_PROPERTY
), propput]
511 [id(DISPID_SESSION_LANGUAGE
), propget]
513 [id(DISPID_SESSION_MODE
), propget]
514 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
515 [id(DISPID_SESSION_MODE
), propput]
517 [in] MsiRunMode Flag
,
518 [in] VARIANT_BOOL rhs
);
519 [id(DISPID_SESSION_DATABASE
), propget]
520 Database
* Database
();
521 [id(DISPID_SESSION_DOACTION
)]
522 MsiDoActionStatus DoAction
([in] BSTR Action
);
523 [id(DISPID_SESSION_EVALUATECONDITION
)]
524 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
525 [id(DISPID_SESSION_MESSAGE
)]
526 MsiMessageStatus
Message(
527 [in] MsiMessageType Kind
,
528 [in] Record
*Record
);
529 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
530 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
531 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
532 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
533 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
534 void FeatureRequestState
(
536 [in] MsiInstallState rhs
);
537 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
538 void SetInstallLevel
([in] long Level
);
541 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
542 dispinterface FeatureInfo
548 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
549 dispinterface Product
555 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]