diff --git a/dismapi.h b/dismapi.h index 2b9950d..4ee23cf 100644 --- a/dismapi.h +++ b/dismapi.h @@ -20,27 +20,27 @@ extern "C" { #endif - ////////////////////////////////////////////////////////////////////////////// - // - // Typedefs - // - ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // + // Typedefs + // + ////////////////////////////////////////////////////////////////////////////// - typedef UINT DismSession; + typedef UINT DismSession; - ////////////////////////////////////////////////////////////////////////////// - // - // Callbacks - // - ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // + // Callbacks + // + ////////////////////////////////////////////////////////////////////////////// - typedef void(CALLBACK* DISM_PROGRESS_CALLBACK)(_In_ UINT Current, _In_ UINT Total, _In_opt_ PVOID UserData); + typedef void(CALLBACK *DISM_PROGRESS_CALLBACK)(_In_ UINT Current, _In_ UINT Total, _In_opt_ PVOID UserData); - ////////////////////////////////////////////////////////////////////////////// - // - // Constants - // - ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // + // Constants + // + ////////////////////////////////////////////////////////////////////////////// #define DISM_ONLINE_IMAGE L"DISM_{53BFAE52-B167-4E2F-A258-0A37B57FF845}" #define DISM_SESSION_DEFAULT 0 @@ -50,7 +50,6 @@ extern "C" #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 @@ -59,7 +58,6 @@ extern "C" // 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. @@ -75,616 +73,616 @@ extern "C" // ////////////////////////////////////////////////////////////////////////////// - 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 - // - ////////////////////////////////////////////////////////////////////////////// + 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; + 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 - { + typedef struct _DismPackageInfoEx : public _DismPackageInfo + { #else - typedef struct _DismPackageInfoEx - { +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; + 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 - // - ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // + // Functions + // + ////////////////////////////////////////////////////////////////////////////// - HRESULT WINAPI + HRESULT WINAPI DismInitialize( - _In_ DismLogLevel LogLevel, - _In_opt_ PCWSTR LogFilePath, - _In_opt_ PCWSTR ScratchDirectory); + _In_ DismLogLevel LogLevel, + _In_opt_ PCWSTR LogFilePath, + _In_opt_ PCWSTR ScratchDirectory); - HRESULT WINAPI + HRESULT WINAPI DismShutdown(); - HRESULT WINAPI + 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 + _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); + _In_ PCWSTR MountPath, + _In_ DWORD Flags, + _In_opt_ HANDLE CancelEvent, + _In_opt_ DISM_PROGRESS_CALLBACK Progress, + _In_opt_ PVOID UserData); - HRESULT WINAPI + HRESULT WINAPI DismOpenSession( - _In_ PCWSTR ImagePath, - _In_opt_ PCWSTR WindowsDirectory, - _In_opt_ PCWSTR SystemDrive, - _Out_ DismSession* Session); + _In_ PCWSTR ImagePath, + _In_opt_ PCWSTR WindowsDirectory, + _In_opt_ PCWSTR SystemDrive, + _Out_ DismSession *Session); - HRESULT WINAPI + HRESULT WINAPI DismCloseSession( - _In_ DismSession Session); + _In_ DismSession Session); - HRESULT WINAPI + HRESULT WINAPI DismGetLastErrorMessage( - _Out_ DismString** ErrorMessage); + _Out_ DismString **ErrorMessage); - HRESULT WINAPI + HRESULT WINAPI DismRemountImage( - _In_ PCWSTR MountPath); + _In_ PCWSTR MountPath); - HRESULT WINAPI + HRESULT WINAPI DismCommitImage( - _In_ DismSession Session, - _In_ DWORD Flags, - _In_opt_ HANDLE CancelEvent, - _In_opt_ DISM_PROGRESS_CALLBACK Progress, - _In_opt_ PVOID UserData); + _In_ DismSession Session, + _In_ DWORD Flags, + _In_opt_ HANDLE CancelEvent, + _In_opt_ DISM_PROGRESS_CALLBACK Progress, + _In_opt_ PVOID UserData); - HRESULT WINAPI + HRESULT WINAPI DismGetImageInfo( - _In_ PCWSTR ImageFilePath, - _Outptr_result_buffer_(*Count) DismImageInfo** ImageInfo, - _Out_ UINT* Count); + _In_ PCWSTR ImageFilePath, + _Outptr_result_buffer_(*Count) DismImageInfo **ImageInfo, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismGetMountedImageInfo( - _Outptr_result_buffer_(*Count) DismMountedImageInfo** MountedImageInfo, - _Out_ UINT* Count); + _Outptr_result_buffer_(*Count) DismMountedImageInfo **MountedImageInfo, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismCleanupMountpoints(); - HRESULT WINAPI + 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 + _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 + _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); + _In_ VOID *DismStructure); - HRESULT WINAPI + 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 + _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 + _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 + _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 + _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); + _In_ DismSession Session, + _Outptr_result_buffer_(*Count) DismPackage **Package, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismGetPackageInfo( - _In_ DismSession Session, - _In_ PCWSTR Identifier, - _In_ DismPackageIdentifier PackageIdentifier, - _Out_ DismPackageInfo** PackageInfo); + _In_ DismSession Session, + _In_ PCWSTR Identifier, + _In_ DismPackageIdentifier PackageIdentifier, + _Out_ DismPackageInfo **PackageInfo); - HRESULT WINAPI + HRESULT WINAPI DismGetPackageInfoEx( - _In_ DismSession Session, - _In_ PCWSTR Identifier, - _In_ DismPackageIdentifier PackageIdentifier, - _Out_ DismPackageInfoEx** PackageInfoEx); + _In_ DismSession Session, + _In_ PCWSTR Identifier, + _In_ DismPackageIdentifier PackageIdentifier, + _Out_ DismPackageInfoEx **PackageInfoEx); - HRESULT WINAPI + HRESULT WINAPI DismGetFeatures( - _In_ DismSession Session, - _In_opt_ PCWSTR Identifier, - _In_opt_ DismPackageIdentifier PackageIdentifier, - _Outptr_result_buffer_(*Count) DismFeature** Feature, - _Out_ UINT* Count); + _In_ DismSession Session, + _In_opt_ PCWSTR Identifier, + _In_opt_ DismPackageIdentifier PackageIdentifier, + _Outptr_result_buffer_(*Count) DismFeature **Feature, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismGetFeatureInfo( - _In_ DismSession Session, - _In_ PCWSTR FeatureName, - _In_opt_ PCWSTR Identifier, - _In_opt_ DismPackageIdentifier PackageIdentifier, - _Out_ DismFeatureInfo** FeatureInfo); + _In_ DismSession Session, + _In_ PCWSTR FeatureName, + _In_opt_ PCWSTR Identifier, + _In_opt_ DismPackageIdentifier PackageIdentifier, + _Out_ DismFeatureInfo **FeatureInfo); - HRESULT WINAPI + 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 + _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); + _In_ DismSession Session, + _In_ PCWSTR UnattendFile, + _In_ BOOL SingleSession); - HRESULT WINAPI + HRESULT WINAPI DismAddDriver( - _In_ DismSession Session, - _In_ PCWSTR DriverPath, - _In_ BOOL ForceUnsigned); + _In_ DismSession Session, + _In_ PCWSTR DriverPath, + _In_ BOOL ForceUnsigned); - HRESULT WINAPI + HRESULT WINAPI DismRemoveDriver( - _In_ DismSession Session, - _In_ PCWSTR DriverPath); + _In_ DismSession Session, + _In_ PCWSTR DriverPath); - HRESULT WINAPI + HRESULT WINAPI DismGetDrivers( - _In_ DismSession Session, - _In_ BOOL AllDrivers, - _Outptr_result_buffer_(*Count) DismDriverPackage** DriverPackage, - _Out_ UINT* Count); + _In_ DismSession Session, + _In_ BOOL AllDrivers, + _Outptr_result_buffer_(*Count) DismDriverPackage **DriverPackage, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismGetDriverInfo( - _In_ DismSession Session, - _In_ PCWSTR DriverPath, - _Outptr_result_buffer_(*Count) DismDriver** Driver, - _Out_ UINT* Count, - _Out_opt_ DismDriverPackage** DriverPackage); + _In_ DismSession Session, + _In_ PCWSTR DriverPath, + _Outptr_result_buffer_(*Count) DismDriver **Driver, + _Out_ UINT *Count, + _Out_opt_ DismDriverPackage **DriverPackage); - HRESULT WINAPI + HRESULT WINAPI DismGetCapabilities( - _In_ DismSession Session, - _Outptr_result_buffer_(*Count) DismCapability** Capability, - _Out_ UINT* Count); + _In_ DismSession Session, + _Outptr_result_buffer_(*Count) DismCapability **Capability, + _Out_ UINT *Count); - HRESULT WINAPI + HRESULT WINAPI DismGetCapabilityInfo( - _In_ DismSession Session, - _In_ PCWSTR Name, - _Out_ DismCapabilityInfo** Info); + _In_ DismSession Session, + _In_ PCWSTR Name, + _Out_ DismCapabilityInfo **Info); - HRESULT WINAPI + 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 + _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); + _In_ DismSession Session, + _In_ PCWSTR Name, + _In_opt_ HANDLE CancelEvent, + _In_opt_ DISM_PROGRESS_CALLBACK Progress, + _In_opt_ PVOID UserData); - HRESULT WINAPI + HRESULT WINAPI DismGetReservedStorageState( - _In_ DismSession Session, - _Out_ PDWORD State); + _In_ DismSession Session, + _Out_ PDWORD State); - HRESULT WINAPI + HRESULT WINAPI DismSetReservedStorageState( - _In_ DismSession Session, - _In_ DWORD State); + _In_ DismSession Session, + _In_ DWORD State); - HRESULT WINAPI + HRESULT WINAPI _DismGetProvisionedAppxPackages( - DismSession Session, - _Outptr_result_buffer_(*Count) DismAppxPackage** Package, - _Out_ UINT* Count); + DismSession Session, + _Outptr_result_buffer_(*Count) DismAppxPackage **Package, + _Out_ UINT *Count); - HRESULT WINAPI + 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 + _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. - // + _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 ////////////////////////////////////////////////////////////////////////////// @@ -853,7 +851,7 @@ extern "C" #define DISMAPI_E_BUSY 0x800f0902 #ifdef __cplusplus - } +} #endif #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PKG_DISM) */ diff --git a/src/Microsoft.Dism/DismApi.AddProvisionedAppxPackage.cs b/src/Microsoft.Dism/DismApi.AddProvisionedAppxPackage.cs index bc2b94a..1a46abe 100644 --- a/src/Microsoft.Dism/DismApi.AddProvisionedAppxPackage.cs +++ b/src/Microsoft.Dism/DismApi.AddProvisionedAppxPackage.cs @@ -42,6 +42,31 @@ public static void AddProvisionedAppxPackage(DismSession session, string appPath /// Specifies regions for the package. /// When the operation requires a reboot to complete. public static void AddProvisionedAppxPackage(DismSession session, string appPath, List dependencyPackages, List optionalPackages, List licensePaths, string customDataPath, string regions) + { + AddProvisionedAppxPackage( + session, + appPath, + dependencyPackages, + optionalPackages, + licensePaths, + customDataPath, + regions, + DismStubPackageOption.None); + } + + /// + /// Adds an app package (.appx) that will install for each new user to a Windows image. + /// + /// A valid DISM Session. + /// Specifies the location of the app package (.appx) to add to the Windows image. + /// Specifies the location of dependency packages. + /// Specifies the location of optional packages. + /// Specifies the locations of .xml files containing your application licenses. + /// Specifies the location of a custom data file. The custom data file will be renamed custom.data and saved in the app data store. + /// Specifies regions for the package. + /// Specifies the stub package option. + /// When the operation requires a reboot to complete. + public static void AddProvisionedAppxPackage(DismSession session, string appPath, List dependencyPackages, List optionalPackages, List licensePaths, string customDataPath, string regions, DismStubPackageOption stubPackageOption) { int hresult = NativeMethods._DismAddProvisionedAppxPackage( session, @@ -54,7 +79,8 @@ public static void AddProvisionedAppxPackage(DismSession session, string appPath (uint)(licensePaths?.Count ?? 0), licensePaths == null || licensePaths.Count == 0, customDataPath, - regions); + regions, + stubPackageOption); DismUtilities.ThrowIfFail(hresult, session); } @@ -75,6 +101,7 @@ internal static partial class NativeMethods /// Specifies whether the license should be skipped. /// A custom path. /// The regions. + /// The stub package option. /// Returns S_OK on success. /// /// HRESULT WINAPI @@ -111,7 +138,8 @@ public static extern int _DismAddProvisionedAppxPackage( [MarshalAs(UnmanagedType.LPWStr)] string CustomDataPath, [MarshalAs(UnmanagedType.LPWStr)] - string Regions); + string Regions, + DismStubPackageOption stubPackageOption); } } } \ No newline at end of file diff --git a/src/Microsoft.Dism/NativeEnums.cs b/src/Microsoft.Dism/NativeEnums.cs index f4415fe..557b76f 100644 --- a/src/Microsoft.Dism/NativeEnums.cs +++ b/src/Microsoft.Dism/NativeEnums.cs @@ -417,6 +417,27 @@ public enum DismRestartType Required, } + /// + /// Specifies the stub package option when adding an app package (.appx). + /// + public enum DismStubPackageOption + { + /// + /// No option is specified. + /// + None, + + /// + /// Use full package. + /// + InstallFull, + + /// + /// Install stub package. + /// + InstallStub, + } + /// /// Specifies whether an image is identified by name or by index number. /// diff --git a/src/Microsoft.Dism/PublicAPI.Shipped.txt b/src/Microsoft.Dism/PublicAPI.Shipped.txt index afc8c1a..a3322be 100644 --- a/src/Microsoft.Dism/PublicAPI.Shipped.txt +++ b/src/Microsoft.Dism/PublicAPI.Shipped.txt @@ -1,4 +1,31 @@ -Microsoft.Dism.DismApi +const Microsoft.Dism.DismApi.DISM_COMMIT_APPEND = 131072 -> uint +const Microsoft.Dism.DismApi.DISM_COMMIT_GENERATE_INTEGRITY = 65536 -> uint +const Microsoft.Dism.DismApi.DISM_COMMIT_IMAGE = 0 -> uint +const Microsoft.Dism.DismApi.DISM_COMMIT_MASK = 4294901760 -> uint +const Microsoft.Dism.DismApi.DISM_DISCARD_IMAGE = 1 -> uint +const Microsoft.Dism.DismApi.DISM_MOUNT_CHECK_INTEGRITY = 4 -> uint +const Microsoft.Dism.DismApi.DISM_MOUNT_OPTIMIZE = 2 -> uint +const Microsoft.Dism.DismApi.DISM_MOUNT_READONLY = 1 -> uint +const Microsoft.Dism.DismApi.DISM_MOUNT_READWRITE = 0 -> uint +const Microsoft.Dism.DismApi.DISM_ONLINE_IMAGE = "DISM_{53BFAE52-B167-4E2F-A258-0A37B57FF845}" -> string +const Microsoft.Dism.DismApi.DISM_SESSION_DEFAULT = 0 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_BUSY = 2148468994 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_DISMAPI_NOT_INITIALIZED = 3221487617 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_DISM_SESSION = 3221487620 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_IMAGE_INDEX = 3221487621 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_IMAGE_NAME = 3221487622 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_LOGGING_DISABLED = 3221487625 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_MUST_SPECIFY_ONLINE_IMAGE = 3221487630 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_NEEDS_REMOUNT = 3243311380 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_MOUNT_IMAGE_PATH = 3221487627 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_REMOUNT_IMAGE_PATH = 3221487628 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_UNMOUNT_IMAGE_PATH = 3221487626 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_SESSION_HANDLES = 3221487619 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_PARENT_FEATURE_DISABLED = 3221487629 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_SHUTDOWN_IN_PROGRESS = 3221487618 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_UNABLE_TO_UNMOUNT_IMAGE_PATH = 3221487623 -> uint +const Microsoft.Dism.DismApi.DISMAPI_E_UNKNOWN_FEATURE = 2148468748 -> uint +Microsoft.Dism.DismApi Microsoft.Dism.DismAppxPackage Microsoft.Dism.DismAppxPackage.Architecture.get -> Microsoft.Dism.DismProcessorArchitecture Microsoft.Dism.DismAppxPackage.DisplayName.get -> string @@ -59,10 +86,10 @@ Microsoft.Dism.DismDriverSignature.Unknown = 0 -> Microsoft.Dism.DismDriverSigna Microsoft.Dism.DismDriverSignature.Unsigned = 1 -> Microsoft.Dism.DismDriverSignature Microsoft.Dism.DismException Microsoft.Dism.DismException.DismException() -> void -Microsoft.Dism.DismException.DismException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) -> void Microsoft.Dism.DismException.DismException(int error) -> void Microsoft.Dism.DismException.DismException(string message) -> void Microsoft.Dism.DismException.DismException(string message, System.Exception innerException) -> void +Microsoft.Dism.DismException.DismException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) -> void Microsoft.Dism.DismFeature Microsoft.Dism.DismFeature.Equals(Microsoft.Dism.DismFeature other) -> bool Microsoft.Dism.DismFeature.FeatureName.get -> string @@ -125,6 +152,14 @@ Microsoft.Dism.DismLogLevel Microsoft.Dism.DismLogLevel.LogErrors = 0 -> Microsoft.Dism.DismLogLevel Microsoft.Dism.DismLogLevel.LogErrorsWarnings = 1 -> Microsoft.Dism.DismLogLevel Microsoft.Dism.DismLogLevel.LogErrorsWarningsInfo = 2 -> Microsoft.Dism.DismLogLevel +Microsoft.Dism.DismMountedImageInfo +Microsoft.Dism.DismMountedImageInfo.Equals(Microsoft.Dism.DismMountedImageInfo other) -> bool +Microsoft.Dism.DismMountedImageInfo.ImageFilePath.get -> string +Microsoft.Dism.DismMountedImageInfo.ImageIndex.get -> int +Microsoft.Dism.DismMountedImageInfo.MountMode.get -> Microsoft.Dism.DismMountMode +Microsoft.Dism.DismMountedImageInfo.MountPath.get -> string +Microsoft.Dism.DismMountedImageInfo.MountStatus.get -> Microsoft.Dism.DismMountStatus +Microsoft.Dism.DismMountedImageInfoCollection Microsoft.Dism.DismMountImageOptions Microsoft.Dism.DismMountImageOptions.CheckIntegrity = 4 -> Microsoft.Dism.DismMountImageOptions Microsoft.Dism.DismMountImageOptions.None = 0 -> Microsoft.Dism.DismMountImageOptions @@ -136,14 +171,6 @@ Microsoft.Dism.DismMountStatus Microsoft.Dism.DismMountStatus.Invalid = 2 -> Microsoft.Dism.DismMountStatus Microsoft.Dism.DismMountStatus.NeedsRemount = 1 -> Microsoft.Dism.DismMountStatus Microsoft.Dism.DismMountStatus.Ok = 0 -> Microsoft.Dism.DismMountStatus -Microsoft.Dism.DismMountedImageInfo -Microsoft.Dism.DismMountedImageInfo.Equals(Microsoft.Dism.DismMountedImageInfo other) -> bool -Microsoft.Dism.DismMountedImageInfo.ImageFilePath.get -> string -Microsoft.Dism.DismMountedImageInfo.ImageIndex.get -> int -Microsoft.Dism.DismMountedImageInfo.MountMode.get -> Microsoft.Dism.DismMountMode -Microsoft.Dism.DismMountedImageInfo.MountPath.get -> string -Microsoft.Dism.DismMountedImageInfo.MountStatus.get -> Microsoft.Dism.DismMountStatus -Microsoft.Dism.DismMountedImageInfoCollection Microsoft.Dism.DismNotInitializedException Microsoft.Dism.DismNotInitializedException.DismNotInitializedException() -> void Microsoft.Dism.DismNotInitializedException.DismNotInitializedException(string message) -> void @@ -160,8 +187,8 @@ Microsoft.Dism.DismPackage.PackageState.get -> Microsoft.Dism.DismPackageFeature Microsoft.Dism.DismPackage.ReleaseType.get -> Microsoft.Dism.DismReleaseType Microsoft.Dism.DismPackageCollection Microsoft.Dism.DismPackageFeatureState -Microsoft.Dism.DismPackageFeatureState.InstallPending = 5 -> Microsoft.Dism.DismPackageFeatureState Microsoft.Dism.DismPackageFeatureState.Installed = 4 -> Microsoft.Dism.DismPackageFeatureState +Microsoft.Dism.DismPackageFeatureState.InstallPending = 5 -> Microsoft.Dism.DismPackageFeatureState Microsoft.Dism.DismPackageFeatureState.NotPresent = 0 -> Microsoft.Dism.DismPackageFeatureState Microsoft.Dism.DismPackageFeatureState.PartiallyInstalled = 7 -> Microsoft.Dism.DismPackageFeatureState Microsoft.Dism.DismPackageFeatureState.Removed = 3 -> Microsoft.Dism.DismPackageFeatureState @@ -240,6 +267,15 @@ Microsoft.Dism.DismRestartType.No = 0 -> Microsoft.Dism.DismRestartType Microsoft.Dism.DismRestartType.Possible = 1 -> Microsoft.Dism.DismRestartType Microsoft.Dism.DismRestartType.Required = 2 -> Microsoft.Dism.DismRestartType Microsoft.Dism.DismSession +Microsoft.Dism.DismSession.RebootRequired.get -> bool +Microsoft.Dism.DismSessionOptions +Microsoft.Dism.DismSessionOptions.DismSessionOptions() -> void +Microsoft.Dism.DismSessionOptions.ThrowExceptionOnRebootRequired.get -> bool +Microsoft.Dism.DismSessionOptions.ThrowExceptionOnRebootRequired.set -> void +Microsoft.Dism.DismStubPackageOption +Microsoft.Dism.DismStubPackageOption.InstallFull = 1 -> Microsoft.Dism.DismStubPackageOption +Microsoft.Dism.DismStubPackageOption.InstallStub = 2 -> Microsoft.Dism.DismStubPackageOption +Microsoft.Dism.DismStubPackageOption.None = 0 -> Microsoft.Dism.DismStubPackageOption Microsoft.Dism.DismWimCustomizedInfo Microsoft.Dism.DismWimCustomizedInfo.CreatedTime.get -> System.DateTime Microsoft.Dism.DismWimCustomizedInfo.DirectoryCount.get -> long @@ -247,33 +283,6 @@ Microsoft.Dism.DismWimCustomizedInfo.Equals(Microsoft.Dism.DismWimCustomizedInfo Microsoft.Dism.DismWimCustomizedInfo.FileCount.get -> long Microsoft.Dism.DismWimCustomizedInfo.ModifiedTime.get -> System.DateTime Microsoft.Dism.DismWimCustomizedInfo.Size.get -> long -const Microsoft.Dism.DismApi.DISMAPI_E_BUSY = 2148468994 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_DISMAPI_NOT_INITIALIZED = 3221487617 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_DISM_SESSION = 3221487620 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_IMAGE_INDEX = 3221487621 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_INVALID_IMAGE_NAME = 3221487622 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_LOGGING_DISABLED = 3221487625 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_MUST_SPECIFY_ONLINE_IMAGE = 3221487630 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_NEEDS_REMOUNT = 3243311380 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_MOUNT_IMAGE_PATH = 3221487627 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_REMOUNT_IMAGE_PATH = 3221487628 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_HANDLES_UNABLE_TO_UNMOUNT_IMAGE_PATH = 3221487626 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_OPEN_SESSION_HANDLES = 3221487619 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_PARENT_FEATURE_DISABLED = 3221487629 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_SHUTDOWN_IN_PROGRESS = 3221487618 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_UNABLE_TO_UNMOUNT_IMAGE_PATH = 3221487623 -> uint -const Microsoft.Dism.DismApi.DISMAPI_E_UNKNOWN_FEATURE = 2148468748 -> uint -const Microsoft.Dism.DismApi.DISM_COMMIT_APPEND = 131072 -> uint -const Microsoft.Dism.DismApi.DISM_COMMIT_GENERATE_INTEGRITY = 65536 -> uint -const Microsoft.Dism.DismApi.DISM_COMMIT_IMAGE = 0 -> uint -const Microsoft.Dism.DismApi.DISM_COMMIT_MASK = 4294901760 -> uint -const Microsoft.Dism.DismApi.DISM_DISCARD_IMAGE = 1 -> uint -const Microsoft.Dism.DismApi.DISM_MOUNT_CHECK_INTEGRITY = 4 -> uint -const Microsoft.Dism.DismApi.DISM_MOUNT_OPTIMIZE = 2 -> uint -const Microsoft.Dism.DismApi.DISM_MOUNT_READONLY = 1 -> uint -const Microsoft.Dism.DismApi.DISM_MOUNT_READWRITE = 0 -> uint -const Microsoft.Dism.DismApi.DISM_ONLINE_IMAGE = "DISM_{53BFAE52-B167-4E2F-A258-0A37B57FF845}" -> string -const Microsoft.Dism.DismApi.DISM_SESSION_DEFAULT = 0 -> uint override Microsoft.Dism.DismAppxPackage.Equals(object obj) -> bool override Microsoft.Dism.DismAppxPackage.GetHashCode() -> int override Microsoft.Dism.DismCapability.Equals(object obj) -> bool @@ -310,8 +319,9 @@ static Microsoft.Dism.DismApi.AddDriversEx(Microsoft.Dism.DismSession session, s static Microsoft.Dism.DismApi.AddPackage(Microsoft.Dism.DismSession session, string packagePath, bool ignoreCheck, bool preventPending) -> void static Microsoft.Dism.DismApi.AddPackage(Microsoft.Dism.DismSession session, string packagePath, bool ignoreCheck, bool preventPending, Microsoft.Dism.DismProgressCallback progressCallback) -> void static Microsoft.Dism.DismApi.AddPackage(Microsoft.Dism.DismSession session, string packagePath, bool ignoreCheck, bool preventPending, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void -static Microsoft.Dism.DismApi.AddProvisionedAppxPackage(Microsoft.Dism.DismSession session, string appPath, System.Collections.Generic.List dependencyPackages, System.Collections.Generic.List optionalPackages, System.Collections.Generic.List licensePaths, string customDataPath, string regions) -> void static Microsoft.Dism.DismApi.AddProvisionedAppxPackage(Microsoft.Dism.DismSession session, string appPath, System.Collections.Generic.List dependencyPackages, string licensePath, string customDataPath) -> void +static Microsoft.Dism.DismApi.AddProvisionedAppxPackage(Microsoft.Dism.DismSession session, string appPath, System.Collections.Generic.List dependencyPackages, System.Collections.Generic.List optionalPackages, System.Collections.Generic.List licensePaths, string customDataPath, string regions) -> void +static Microsoft.Dism.DismApi.AddProvisionedAppxPackage(Microsoft.Dism.DismSession session, string appPath, System.Collections.Generic.List dependencyPackages, System.Collections.Generic.List optionalPackages, System.Collections.Generic.List licensePaths, string customDataPath, string regions, Microsoft.Dism.DismStubPackageOption stubPackageOption) -> void static Microsoft.Dism.DismApi.ApplyFfuImage(string imagePath, string applyPath) -> void static Microsoft.Dism.DismApi.ApplyFfuImage(string imagePath, string applyPath, string partPath) -> void static Microsoft.Dism.DismApi.ApplyUnattend(Microsoft.Dism.DismSession session, string unattendFile, bool singleSession) -> void @@ -326,6 +336,10 @@ static Microsoft.Dism.DismApi.CommitImage(Microsoft.Dism.DismSession session, bo static Microsoft.Dism.DismApi.DisableFeature(Microsoft.Dism.DismSession session, string featureName, string packageName, bool removePayload) -> void static Microsoft.Dism.DismApi.DisableFeature(Microsoft.Dism.DismSession session, string featureName, string packageName, bool removePayload, Microsoft.Dism.DismProgressCallback progressCallback) -> void static Microsoft.Dism.DismApi.DisableFeature(Microsoft.Dism.DismSession session, string featureName, string packageName, bool removePayload, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void +static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll) -> void +static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths) -> void +static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback) -> void +static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void static Microsoft.Dism.DismApi.EnableFeatureByPackageName(Microsoft.Dism.DismSession session, string featureName, string packageName, bool limitAccess, bool enableAll) -> void static Microsoft.Dism.DismApi.EnableFeatureByPackageName(Microsoft.Dism.DismSession session, string featureName, string packageName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths) -> void static Microsoft.Dism.DismApi.EnableFeatureByPackageName(Microsoft.Dism.DismSession session, string featureName, string packageName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback) -> void @@ -334,10 +348,6 @@ static Microsoft.Dism.DismApi.EnableFeatureByPackagePath(Microsoft.Dism.DismSess static Microsoft.Dism.DismApi.EnableFeatureByPackagePath(Microsoft.Dism.DismSession session, string featureName, string packagePath, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths) -> void static Microsoft.Dism.DismApi.EnableFeatureByPackagePath(Microsoft.Dism.DismSession session, string featureName, string packagePath, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback) -> void static Microsoft.Dism.DismApi.EnableFeatureByPackagePath(Microsoft.Dism.DismSession session, string featureName, string packagePath, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void -static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll) -> void -static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths) -> void -static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback) -> void -static Microsoft.Dism.DismApi.EnableFeature(Microsoft.Dism.DismSession session, string featureName, bool limitAccess, bool enableAll, System.Collections.Generic.List sourcePaths, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void static Microsoft.Dism.DismApi.GetCapabilities(Microsoft.Dism.DismSession session) -> Microsoft.Dism.DismCapabilityCollection static Microsoft.Dism.DismApi.GetCapabilityInfo(Microsoft.Dism.DismSession session, string capabilityName) -> Microsoft.Dism.DismCapabilityInfo static Microsoft.Dism.DismApi.GetDriverInfo(Microsoft.Dism.DismSession session, string driverPath) -> Microsoft.Dism.DismDriverCollection @@ -382,7 +392,10 @@ static Microsoft.Dism.DismApi.MountImage(string imageFilePath, string mountPath, static Microsoft.Dism.DismApi.MountImage(string imageFilePath, string mountPath, string imageName, bool readOnly, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void static Microsoft.Dism.DismApi.OpenOfflineSession(string imagePath) -> Microsoft.Dism.DismSession static Microsoft.Dism.DismApi.OpenOfflineSession(string imagePath, string windowsDirectory, string systemDrive) -> Microsoft.Dism.DismSession +static Microsoft.Dism.DismApi.OpenOfflineSessionEx(string imagePath, Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession +static Microsoft.Dism.DismApi.OpenOfflineSessionEx(string imagePath, string windowsDirectory, string systemDrive, Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession static Microsoft.Dism.DismApi.OpenOnlineSession() -> Microsoft.Dism.DismSession +static Microsoft.Dism.DismApi.OpenOnlineSessionEx(Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession static Microsoft.Dism.DismApi.RemountImage(string mountPath) -> void static Microsoft.Dism.DismApi.RemoveCapability(Microsoft.Dism.DismSession session, string capabilityName) -> void static Microsoft.Dism.DismApi.RemoveCapability(Microsoft.Dism.DismSession session, string capabilityName, Microsoft.Dism.DismProgressCallback progressCallback, object userData) -> void diff --git a/src/Microsoft.Dism/PublicAPI.Unshipped.txt b/src/Microsoft.Dism/PublicAPI.Unshipped.txt index 2524532..5f28270 100644 --- a/src/Microsoft.Dism/PublicAPI.Unshipped.txt +++ b/src/Microsoft.Dism/PublicAPI.Unshipped.txt @@ -1,8 +1 @@ -Microsoft.Dism.DismSession.RebootRequired.get -> bool -Microsoft.Dism.DismSessionOptions -Microsoft.Dism.DismSessionOptions.DismSessionOptions() -> void -Microsoft.Dism.DismSessionOptions.ThrowExceptionOnRebootRequired.get -> bool -Microsoft.Dism.DismSessionOptions.ThrowExceptionOnRebootRequired.set -> void -static Microsoft.Dism.DismApi.OpenOfflineSessionEx(string imagePath, Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession -static Microsoft.Dism.DismApi.OpenOfflineSessionEx(string imagePath, string windowsDirectory, string systemDrive, Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession -static Microsoft.Dism.DismApi.OpenOnlineSessionEx(Microsoft.Dism.DismSessionOptions options = null) -> Microsoft.Dism.DismSession \ No newline at end of file + \ No newline at end of file diff --git a/version.json b/version.json index c637699..d7b9144 100644 --- a/version.json +++ b/version.json @@ -1,7 +1,8 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.3", + "version": "2.4", "assemblyVersion": "1.0", + "buildNumberOffset": -1, "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/tags/v\\d+\\.\\d+\\.\\d+"