forked from jeffkl/ManagedDism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dismapi.h
862 lines (746 loc) · 21.3 KB
/
dismapi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
/****************************************************************************\
DismApi.H
Copyright (c) Microsoft Corporation.
All rights reserved.
\****************************************************************************/
#ifndef _DISMAPI_H_
#define _DISMAPI_H_
#include <winapifamily.h>
#pragma region Desktop Family or DISM Package
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PKG_DISM)
#ifdef __cplusplus
extern "C"
{
#endif
//////////////////////////////////////////////////////////////////////////////
//
// Typedefs
//
//////////////////////////////////////////////////////////////////////////////
typedef UINT DismSession;
//////////////////////////////////////////////////////////////////////////////
//
// Callbacks
//
//////////////////////////////////////////////////////////////////////////////
typedef void(CALLBACK* DISM_PROGRESS_CALLBACK)(_In_ UINT Current, _In_ UINT Total, _In_opt_ PVOID UserData);
//////////////////////////////////////////////////////////////////////////////
//
// Constants
//
//////////////////////////////////////////////////////////////////////////////
#define DISM_ONLINE_IMAGE L"DISM_{53BFAE52-B167-4E2F-A258-0A37B57FF845}"
#define DISM_SESSION_DEFAULT 0
// Mount flags
#define DISM_MOUNT_READWRITE 0x00000000
#define DISM_MOUNT_READONLY 0x00000001
#define DISM_MOUNT_OPTIMIZE 0x00000002
#define DISM_MOUNT_CHECK_INTEGRITY 0x00000004
#define DISM_MOUNT_SUPPORT_EA 0x00000008
// Unmount flags
#define DISM_COMMIT_IMAGE 0x00000000
#define DISM_DISCARD_IMAGE 0x00000001
// Commit flags
#define DISM_COMMIT_GENERATE_INTEGRITY 0x00010000
#define DISM_COMMIT_APPEND 0x00020000
#define DISM_COMMIT_SUPPORT_EA 0x00040000
// Commit flags may also be used with unmount. AND this with unmount flags and you will
// get the commit-specific flags.
#define DISM_COMMIT_MASK 0xffff0000
// Reserved storage state flags
#define DISM_RESERVED_STORAGE_DISABLED 0x00000000
#define DISM_RESERVED_STORAGE_ENABLED 0x00000001
//////////////////////////////////////////////////////////////////////////////
//
// Enums
//
//////////////////////////////////////////////////////////////////////////////
typedef enum _DismLogLevel
{
DismLogErrors = 0,
DismLogErrorsWarnings,
DismLogErrorsWarningsInfo
} DismLogLevel;
typedef enum _DismImageIdentifier
{
DismImageIndex = 0,
DismImageName
} DismImageIdentifier;
typedef enum _DismMountMode
{
DismReadWrite = 0,
DismReadOnly
} DismMountMode;
typedef enum _DismImageType
{
DismImageTypeUnsupported = -1,
DismImageTypeWim = 0,
DismImageTypeVhd = 1
} DismImageType;
typedef enum _DismImageBootable
{
DismImageBootableYes = 0,
DismImageBootableNo,
DismImageBootableUnknown
} DismImageBootable;
typedef enum _DismMountStatus
{
DismMountStatusOk = 0,
DismMountStatusNeedsRemount,
DismMountStatusInvalid
} DismMountStatus;
typedef enum _DismImageHealthState
{
DismImageHealthy = 0,
DismImageRepairable,
DismImageNonRepairable
} DismImageHealthState;
typedef enum _DismPackageIdentifier
{
DismPackageNone = 0,
DismPackageName,
DismPackagePath
} DismPackageIdentifier;
typedef enum _DismPackageFeatureState
{
DismStateNotPresent = 0,
DismStateUninstallPending,
DismStateStaged,
DismStateResolved, // For internal use only
DismStateRemoved = DismStateResolved,
DismStateInstalled,
DismStateInstallPending,
DismStateSuperseded,
DismStatePartiallyInstalled
} DismPackageFeatureState;
typedef enum _DismReleaseType
{
DismReleaseTypeCriticalUpdate = 0,
DismReleaseTypeDriver,
DismReleaseTypeFeaturePack,
DismReleaseTypeHotfix,
DismReleaseTypeSecurityUpdate,
DismReleaseTypeSoftwareUpdate,
DismReleaseTypeUpdate,
DismReleaseTypeUpdateRollup,
DismReleaseTypeLanguagePack,
DismReleaseTypeFoundation,
DismReleaseTypeServicePack,
DismReleaseTypeProduct,
DismReleaseTypeLocalPack,
DismReleaseTypeOther,
DismReleaseTypeOnDemandPack
} DismReleaseType;
typedef enum _DismRestartType
{
DismRestartNo = 0,
DismRestartPossible,
DismRestartRequired
} DismRestartType;
typedef enum _DismDriverSignature
{
DismDriverSignatureUnknown = 0,
DismDriverSignatureUnsigned = 1,
DismDriverSignatureSigned = 2
} DismDriverSignature;
typedef enum _DismFullyOfflineInstallableType
{
DismFullyOfflineInstallable = 0,
DismFullyOfflineNotInstallable,
DismFullyOfflineInstallableUndetermined
} DismFullyOfflineInstallableType;
// Keep in-sync with StubPackageOption defined in onecore\base\ntsetup\opktools\dism\idl\AppxProviderInterfaces.idl.
// Need to redefine it here because the consumers of this header cannot import dismcore.tlb, where all DISM IDLs are
// built into.
typedef enum _DismStubPackageOption
{
DismStubPackageOptionNone = 0,
DismStubPackageOptionInstallFull = 1,
DismStubPackageOptionInstallStub = 2,
} DismStubPackageOption;
//////////////////////////////////////////////////////////////////////////////
//
// Structs
//
//////////////////////////////////////////////////////////////////////////////
#pragma pack(push, 1)
typedef struct _DismPackage
{
PCWSTR PackageName;
DismPackageFeatureState PackageState;
DismReleaseType ReleaseType;
SYSTEMTIME InstallTime;
} DismPackage;
typedef struct _DismCustomProperty
{
PCWSTR Name;
PCWSTR Value;
PCWSTR Path;
} DismCustomProperty;
typedef struct _DismFeature
{
PCWSTR FeatureName;
DismPackageFeatureState State;
} DismFeature;
typedef struct _DismCapability
{
PCWSTR Name;
DismPackageFeatureState State;
} DismCapability;
typedef struct _DismPackageInfo
{
PCWSTR PackageName;
DismPackageFeatureState PackageState;
DismReleaseType ReleaseType;
SYSTEMTIME InstallTime;
BOOL Applicable;
PCWSTR Copyright;
PCWSTR Company;
SYSTEMTIME CreationTime;
PCWSTR DisplayName;
PCWSTR Description;
PCWSTR InstallClient;
PCWSTR InstallPackageName;
SYSTEMTIME LastUpdateTime;
PCWSTR ProductName;
PCWSTR ProductVersion;
DismRestartType RestartRequired;
DismFullyOfflineInstallableType FullyOffline;
PCWSTR SupportInformation;
DismCustomProperty* CustomProperty;
UINT CustomPropertyCount;
DismFeature* Feature;
UINT FeatureCount;
} DismPackageInfo;
#ifdef __cplusplus
typedef struct _DismPackageInfoEx : public _DismPackageInfo
{
#else
typedef struct _DismPackageInfoEx
{
DismPackageInfo;
#endif
PCWSTR CapabilityId;
} DismPackageInfoEx;
typedef struct _DismFeatureInfo
{
PCWSTR FeatureName;
DismPackageFeatureState FeatureState;
PCWSTR DisplayName;
PCWSTR Description;
DismRestartType RestartRequired;
DismCustomProperty* CustomProperty;
UINT CustomPropertyCount;
} DismFeatureInfo;
typedef struct _DismCapabilityInfo
{
PCWSTR Name;
DismPackageFeatureState State;
PCWSTR DisplayName;
PCWSTR Description;
DWORD DownloadSize;
DWORD InstallSize;
} DismCapabilityInfo;
typedef struct _DismString
{
PCWSTR Value;
} DismString;
typedef DismString DismLanguage;
typedef struct _DismWimCustomizedInfo
{
UINT Size;
UINT DirectoryCount;
UINT FileCount;
SYSTEMTIME CreatedTime;
SYSTEMTIME ModifiedTime;
} DismWimCustomizedInfo;
typedef struct _DismImageInfo
{
DismImageType ImageType;
UINT ImageIndex;
PCWSTR ImageName;
PCWSTR ImageDescription;
UINT64 ImageSize;
UINT Architecture;
PCWSTR ProductName;
PCWSTR EditionId;
PCWSTR InstallationType;
PCWSTR Hal;
PCWSTR ProductType;
PCWSTR ProductSuite;
UINT MajorVersion;
UINT MinorVersion;
UINT Build;
UINT SpBuild;
UINT SpLevel;
DismImageBootable Bootable;
PCWSTR SystemRoot;
DismLanguage* Language;
UINT LanguageCount;
UINT DefaultLanguageIndex;
VOID* CustomizedInfo;
} DismImageInfo;
typedef struct _DismMountedImageInfo
{
PCWSTR MountPath;
PCWSTR ImageFilePath;
UINT ImageIndex;
DismMountMode MountMode;
DismMountStatus MountStatus;
} DismMountedImageInfo;
typedef struct _DismDriverPackage
{
PCWSTR PublishedName;
PCWSTR OriginalFileName;
BOOL InBox;
PCWSTR CatalogFile;
PCWSTR ClassName;
PCWSTR ClassGuid;
PCWSTR ClassDescription;
BOOL BootCritical;
DismDriverSignature DriverSignature;
PCWSTR ProviderName;
SYSTEMTIME Date;
UINT MajorVersion;
UINT MinorVersion;
UINT Build;
UINT Revision;
} DismDriverPackage;
typedef struct _DismDriver
{
PCWSTR ManufacturerName;
PCWSTR HardwareDescription;
PCWSTR HardwareId;
UINT Architecture;
PCWSTR ServiceName;
PCWSTR CompatibleIds;
PCWSTR ExcludeIds;
} DismDriver;
typedef struct _DismAppxPackage
{
PCWSTR PackageName;
PCWSTR DisplayName;
PCWSTR PublisherId;
UINT MajorVersion;
UINT MinorVersion;
UINT Build;
UINT RevisionNumber;
UINT Architecture;
PCWSTR ResourceId;
PCWSTR InstallLocation;
_Maybenull_ PCWSTR Region;
} DismAppxPackage;
#pragma pack(pop)
//////////////////////////////////////////////////////////////////////////////
//
// Functions
//
//////////////////////////////////////////////////////////////////////////////
HRESULT WINAPI
DismInitialize(
_In_ DismLogLevel LogLevel,
_In_opt_ PCWSTR LogFilePath,
_In_opt_ PCWSTR ScratchDirectory);
HRESULT WINAPI
DismShutdown();
HRESULT WINAPI
DismMountImage(
_In_ PCWSTR ImageFilePath,
_In_ PCWSTR MountPath,
_In_ UINT ImageIndex,
_In_opt_ PCWSTR ImageName,
_In_ DismImageIdentifier ImageIdentifier,
_In_ DWORD Flags,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismUnmountImage(
_In_ PCWSTR MountPath,
_In_ DWORD Flags,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismOpenSession(
_In_ PCWSTR ImagePath,
_In_opt_ PCWSTR WindowsDirectory,
_In_opt_ PCWSTR SystemDrive,
_Out_ DismSession* Session);
HRESULT WINAPI
DismCloseSession(
_In_ DismSession Session);
HRESULT WINAPI
DismGetLastErrorMessage(
_Out_ DismString** ErrorMessage);
HRESULT WINAPI
DismRemountImage(
_In_ PCWSTR MountPath);
HRESULT WINAPI
DismCommitImage(
_In_ DismSession Session,
_In_ DWORD Flags,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismGetImageInfo(
_In_ PCWSTR ImageFilePath,
_Outptr_result_buffer_(*Count) DismImageInfo** ImageInfo,
_Out_ UINT* Count);
HRESULT WINAPI
DismGetMountedImageInfo(
_Outptr_result_buffer_(*Count) DismMountedImageInfo** MountedImageInfo,
_Out_ UINT* Count);
HRESULT WINAPI
DismCleanupMountpoints();
HRESULT WINAPI
DismCheckImageHealth(
_In_ DismSession Session,
_In_ BOOL ScanImage,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData,
_Out_ DismImageHealthState* ImageHealth);
HRESULT WINAPI
DismRestoreImageHealth(
_In_ DismSession Session,
_In_reads_opt_(SourcePathCount) PCWSTR* SourcePaths,
_In_opt_ UINT SourcePathCount,
_In_ BOOL LimitAccess,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismDelete(
_In_ VOID* DismStructure);
HRESULT WINAPI
DismAddPackage(
_In_ DismSession Session,
_In_ PCWSTR PackagePath,
_In_ BOOL IgnoreCheck,
_In_ BOOL PreventPending,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismRemovePackage(
_In_ DismSession Session,
_In_ PCWSTR Identifier,
_In_ DismPackageIdentifier PackageIdentifier,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismEnableFeature(
_In_ DismSession Session,
_In_ PCWSTR FeatureName,
_In_opt_ PCWSTR Identifier,
_In_opt_ DismPackageIdentifier PackageIdentifier,
_In_ BOOL LimitAccess,
_In_reads_opt_(SourcePathCount) PCWSTR* SourcePaths,
_In_opt_ UINT SourcePathCount,
_In_ BOOL EnableAll,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismDisableFeature(
_In_ DismSession Session,
_In_ PCWSTR FeatureName,
_In_opt_ PCWSTR PackageName,
_In_ BOOL RemovePayload,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismGetPackages(
_In_ DismSession Session,
_Outptr_result_buffer_(*Count) DismPackage** Package,
_Out_ UINT* Count);
HRESULT WINAPI
DismGetPackageInfo(
_In_ DismSession Session,
_In_ PCWSTR Identifier,
_In_ DismPackageIdentifier PackageIdentifier,
_Out_ DismPackageInfo** PackageInfo);
HRESULT WINAPI
DismGetPackageInfoEx(
_In_ DismSession Session,
_In_ PCWSTR Identifier,
_In_ DismPackageIdentifier PackageIdentifier,
_Out_ DismPackageInfoEx** PackageInfoEx);
HRESULT WINAPI
DismGetFeatures(
_In_ DismSession Session,
_In_opt_ PCWSTR Identifier,
_In_opt_ DismPackageIdentifier PackageIdentifier,
_Outptr_result_buffer_(*Count) DismFeature** Feature,
_Out_ UINT* Count);
HRESULT WINAPI
DismGetFeatureInfo(
_In_ DismSession Session,
_In_ PCWSTR FeatureName,
_In_opt_ PCWSTR Identifier,
_In_opt_ DismPackageIdentifier PackageIdentifier,
_Out_ DismFeatureInfo** FeatureInfo);
HRESULT WINAPI
DismGetFeatureParent(
_In_ DismSession Session,
_In_ PCWSTR FeatureName,
_In_opt_ PCWSTR Identifier,
_In_opt_ DismPackageIdentifier PackageIdentifier,
_Outptr_result_buffer_(*Count) DismFeature** Feature,
_Out_ UINT* Count);
HRESULT WINAPI
DismApplyUnattend(
_In_ DismSession Session,
_In_ PCWSTR UnattendFile,
_In_ BOOL SingleSession);
HRESULT WINAPI
DismAddDriver(
_In_ DismSession Session,
_In_ PCWSTR DriverPath,
_In_ BOOL ForceUnsigned);
HRESULT WINAPI
DismRemoveDriver(
_In_ DismSession Session,
_In_ PCWSTR DriverPath);
HRESULT WINAPI
DismGetDrivers(
_In_ DismSession Session,
_In_ BOOL AllDrivers,
_Outptr_result_buffer_(*Count) DismDriverPackage** DriverPackage,
_Out_ UINT* Count);
HRESULT WINAPI
DismGetDriverInfo(
_In_ DismSession Session,
_In_ PCWSTR DriverPath,
_Outptr_result_buffer_(*Count) DismDriver** Driver,
_Out_ UINT* Count,
_Out_opt_ DismDriverPackage** DriverPackage);
HRESULT WINAPI
DismGetCapabilities(
_In_ DismSession Session,
_Outptr_result_buffer_(*Count) DismCapability** Capability,
_Out_ UINT* Count);
HRESULT WINAPI
DismGetCapabilityInfo(
_In_ DismSession Session,
_In_ PCWSTR Name,
_Out_ DismCapabilityInfo** Info);
HRESULT WINAPI
DismAddCapability(
_In_ DismSession Session,
_In_ PCWSTR Name,
_In_ BOOL LimitAccess,
_In_reads_opt_(SourcePathCount) PCWSTR* SourcePaths,
_In_opt_ UINT SourcePathCount,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismRemoveCapability(
_In_ DismSession Session,
_In_ PCWSTR Name,
_In_opt_ HANDLE CancelEvent,
_In_opt_ DISM_PROGRESS_CALLBACK Progress,
_In_opt_ PVOID UserData);
HRESULT WINAPI
DismGetReservedStorageState(
_In_ DismSession Session,
_Out_ PDWORD State);
HRESULT WINAPI
DismSetReservedStorageState(
_In_ DismSession Session,
_In_ DWORD State);
HRESULT WINAPI
_DismGetProvisionedAppxPackages(
DismSession Session,
_Outptr_result_buffer_(*Count) DismAppxPackage** Package,
_Out_ UINT* Count);
HRESULT WINAPI
_DismAddProvisionedAppxPackage(
_In_ DismSession Session,
_In_ PCWSTR AppPath,
_In_reads_opt_(DependencyPackageCount) PCWSTR* DependencyPackages,
_In_ UINT DependencyPackageCount,
_In_reads_opt_(OptionalPackageCount) PCWSTR* OptionalPackages,
_In_ UINT OptionalPackageCount,
_In_reads_opt_(LicensePathCount) PCWSTR* LicensePaths,
_In_ UINT LicensePathCount,
_In_ BOOL SkipLicense,
_In_opt_ PCWSTR CustomDataPath,
_In_opt_ PCWSTR Region,
_In_ DismStubPackageOption stubPackageOption);
HRESULT WINAPI
_DismRemoveProvisionedAppxPackage(
_In_ DismSession Session,
_In_ PCWSTR PackageName);
//////////////////////////////////////////////////////////////////////////////
//
// Success Codes
//
//////////////////////////////////////////////////////////////////////////////
// For online scenario, computer needs to be restarted when the return value is ERROR_SUCCESS_REBOOT_REQUIRED (3010L).
//
// MessageId: DISMAPI_S_RELOAD_IMAGE_SESSION_REQUIRED
//
// MessageText:
//
// The DISM session needs to be reloaded.
//
#define DISMAPI_S_RELOAD_IMAGE_SESSION_REQUIRED 0x00000001
//////////////////////////////////////////////////////////////////////////////
//
// Error Codes
//
//////////////////////////////////////////////////////////////////////////////
//
// MessageId: DISMAPI_E_DISMAPI_NOT_INITIALIZED
//
// MessageText:
//
// DISM API was not initialized for this process
//
#define DISMAPI_E_DISMAPI_NOT_INITIALIZED 0xC0040001
//
// MessageId: DISMAPI_E_SHUTDOWN_IN_PROGRESS
//
// MessageText:
//
// A DismSession was being shutdown when another operation was called on it
//
#define DISMAPI_E_SHUTDOWN_IN_PROGRESS 0xC0040002
//
// MessageId: DISMAPI_E_OPEN_SESSION_HANDLES
//
// MessageText:
//
// A DismShutdown was called while there were open DismSession handles
//
#define DISMAPI_E_OPEN_SESSION_HANDLES 0xC0040003
//
// MessageId: DISMAPI_E_INVALID_DISM_SESSION
//
// MessageText:
//
// An invalid DismSession handle was passed into a DISMAPI function
//
#define DISMAPI_E_INVALID_DISM_SESSION 0xC0040004
//
// MessageId: DISMAPI_E_INVALID_IMAGE_INDEX
//
// MessageText:
//
// An invalid image index was specified
//
#define DISMAPI_E_INVALID_IMAGE_INDEX 0xC0040005
//
// MessageId: DISMAPI_E_INVALID_IMAGE_NAME
//
// MessageText:
//
// An invalid image name was specified
//
#define DISMAPI_E_INVALID_IMAGE_NAME 0xC0040006
//
// MessageId: DISMAPI_E_UNABLE_TO_UNMOUNT_IMAGE_PATH
//
// MessageText:
//
// An image that is not a mounted WIM or mounted VHD was attempted to be unmounted
//
#define DISMAPI_E_UNABLE_TO_UNMOUNT_IMAGE_PATH 0xC0040007
//
// MessageId: DISMAPI_E_LOGGING_DISABLED
//
// MessageText:
//
// Failed to gain access to the log file user specified. Logging has been disabled..
//
#define DISMAPI_E_LOGGING_DISABLED 0xC0040009
//
// MessageId: DISMAPI_E_OPEN_HANDLES_UNABLE_TO_UNMOUNT_IMAGE_PATH
//
// MessageText:
//
// A DismSession with open handles was attempted to be unmounted
//
#define DISMAPI_E_OPEN_HANDLES_UNABLE_TO_UNMOUNT_IMAGE_PATH 0xC004000A
//
// MessageId: DISMAPI_E_OPEN_HANDLES_UNABLE_TO_MOUNT_IMAGE_PATH
//
// MessageText:
//
// A DismSession with open handles was attempted to be mounted
//
#define DISMAPI_E_OPEN_HANDLES_UNABLE_TO_MOUNT_IMAGE_PATH 0xC004000B
//
// MessageId: DISMAPI_E_OPEN_HANDLES_UNABLE_TO_REMOUNT_IMAGE_PATH
//
// MessageText:
//
// A DismSession with open handles was attempted to be remounted
//
#define DISMAPI_E_OPEN_HANDLES_UNABLE_TO_REMOUNT_IMAGE_PATH 0xC004000C
//
// MessageId: DISMAPI_E_PARENT_FEATURE_DISABLED
//
// MessageText:
//
// One or several parent features are disabled so current feature can not be enabled.
// Solutions:
// 1 Call function DismGetFeatureParent to get all parent features and enable all of them. Or
// 2 Set EnableAll to TRUE when calling function DismEnableFeature.
//
#define DISMAPI_E_PARENT_FEATURE_DISABLED 0xC004000D
//
// MessageId: DISMAPI_E_MUST_SPECIFY_ONLINE_IMAGE
//
// MessageText:
//
// The offline image specified is the running system. The macro DISM_ONLINE_IMAGE must be
// used instead.
//
#define DISMAPI_E_MUST_SPECIFY_ONLINE_IMAGE 0xC004000E
//
// MessageId: DISMAPI_E_INVALID_PRODUCT_KEY
//
// MessageText:
//
// The specified product key could not be validated. Check that the specified
// product key is valid and that it matches the target edition.
//
#define DISMAPI_E_INVALID_PRODUCT_KEY 0xC004000F
//
// MessageId: DISMAPI_E_NEEDS_TO_REMOUNT_THE_IMAGE
//
// MessageText:
//
// The image needs to be remounted before any servicing operation.
//
#define DISMAPI_E_NEEDS_REMOUNT 0XC1510114
//
// MessageId: DISMAPI_E_UNKNOWN_FEATURE
//
// MessageText:
//
// The feature is not present in the package.
//
#define DISMAPI_E_UNKNOWN_FEATURE 0x800f080c
//
// MessageId: DISMAPI_E_BUSY
//
// MessageText:
//
// The current package and feature servicing infrastructure is busy. Wait a
// bit and try the operation again.
//
#define DISMAPI_E_BUSY 0x800f0902
#ifdef __cplusplus
}
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PKG_DISM) */
#pragma endregion
#endif // _DISMAPI_H_