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 30[ 31 uuid(000c101c-0000-0000-c000-000000000046), 32 oleautomation, 33 object 34] 35interface IMsiServer : IUnknown 36{ 37 /* FIXME: methods */ 38} 39 40[ 41 uuid(000c101d-0000-0000-c000-000000000046), 42 oleautomation, 43 object 44] 45interface IMsiMessage : IUnknown 46{ 47 /* FIXME: methods */ 48} 49 50[ 51 uuid(000c1025-0000-0000-c000-000000000046), 52 oleautomation, 53 object 54] 55interface IMsiCustomAction : IUnknown 56{ 57 /* FIXME: methods */ 58} 59 60[ 61 uuid(000c1033-0000-0000-c000-000000000046), 62 oleautomation, 63 object 64] 65interface IMsiRemoteAPI : IUnknown 66{ 67 /* FIXME: methods */ 68} 69 70[ 71 helpstring("Msi install server"), 72 progid("IMsiServer"), 73 uuid(000c101c-0000-0000-c000-000000000046) 74] 75coclass MsiServer { interface IMsiServer; } 76 77[ 78 helpstring("Microsoft Windows Installer Message RPC"), 79 progid("WindowsInstaller.Message"), 80 uuid(000c101d-0000-0000-c000-000000000046) 81] 82coclass MsiServerMessage { interface IMsiMessage; } 83 84[ 85 threading(both), 86 uuid(000c103e-0000-0000-c000-000000000046) 87] 88coclass PSFactoryBuffer { interface IPSFactoryBuffer; } 89 90[ 91 helpstring("Microsoft Windows Installer"), 92 threading(apartment), 93 progid("WindowsInstaller.Installer"), 94 uuid(000c1090-0000-0000-c000-000000000046) 95] 96coclass MsiInstaller { interface Installer; } 97 98[ 99 uuid(000c1082-0000-0000-c000-000000000046) 100] 101coclass MsiTransform { } 102 103[ 104 uuid(000c1084-0000-0000-c000-000000000046) 105] 106coclass MsiDatabase { } 107 108[ 109 uuid(000c1086-0000-0000-c000-000000000046) 110] 111coclass MsiPatch { } 112 113[ 114 threading(apartment), 115 uuid(000c1094-0000-0000-c000-000000000046) 116] 117/* FIXME: unidentified class */ 118coclass MsiServerX3 { interface IMsiServer; } 119 120[ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ] 121library WindowsInstaller 122{ 123 dispinterface Installer; 124 dispinterface Record; 125 dispinterface Session; 126 dispinterface Database; 127 dispinterface SummaryInfo; 128 dispinterface View; 129 dispinterface UIPreview; 130 dispinterface FeatureInfo; 131 dispinterface RecordList; 132 dispinterface StringList; 133 dispinterface Product; 134 dispinterface Patch; 135 136 typedef enum { 137 msiInstallStateNotUsed = -7, 138 msiInstallStateBadConfig = -6, 139 msiInstallStateIncomplete = -5, 140 msiInstallStateSourceAbsent = -4, 141 msiInstallStateInvalidArg = -2, 142 msiInstallStateUnknown = -1, 143 msiInstallStateBroken = 0, 144 msiInstallStateAdvertised = 1, 145 msiInstallStateRemoved = 1, 146 msiInstallStateAbsent = 2, 147 msiInstallStateLocal = 3, 148 msiInstallStateSource = 4, 149 msiInstallStateDefault = 5 150 } MsiInstallState; 151 152 typedef enum { 153 msiOpenDatabaseModeReadOnly = 0, 154 msiOpenDatabaseModeTransact = 1, 155 msiOpenDatabaseModeDirect = 2, 156 msiOpenDatabaseModeCreate = 3, 157 msiOpenDatabaseModeCreateDirect = 4, 158 msiOpenDatabaseModePatchFile = 32 159 } MsiOpenDatabaseMode; 160 161 typedef enum { 162 msiUILevelNoChange = 0, 163 msiUILevelDefault = 1, 164 msiUILevelNone = 2, 165 msiUILevelBasic = 3, 166 msiUILevelReduced = 4, 167 msiUILevelFull = 5, 168 msiUILevelHideCancel = 32, 169 msiUILevelProgressOnly = 64, 170 msiUILevelEndDialog = 128, 171 msiUILevelSourceResOnly = 256 172 } MsiUILevel; 173 174 [ uuid(000C1090-0000-0000-C000-000000000046) ] 175 dispinterface Installer 176 { 177 properties: 178 [id(DISPID_INSTALLER_UILEVEL)] 179 MsiUILevel UILevel; 180 methods: 181 [id(DISPID_INSTALLER_CREATERECORD)] 182 Record *CreateRecord([in] long Count); 183 [id(DISPID_INSTALLER_OPENPACKAGE)] 184 Session* OpenPackage( 185 [in] VARIANT PackagePath, 186 [in, defaultvalue(0)] long Options); 187 [id(DISPID_INSTALLER_OPENPRODUCT)] 188 Session* OpenProduct( 189 [in] BSTR ProductCode); 190 [id(DISPID_INSTALLER_SUMMARYINFORMATION)] 191 SummaryInfo* SummaryInformation( 192 [in] BSTR PackagePath, 193 [in, defaultvalue(0)] long UpdateCount); 194 [id(DISPID_INSTALLER_OPENDATABASE)] 195 Database *OpenDatabase( 196 [in] BSTR DatabasePath, 197 [in] VARIANT OpenMode); 198 [id(DISPID_INSTALLER_ENABLELOG)] 199 void EnableLog( 200 [in] BSTR LogMode, 201 [in] BSTR LogFile); 202 [id(DISPID_INSTALLER_INSTALLPRODUCT)] 203 void InstallProduct( 204 [in] BSTR PackagePath, 205 [in, defaultvalue("0")] BSTR PropertyValues); 206 [id(DISPID_INSTALLER_VERSION)] 207 BSTR Version(); 208 [id(DISPID_INSTALLER_LASTERRORRECORD)] 209 Record* LastErrorRecord(); 210 [id(DISPID_INSTALLER_REGISTRYVALUE), propget] 211 BSTR RegistryValue( 212 [in] VARIANT Root, 213 [in] BSTR Key, 214 [in, optional] VARIANT Value); 215 [id(DISPID_INSTALLER_ENVIRONMENT), propget] 216 BSTR Environment([in] BSTR Variable); 217 [id(DISPID_INSTALLER_ENVIRONMENT), propput] 218 void Environment( 219 [in] BSTR Variable, 220 [in] BSTR rhs); 221 [id(DISPID_INSTALLER_FILEATTRIBUTES)] 222 long FileAttributes([in] BSTR FilePath); 223 [id(DISPID_INSTALLER_FILESIZE)] 224 long FileSize([in] BSTR FilePath); 225 [id(DISPID_INSTALLER_FILEVERSION)] 226 BSTR FileVersion( 227 [in] BSTR FilePath, 228 [in, optional] VARIANT Language); 229 [id(DISPID_INSTALLER_PRODUCTSTATE), propget] 230 MsiInstallState ProductState( 231 [in] BSTR Product); 232 [id(DISPID_INSTALLER_PRODUCTINFO), propget] 233 BSTR ProductInfo( 234 [in] BSTR Product, 235 [in] BSTR Attribute); 236 [id(DISPID_INSTALLER_PRODUCTS), propget] 237 StringList *Products(); 238 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget] 239 StringList *RelatedProducts( 240 [in] BSTR UpgradeCode); 241 } 242 243 [ uuid(000C1093-0000-0000-C000-000000000046) ] 244 dispinterface Record 245 { 246 properties: 247 methods: 248 [id(DISPID_RECORD_STRINGDATA), propget] 249 BSTR StringData([in] long Field); 250 [id(DISPID_RECORD_STRINGDATA), propput] 251 void StringData( 252 [in] long Field, 253 [in] BSTR rhs); 254 [id(DISPID_RECORD_INTEGERDATA), propget] 255 long IntegerData([in] long Field); 256 [id(DISPID_RECORD_INTEGERDATA), propput] 257 void IntegerData( 258 [in] long Field, 259 [in] long rhs); 260 [id(DISPID_RECORD_FIELDCOUNT), propget] 261 long FieldCount(); 262 } 263 264 [ uuid(000C1095-0000-0000-C000-000000000046) ] 265 dispinterface StringList 266 { 267 properties: 268 methods: 269 [id(DISPID_LIST__NEWENUM)] 270 IUnknown _NewEnum(); 271 [id(DISPID_LIST_ITEM), propget] 272 BSTR Item(long Index); 273 [id(DISPID_LIST_COUNT), propget] 274 long Count(); 275 } 276 277 [ uuid(000C1096-0000-0000-C000-000000000046) ] 278 dispinterface RecordList 279 { 280 properties: 281 methods: 282 } 283 284 [ uuid(000C109A-0000-0000-C000-000000000046) ] 285 dispinterface UIPreview 286 { 287 properties: 288 methods: 289 } 290 291 [ uuid(000C109B-0000-0000-C000-000000000046) ] 292 dispinterface SummaryInfo 293 { 294 properties: 295 methods: 296 [id(DISPID_SUMMARYINFO_PROPERTY), propget] 297 VARIANT Property([in] long Pid); 298 [id(DISPID_SUMMARYINFO_PROPERTY), propput] 299 void Property( 300 [in] long Pid, 301 [in] VARIANT rhs); 302 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget] 303 long PropertyCount(); 304 } 305 306 typedef enum { 307 msiViewModifySeek = -1, 308 msiViewModifyRefresh = 0, 309 msiViewModifyInsert = 1, 310 msiViewModifyUpdate = 2, 311 msiViewModifyAssign = 3, 312 msiViewModifyReplace = 4, 313 msiViewModifyMerge = 5, 314 msiViewModifyDelete = 6, 315 msiViewModifyInsertTemporary = 7, 316 msiViewModifyValidate = 8, 317 msiViewModifyValidateNew = 9, 318 msiViewModifyValidateField = 10, 319 msiViewModifyValidateDelete = 11, 320 } _MsiViewModify; /* Added underscore to avoid conflict with function name */ 321 322 [ uuid(000C109C-0000-0000-C000-000000000046) ] 323 dispinterface View 324 { 325 properties: 326 methods: 327 [id(DISPID_VIEW_EXECUTE)] 328 void Execute([in, defaultvalue(0)] Record *Params); 329 [id(DISPID_VIEW_FETCH)] 330 Record* Fetch(); 331 [id(DISPID_VIEW_MODIFY)] 332 void Modify( 333 [in] _MsiViewModify Mode, 334 Record *Record); 335 [id(DISPID_VIEW_CLOSE)] 336 void Close(); 337 } 338 339 [ uuid(000C109D-0000-0000-C000-000000000046) ] 340 dispinterface Database 341 { 342 properties: 343 methods: 344 [id(DISPID_DATABASE_OPENVIEW)] 345 View* OpenView([in] BSTR Sql); 346 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget] 347 SummaryInfo *SummaryInformation([in, defaultvalue(0)] long UpdateCount); 348 } 349 350 typedef enum { 351 msiDoActionStatusNoAction = 0, 352 msiDoActionStatusSuccess = 1, 353 msiDoActionStatusUserExit = 2, 354 msiDoActionStatusFailure = 3, 355 msiDoActionStatusSuspend = 4, 356 msiDoActionStatusFinished = 5, 357 msiDoActionStatusWrongState = 6, 358 msiDoActionStatusBadActionData = 7 359 } MsiDoActionStatus; 360 361 typedef enum { 362 msiRunModeAdmin = 0, 363 msiRunModeAdvertise = 1, 364 msiRunModeMaintenance = 2, 365 msiRunModeRollbackEnabled = 3, 366 msiRunModeLogEnabled = 4, 367 msiRunModeOperations = 5, 368 msiRunModeRebootAtEnd = 6, 369 msiRunModeRebootNow = 7, 370 msiRunModeCabinet = 8, 371 msiRunModeSourceShortNames = 9, 372 msiRunModeTargetShortNames = 10, 373 msiRunModeWindows9x = 12, 374 msiRunModeZawEnabled = 13, 375 msiRunModeScheduled = 16, 376 msiRunModeRollback = 17, 377 msiRunModeCommit = 18 378 } MsiRunMode; 379 380 typedef enum { 381 msiEvaluateConditionFalse = 0, 382 msiEvaluateConditionTrue = 1, 383 msiEvaluateConditionNone = 2, 384 msiEvaluateConditionError = 3 385 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */ 386 387 typedef enum { 388 msiMessageStatusError = -1, 389 msiMessageStatusNone = 0, 390 msiMessageStatusOk = 1, 391 msiMessageStatusCancel = 2, 392 msiMessageStatusAbort = 3, 393 msiMessageStatusRetry = 4, 394 msiMessageStatusIgnore = 5, 395 msiMessageStatusYes = 6, 396 msiMessageStatusNo = 7 397 } MsiMessageStatus; 398 399 typedef enum { 400 msiMessageTypeFatalExit = 0, 401 msiMessageTypeError = 0x01000000, 402 msiMessageTypeWarning = 0x02000000, 403 msiMessageTypeUser = 0x03000000, 404 msiMessageTypeInfo = 0x04000000, 405 msiMessageTypeFilesInUse = 0x05000000, 406 msiMessageTypeResolveSource = 0x06000000, 407 msiMessageTypeOutOfDiskSpace = 0x07000000, 408 msiMessageTypeActionStart = 0x08000000, 409 msiMessageTypeActionData = 0x09000000, 410 msiMessageTypeProgress = 0x0a000000, 411 msiMessageTypeCommonData = 0x0b000000, 412 msiMessageTypeOk = 0, 413 msiMessageTypeOkCancel = 1, 414 msiMessageTypeAbortRetryIgnore = 2, 415 msiMessageTypeYesNoCancel = 3, 416 msiMessageTypeYesNo = 4, 417 msiMessageTypeRetryCancel = 5, 418 msiMessageTypeDefault1 = 0, 419 msiMessageTypeDefault2 = 256, 420 msiMessageTypeDefault3 = 512 421 } MsiMessageType; 422 423 [ uuid(000C109E-0000-0000-C000-000000000046) ] 424 dispinterface Session 425 { 426 properties: 427 methods: 428 [id(DISPID_SESSION_INSTALLER), propget] 429 Installer *Installer(); 430 [id(DISPID_SESSION_PROPERTY), propget] 431 BSTR Property([in] BSTR Name); 432 [id(DISPID_SESSION_PROPERTY), propput] 433 void Property( 434 [in] BSTR Name, 435 [in] BSTR rhs); 436 [id(DISPID_SESSION_LANGUAGE), propget] 437 long Language(); 438 [id(DISPID_SESSION_MODE), propget] 439 VARIANT_BOOL Mode([in] MsiRunMode Flag); 440 [id(DISPID_SESSION_MODE), propput] 441 void Mode( 442 [in] MsiRunMode Flag, 443 [in] VARIANT_BOOL rhs); 444 [id(DISPID_SESSION_DATABASE), propget] 445 Database* Database(); 446 [id(DISPID_SESSION_DOACTION)] 447 MsiDoActionStatus DoAction([in] BSTR Action); 448 [id(DISPID_SESSION_EVALUATECONDITION)] 449 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression); 450 [id(DISPID_SESSION_MESSAGE)] 451 MsiMessageStatus Message( 452 [in] MsiMessageType Kind, 453 [in] Record *Record); 454 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget] 455 MsiInstallState FeatureCurrentState([in] BSTR Feature); 456 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget] 457 MsiInstallState FeatureRequestState([in] BSTR Feature); 458 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput] 459 void FeatureRequestState( 460 [in] BSTR Feature, 461 [in] MsiInstallState rhs); 462 [id(DISPID_SESSION_SETINSTALLLEVEL)] 463 void SetInstallLevel([in] long Level); 464 } 465 466 [ uuid(000C109F-0000-0000-C000-000000000046) ] 467 dispinterface FeatureInfo 468 { 469 properties: 470 methods: 471 } 472 473 [ uuid(000C10A0-0000-0000-C000-000000000046) ] 474 dispinterface Product 475 { 476 properties: 477 methods: 478 } 479 480 [ uuid(000C10A1-0000-0000-C000-000000000046) ] 481 dispinterface Patch 482 { 483 properties: 484 methods: 485 } 486} 487