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 typelib
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 uuid(000c1082
-0000-0000-c000
-000000000046)
158 coclass MsiTransform
{ }
161 uuid(000c1084
-0000-0000-c000
-000000000046)
163 coclass MsiDatabase
{ }
166 uuid(000c1086
-0000-0000-c000
-000000000046)
171 threading
(apartment
),
172 uuid(000c1094
-0000-0000-c000
-000000000046)
174 /* FIXME: unidentified class */
175 coclass MsiServerX3
{ interface IMsiServer
; }
178 uuid(ba26e6fa
-4f27
-4f56
-953a
-3f90272018aa
)
180 coclass WineMsiRemoteCustomAction
{ interface WineMsiRemoteCustomAction
; }
183 uuid(902b3592
-9d08
-4dfd
-a593
-d07c52546421
)
185 coclass WineMsiRemotePackage
{ interface WineMsiRemotePackage
; }
188 [ uuid(000C1092
-0000-0000-C000
-000000000046), version(1.0) ]
189 library WindowsInstaller
191 dispinterface Installer
;
192 dispinterface Record
;
193 dispinterface Session
;
194 dispinterface Database
;
195 dispinterface SummaryInfo
;
197 dispinterface UIPreview
;
198 dispinterface FeatureInfo
;
199 dispinterface RecordList
;
200 dispinterface StringList
;
201 dispinterface Product
;
205 msiInstallStateNotUsed
= -7,
206 msiInstallStateBadConfig
= -6,
207 msiInstallStateIncomplete
= -5,
208 msiInstallStateSourceAbsent
= -4,
209 msiInstallStateInvalidArg
= -2,
210 msiInstallStateUnknown
= -1,
211 msiInstallStateBroken
= 0,
212 msiInstallStateAdvertised
= 1,
213 msiInstallStateRemoved
= 1,
214 msiInstallStateAbsent
= 2,
215 msiInstallStateLocal
= 3,
216 msiInstallStateSource
= 4,
217 msiInstallStateDefault
= 5
221 msiOpenDatabaseModeReadOnly
= 0,
222 msiOpenDatabaseModeTransact
= 1,
223 msiOpenDatabaseModeDirect
= 2,
224 msiOpenDatabaseModeCreate
= 3,
225 msiOpenDatabaseModeCreateDirect
= 4,
226 msiOpenDatabaseModePatchFile
= 32
227 } MsiOpenDatabaseMode
;
230 msiUILevelNoChange
= 0,
231 msiUILevelDefault
= 1,
234 msiUILevelReduced
= 4,
236 msiUILevelHideCancel
= 32,
237 msiUILevelProgressOnly
= 64,
238 msiUILevelEndDialog
= 128,
239 msiUILevelSourceResOnly
= 256
242 [ uuid(000C1090
-0000-0000-C000
-000000000046) ]
243 dispinterface Installer
246 [id(DISPID_INSTALLER_UILEVEL
)]
249 [id(DISPID_INSTALLER_CREATERECORD
)]
250 Record
*CreateRecord
([in] long Count
);
251 [id(DISPID_INSTALLER_OPENPACKAGE
)]
252 Session
* OpenPackage
(
253 [in] VARIANT PackagePath
,
254 [in, optional, defaultvalue(0)] long Options
);
255 [id(DISPID_INSTALLER_OPENPRODUCT
)]
256 Session
* OpenProduct
(
257 [in] BSTR ProductCode
);
258 [id(DISPID_INSTALLER_SUMMARYINFORMATION
)]
259 SummaryInfo
* SummaryInformation
(
260 [in] BSTR PackagePath
,
261 [in, optional, defaultvalue(0)] long UpdateCount
);
262 [id(DISPID_INSTALLER_OPENDATABASE
)]
263 Database
*OpenDatabase
(
264 [in] BSTR DatabasePath
,
265 [in] VARIANT OpenMode
);
266 [id(DISPID_INSTALLER_ENABLELOG
)]
270 [id(DISPID_INSTALLER_INSTALLPRODUCT
)]
272 [in] BSTR PackagePath
,
273 [in, optional, defaultvalue("0")] BSTR PropertyValues
);
274 [id(DISPID_INSTALLER_VERSION
)]
276 [id(DISPID_INSTALLER_LASTERRORRECORD
)]
277 Record
* LastErrorRecord
();
278 [id(DISPID_INSTALLER_REGISTRYVALUE
), propget]
282 [in, optional] VARIANT Value
);
283 [id(DISPID_INSTALLER_ENVIRONMENT
), propget]
284 BSTR Environment
([in] BSTR Variable
);
285 [id(DISPID_INSTALLER_ENVIRONMENT
), propput]
289 [id(DISPID_INSTALLER_FILEATTRIBUTES
)]
290 long FileAttributes
([in] BSTR FilePath
);
291 [id(DISPID_INSTALLER_FILESIZE
)]
292 long FileSize
([in] BSTR FilePath
);
293 [id(DISPID_INSTALLER_FILEVERSION
)]
296 [in, optional] VARIANT Language
);
297 [id(DISPID_INSTALLER_PRODUCTSTATE
), propget]
298 MsiInstallState ProductState
(
300 [id(DISPID_INSTALLER_PRODUCTINFO
), propget]
303 [in] BSTR Attribute
);
304 [id(DISPID_INSTALLER_PRODUCTS
), propget]
305 StringList
*Products
();
306 [id(DISPID_INSTALLER_RELATEDPRODUCTS
), propget]
307 StringList
*RelatedProducts
(
308 [in] BSTR UpgradeCode
);
311 [ uuid(000C1093
-0000-0000-C000
-000000000046) ]
316 [id(DISPID_RECORD_STRINGDATA
), propget]
317 BSTR StringData
([in] long Field
);
318 [id(DISPID_RECORD_STRINGDATA
), propput]
322 [id(DISPID_RECORD_INTEGERDATA
), propget]
323 long IntegerData
([in] long Field
);
324 [id(DISPID_RECORD_INTEGERDATA
), propput]
328 [id(DISPID_RECORD_FIELDCOUNT
), propget]
332 [ uuid(000C1095
-0000-0000-C000
-000000000046) ]
333 dispinterface StringList
337 [id(DISPID_LIST__NEWENUM
)]
339 [id(DISPID_LIST_ITEM
), propget]
340 BSTR Item
(long Index
);
341 [id(DISPID_LIST_COUNT
), propget]
345 [ uuid(000C1096
-0000-0000-C000
-000000000046) ]
346 dispinterface RecordList
352 [ uuid(000C109A
-0000-0000-C000
-000000000046) ]
353 dispinterface UIPreview
359 [ uuid(000C109B
-0000-0000-C000
-000000000046) ]
360 dispinterface SummaryInfo
364 [id(DISPID_SUMMARYINFO_PROPERTY
), propget]
365 VARIANT Property
([in] long Pid
);
366 [id(DISPID_SUMMARYINFO_PROPERTY
), propput]
370 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT
), propget]
371 long PropertyCount
();
375 msiViewModifySeek
= -1,
376 msiViewModifyRefresh
= 0,
377 msiViewModifyInsert
= 1,
378 msiViewModifyUpdate
= 2,
379 msiViewModifyAssign
= 3,
380 msiViewModifyReplace
= 4,
381 msiViewModifyMerge
= 5,
382 msiViewModifyDelete
= 6,
383 msiViewModifyInsertTemporary
= 7,
384 msiViewModifyValidate
= 8,
385 msiViewModifyValidateNew
= 9,
386 msiViewModifyValidateField
= 10,
387 msiViewModifyValidateDelete
= 11,
388 } _MsiViewModify
; /* Added underscore to avoid conflict with function name */
390 [ uuid(000C109C
-0000-0000-C000
-000000000046) ]
395 [id(DISPID_VIEW_EXECUTE
)]
396 void Execute
([in, optional, defaultvalue(0)] Record
*Params
);
397 [id(DISPID_VIEW_FETCH
)]
399 [id(DISPID_VIEW_MODIFY
)]
401 [in] _MsiViewModify Mode
,
403 [id(DISPID_VIEW_CLOSE
)]
407 [ uuid(000C109D
-0000-0000-C000
-000000000046) ]
408 dispinterface Database
412 [id(DISPID_DATABASE_OPENVIEW
)]
413 View
* OpenView
([in] BSTR Sql
);
414 [id(DISPID_DATABASE_SUMMARYINFORMATION
), propget]
415 SummaryInfo
*SummaryInformation
([in, optional, defaultvalue(0)] long UpdateCount
);
419 msiDoActionStatusNoAction
= 0,
420 msiDoActionStatusSuccess
= 1,
421 msiDoActionStatusUserExit
= 2,
422 msiDoActionStatusFailure
= 3,
423 msiDoActionStatusSuspend
= 4,
424 msiDoActionStatusFinished
= 5,
425 msiDoActionStatusWrongState
= 6,
426 msiDoActionStatusBadActionData
= 7
431 msiRunModeAdvertise
= 1,
432 msiRunModeMaintenance
= 2,
433 msiRunModeRollbackEnabled
= 3,
434 msiRunModeLogEnabled
= 4,
435 msiRunModeOperations
= 5,
436 msiRunModeRebootAtEnd
= 6,
437 msiRunModeRebootNow
= 7,
438 msiRunModeCabinet
= 8,
439 msiRunModeSourceShortNames
= 9,
440 msiRunModeTargetShortNames
= 10,
441 msiRunModeWindows9x
= 12,
442 msiRunModeZawEnabled
= 13,
443 msiRunModeScheduled
= 16,
444 msiRunModeRollback
= 17,
445 msiRunModeCommit
= 18
449 msiEvaluateConditionFalse
= 0,
450 msiEvaluateConditionTrue
= 1,
451 msiEvaluateConditionNone
= 2,
452 msiEvaluateConditionError
= 3
453 } _MsiEvaluateCondition
; /* Added underscore to avoid conflict with function name */
456 msiMessageStatusError
= -1,
457 msiMessageStatusNone
= 0,
458 msiMessageStatusOk
= 1,
459 msiMessageStatusCancel
= 2,
460 msiMessageStatusAbort
= 3,
461 msiMessageStatusRetry
= 4,
462 msiMessageStatusIgnore
= 5,
463 msiMessageStatusYes
= 6,
464 msiMessageStatusNo
= 7
468 msiMessageTypeFatalExit
= 0,
469 msiMessageTypeError
= 0x01000000,
470 msiMessageTypeWarning
= 0x02000000,
471 msiMessageTypeUser
= 0x03000000,
472 msiMessageTypeInfo
= 0x04000000,
473 msiMessageTypeFilesInUse
= 0x05000000,
474 msiMessageTypeResolveSource
= 0x06000000,
475 msiMessageTypeOutOfDiskSpace
= 0x07000000,
476 msiMessageTypeActionStart
= 0x08000000,
477 msiMessageTypeActionData
= 0x09000000,
478 msiMessageTypeProgress
= 0x0a000000,
479 msiMessageTypeCommonData
= 0x0b000000,
480 msiMessageTypeOk
= 0,
481 msiMessageTypeOkCancel
= 1,
482 msiMessageTypeAbortRetryIgnore
= 2,
483 msiMessageTypeYesNoCancel
= 3,
484 msiMessageTypeYesNo
= 4,
485 msiMessageTypeRetryCancel
= 5,
486 msiMessageTypeDefault1
= 0,
487 msiMessageTypeDefault2
= 256,
488 msiMessageTypeDefault3
= 512
491 [ uuid(000C109E
-0000
-0000-C000
-000000000046) ]
492 dispinterface Session
496 [id(DISPID_SESSION_INSTALLER
), propget]
497 Installer
*Installer
();
498 [id(DISPID_SESSION_PROPERTY
), propget]
499 BSTR Property
([in] BSTR Name
);
500 [id(DISPID_SESSION_PROPERTY
), propput]
504 [id(DISPID_SESSION_LANGUAGE
), propget]
506 [id(DISPID_SESSION_MODE
), propget]
507 VARIANT_BOOL Mode
([in] MsiRunMode Flag
);
508 [id(DISPID_SESSION_MODE
), propput]
510 [in] MsiRunMode Flag
,
511 [in] VARIANT_BOOL rhs
);
512 [id(DISPID_SESSION_DATABASE
), propget]
513 Database
* Database
();
514 [id(DISPID_SESSION_DOACTION
)]
515 MsiDoActionStatus DoAction
([in] BSTR Action
);
516 [id(DISPID_SESSION_EVALUATECONDITION
)]
517 _MsiEvaluateCondition EvaluateCondition
([in] BSTR Expression
);
518 [id(DISPID_SESSION_MESSAGE
)]
519 MsiMessageStatus
Message(
520 [in] MsiMessageType Kind
,
521 [in] Record
*Record
);
522 [id(DISPID_SESSION_FEATURECURRENTSTATE
), propget]
523 MsiInstallState FeatureCurrentState
([in] BSTR Feature
);
524 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propget]
525 MsiInstallState FeatureRequestState
([in] BSTR Feature
);
526 [id(DISPID_SESSION_FEATUREREQUESTSTATE
), propput]
527 void FeatureRequestState
(
529 [in] MsiInstallState rhs
);
530 [id(DISPID_SESSION_SETINSTALLLEVEL
)]
531 void SetInstallLevel
([in] long Level
);
534 [ uuid(000C109F
-0000-0000-C000
-000000000046) ]
535 dispinterface FeatureInfo
541 [ uuid(000C10A0
-0000-0000-C000
-000000000046) ]
542 dispinterface Product
548 [ uuid(000C10A1
-0000-0000-C000
-000000000046) ]
556 helpstring("Microsoft Windows Installer"),
557 threading
(apartment
),
558 progid
("WindowsInstaller.Installer"),
559 uuid(000c1090
-0000-0000-c000
-000000000046)
561 coclass MsiInstaller
{ interface Installer
; }