1/* 2 * Copyright (C) 2007 Mike McCormack 3 * Copyright (C) 2007 Misha Koshelev 4 * 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. 9 * 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. 14 * 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 18 */ 19 20#pragma makedep ident 21#pragma makedep register 22#pragma makedep regtypelib 23 24#include "msiserver_dispids.h" 25import "unknwn.idl"; 26import "wtypes.idl"; 27import "objidl.idl"; 28import "oaidl.idl"; 29 30cpp_quote("#if 0") 31typedef unsigned long MSIHANDLE; 32typedef int INSTALLMESSAGE; 33typedef int MSICONDITION; 34typedef int MSIRUNMODE; 35typedef int INSTALLSTATE; 36cpp_quote("#endif") 37 38[ 39 uuid(7BDE2046-D03B-4ffc-B84C-A098F38CFF0B), 40 oleautomation, 41 object 42] 43interface IWineMsiRemoteDatabase : IUnknown 44{ 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 ); 50} 51 52[ 53 uuid(902B3592-9D08-4dfd-A593-D07C52546421), 54 oleautomation, 55 object 56] 57interface IWineMsiRemotePackage : IUnknown 58{ 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 ); 82} 83 84[ 85 uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8), 86 oleautomation, 87 object 88] 89interface IWineMsiRemoteCustomAction : IUnknown 90{ 91 HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname, 92 [out] BSTR *function, [out] IWineMsiRemotePackage **package ); 93} 94 95[ 96 uuid(000c101c-0000-0000-c000-000000000046), 97 oleautomation, 98 object 99] 100interface IMsiServer : IUnknown 101{ 102 /* FIXME: methods */ 103} 104 105[ 106 uuid(000c101d-0000-0000-c000-000000000046), 107 oleautomation, 108 object 109] 110interface IMsiMessage : IUnknown 111{ 112 /* FIXME: methods */ 113} 114 115[ 116 uuid(000c1025-0000-0000-c000-000000000046), 117 oleautomation, 118 object 119] 120interface IMsiCustomAction : IUnknown 121{ 122 /* FIXME: methods */ 123} 124 125[ 126 uuid(000c1033-0000-0000-c000-000000000046), 127 oleautomation, 128 object 129] 130interface IMsiRemoteAPI : IUnknown 131{ 132 /* FIXME: methods */ 133} 134 135[ 136 helpstring("Msi install server"), 137 progid("IMsiServer"), 138 uuid(000c101c-0000-0000-c000-000000000046) 139] 140coclass MsiServer { interface IMsiServer; } 141 142[ 143 helpstring("Microsoft Windows Installer Message RPC"), 144 progid("WindowsInstaller.Message"), 145 uuid(000c101d-0000-0000-c000-000000000046) 146] 147coclass MsiServerMessage { interface IMsiMessage; } 148 149[ 150 threading(both), 151 uuid(000c103e-0000-0000-c000-000000000046) 152] 153coclass PSFactoryBuffer { interface IPSFactoryBuffer; } 154 155[ 156 helpstring("Microsoft Windows Installer"), 157 threading(apartment), 158 progid("WindowsInstaller.Installer"), 159 uuid(000c1090-0000-0000-c000-000000000046) 160] 161coclass MsiInstaller { interface Installer; } 162 163[ 164 uuid(000c1082-0000-0000-c000-000000000046) 165] 166coclass MsiTransform { } 167 168[ 169 uuid(000c1084-0000-0000-c000-000000000046) 170] 171coclass MsiDatabase { } 172 173[ 174 uuid(000c1086-0000-0000-c000-000000000046) 175] 176coclass MsiPatch { } 177 178[ 179 threading(apartment), 180 uuid(000c1094-0000-0000-c000-000000000046) 181] 182/* FIXME: unidentified class */ 183coclass MsiServerX3 { interface IMsiServer; } 184 185[ 186 uuid(ba26e6fa-4f27-4f56-953a-3f90272018aa) 187] 188coclass WineMsiRemoteCustomAction { interface WineMsiRemoteCustomAction; } 189 190[ 191 uuid(902b3592-9d08-4dfd-a593-d07c52546421) 192] 193coclass WineMsiRemotePackage { interface WineMsiRemotePackage; } 194 195[ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ] 196library WindowsInstaller 197{ 198 dispinterface Installer; 199 dispinterface Record; 200 dispinterface Session; 201 dispinterface Database; 202 dispinterface SummaryInfo; 203 dispinterface View; 204 dispinterface UIPreview; 205 dispinterface FeatureInfo; 206 dispinterface RecordList; 207 dispinterface StringList; 208 dispinterface Product; 209 dispinterface Patch; 210 211 typedef enum { 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 225 } MsiInstallState; 226 227 typedef enum { 228 msiOpenDatabaseModeReadOnly = 0, 229 msiOpenDatabaseModeTransact = 1, 230 msiOpenDatabaseModeDirect = 2, 231 msiOpenDatabaseModeCreate = 3, 232 msiOpenDatabaseModeCreateDirect = 4, 233 msiOpenDatabaseModePatchFile = 32 234 } MsiOpenDatabaseMode; 235 236 typedef enum { 237 msiUILevelNoChange = 0, 238 msiUILevelDefault = 1, 239 msiUILevelNone = 2, 240 msiUILevelBasic = 3, 241 msiUILevelReduced = 4, 242 msiUILevelFull = 5, 243 msiUILevelHideCancel = 32, 244 msiUILevelProgressOnly = 64, 245 msiUILevelEndDialog = 128, 246 msiUILevelSourceResOnly = 256 247 } MsiUILevel; 248 249 [ uuid(000C1090-0000-0000-C000-000000000046) ] 250 dispinterface Installer 251 { 252 properties: 253 [id(DISPID_INSTALLER_UILEVEL)] 254 MsiUILevel UILevel; 255 methods: 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)] 274 void EnableLog( 275 [in] BSTR LogMode, 276 [in] BSTR LogFile); 277 [id(DISPID_INSTALLER_INSTALLPRODUCT)] 278 void InstallProduct( 279 [in] BSTR PackagePath, 280 [in, defaultvalue("0")] BSTR PropertyValues); 281 [id(DISPID_INSTALLER_VERSION)] 282 BSTR Version(); 283 [id(DISPID_INSTALLER_LASTERRORRECORD)] 284 Record* LastErrorRecord(); 285 [id(DISPID_INSTALLER_REGISTRYVALUE), propget] 286 BSTR RegistryValue( 287 [in] VARIANT Root, 288 [in] BSTR Key, 289 [in, optional] VARIANT Value); 290 [id(DISPID_INSTALLER_ENVIRONMENT), propget] 291 BSTR Environment([in] BSTR Variable); 292 [id(DISPID_INSTALLER_ENVIRONMENT), propput] 293 void Environment( 294 [in] BSTR Variable, 295 [in] BSTR rhs); 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)] 301 BSTR FileVersion( 302 [in] BSTR FilePath, 303 [in, optional] VARIANT Language); 304 [id(DISPID_INSTALLER_PRODUCTSTATE), propget] 305 MsiInstallState ProductState( 306 [in] BSTR Product); 307 [id(DISPID_INSTALLER_PRODUCTINFO), propget] 308 BSTR ProductInfo( 309 [in] BSTR Product, 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); 316 } 317 318 [ uuid(000C1093-0000-0000-C000-000000000046) ] 319 dispinterface Record 320 { 321 properties: 322 methods: 323 [id(DISPID_RECORD_STRINGDATA), propget] 324 BSTR StringData([in] long Field); 325 [id(DISPID_RECORD_STRINGDATA), propput] 326 void StringData( 327 [in] long Field, 328 [in] BSTR rhs); 329 [id(DISPID_RECORD_INTEGERDATA), propget] 330 long IntegerData([in] long Field); 331 [id(DISPID_RECORD_INTEGERDATA), propput] 332 void IntegerData( 333 [in] long Field, 334 [in] long rhs); 335 [id(DISPID_RECORD_FIELDCOUNT), propget] 336 long FieldCount(); 337 } 338 339 [ uuid(000C1095-0000-0000-C000-000000000046) ] 340 dispinterface StringList 341 { 342 properties: 343 methods: 344 [id(DISPID_LIST__NEWENUM)] 345 IUnknown _NewEnum(); 346 [id(DISPID_LIST_ITEM), propget] 347 BSTR Item(long Index); 348 [id(DISPID_LIST_COUNT), propget] 349 long Count(); 350 } 351 352 [ uuid(000C1096-0000-0000-C000-000000000046) ] 353 dispinterface RecordList 354 { 355 properties: 356 methods: 357 } 358 359 [ uuid(000C109A-0000-0000-C000-000000000046) ] 360 dispinterface UIPreview 361 { 362 properties: 363 methods: 364 } 365 366 [ uuid(000C109B-0000-0000-C000-000000000046) ] 367 dispinterface SummaryInfo 368 { 369 properties: 370 methods: 371 [id(DISPID_SUMMARYINFO_PROPERTY), propget] 372 VARIANT Property([in] long Pid); 373 [id(DISPID_SUMMARYINFO_PROPERTY), propput] 374 void Property( 375 [in] long Pid, 376 [in] VARIANT rhs); 377 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget] 378 long PropertyCount(); 379 } 380 381 typedef enum { 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 */ 396 397 [ uuid(000C109C-0000-0000-C000-000000000046) ] 398 dispinterface View 399 { 400 properties: 401 methods: 402 [id(DISPID_VIEW_EXECUTE)] 403 void Execute([in, defaultvalue(0)] Record *Params); 404 [id(DISPID_VIEW_FETCH)] 405 Record* Fetch(); 406 [id(DISPID_VIEW_MODIFY)] 407 void Modify( 408 [in] _MsiViewModify Mode, 409 Record *Record); 410 [id(DISPID_VIEW_CLOSE)] 411 void Close(); 412 } 413 414 [ uuid(000C109D-0000-0000-C000-000000000046) ] 415 dispinterface Database 416 { 417 properties: 418 methods: 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); 423 } 424 425 typedef enum { 426 msiDoActionStatusNoAction = 0, 427 msiDoActionStatusSuccess = 1, 428 msiDoActionStatusUserExit = 2, 429 msiDoActionStatusFailure = 3, 430 msiDoActionStatusSuspend = 4, 431 msiDoActionStatusFinished = 5, 432 msiDoActionStatusWrongState = 6, 433 msiDoActionStatusBadActionData = 7 434 } MsiDoActionStatus; 435 436 typedef enum { 437 msiRunModeAdmin = 0, 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 453 } MsiRunMode; 454 455 typedef enum { 456 msiEvaluateConditionFalse = 0, 457 msiEvaluateConditionTrue = 1, 458 msiEvaluateConditionNone = 2, 459 msiEvaluateConditionError = 3 460 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */ 461 462 typedef enum { 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 472 } MsiMessageStatus; 473 474 typedef enum { 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 496 } MsiMessageType; 497 498 [ uuid(000C109E-0000-0000-C000-000000000046) ] 499 dispinterface Session 500 { 501 properties: 502 methods: 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] 508 void Property( 509 [in] BSTR Name, 510 [in] BSTR rhs); 511 [id(DISPID_SESSION_LANGUAGE), propget] 512 long Language(); 513 [id(DISPID_SESSION_MODE), propget] 514 VARIANT_BOOL Mode([in] MsiRunMode Flag); 515 [id(DISPID_SESSION_MODE), propput] 516 void Mode( 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( 535 [in] BSTR Feature, 536 [in] MsiInstallState rhs); 537 [id(DISPID_SESSION_SETINSTALLLEVEL)] 538 void SetInstallLevel([in] long Level); 539 } 540 541 [ uuid(000C109F-0000-0000-C000-000000000046) ] 542 dispinterface FeatureInfo 543 { 544 properties: 545 methods: 546 } 547 548 [ uuid(000C10A0-0000-0000-C000-000000000046) ] 549 dispinterface Product 550 { 551 properties: 552 methods: 553 } 554 555 [ uuid(000C10A1-0000-0000-C000-000000000046) ] 556 dispinterface Patch 557 { 558 properties: 559 methods: 560 } 561} 562