Created
February 16, 2019 21:24
-
-
Save jcotton42/42b804e935eda0046a659b51331f6619 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// slightly modified to reduce bindgen vomit | |
/****************************************************************************\ | |
DismApi.H | |
Copyright (c) Microsoft Corporation. | |
All rights reserved. | |
\****************************************************************************/ | |
#ifndef _DISMAPI_H_ | |
#define _DISMAPI_H_ | |
// remove this | |
//#include <Windows.h> | |
#include <winapifamily.h> | |
typedef unsigned int UINT; | |
#define CALLBACK __stdcall | |
#define WINAPI __stdcall | |
#define VOID void | |
typedef void *PVOID; | |
typedef const char *LPCWSTR, *PCWSTR; | |
typedef unsigned short WORD; | |
typedef unsigned long DWORD; | |
typedef void *HANDLE; | |
typedef int BOOL; | |
typedef unsigned __int64 UINT64; | |
typedef long HRESULT; | |
#define _In_ | |
#define _In_opt_ | |
#define _Out_ | |
#define _Out_opt_ | |
#define _Outptr_result_buffer_(x) | |
#define _In_reads_opt_(x) | |
typedef struct _SYSTEMTIME | |
{ | |
WORD wYear; | |
WORD wMonth; | |
WORD wDayOfWeek; | |
WORD wDay; | |
WORD wHour; | |
WORD wMinute; | |
WORD wSecond; | |
WORD wMilliseconds; | |
} SYSTEMTIME; | |
#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 | |
// 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 | |
// 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 | |
////////////////////////////////////////////////////////////////////////////// | |
// | |
// 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; | |
////////////////////////////////////////////////////////////////////////////// | |
// | |
// 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; | |
#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); | |
////////////////////////////////////////////////////////////////////////////// | |
// | |
// 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_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* automatically generated by rust-bindgen */ | |
pub const WINAPI_FAMILY_PC_APP: u32 = 2; | |
pub const WINAPI_FAMILY_PHONE_APP: u32 = 3; | |
pub const WINAPI_FAMILY_SYSTEM: u32 = 4; | |
pub const WINAPI_FAMILY_SERVER: u32 = 5; | |
pub const WINAPI_FAMILY_DESKTOP_APP: u32 = 100; | |
pub const WINAPI_FAMILY_APP: u32 = 2; | |
pub const WINAPI_FAMILY: u32 = 100; | |
pub const DISM_ONLINE_IMAGE: &'static [u8; 44usize] = | |
b"DISM_{53BFAE52-B167-4E2F-A258-0A37B57FF845}\0"; | |
pub const DISM_SESSION_DEFAULT: u32 = 0; | |
pub const DISM_MOUNT_READWRITE: u32 = 0; | |
pub const DISM_MOUNT_READONLY: u32 = 1; | |
pub const DISM_MOUNT_OPTIMIZE: u32 = 2; | |
pub const DISM_MOUNT_CHECK_INTEGRITY: u32 = 4; | |
pub const DISM_COMMIT_IMAGE: u32 = 0; | |
pub const DISM_DISCARD_IMAGE: u32 = 1; | |
pub const DISM_COMMIT_GENERATE_INTEGRITY: u32 = 65536; | |
pub const DISM_COMMIT_APPEND: u32 = 131072; | |
pub const DISM_COMMIT_MASK: u32 = 4294901760; | |
pub const DISMAPI_S_RELOAD_IMAGE_SESSION_REQUIRED: u32 = 1; | |
pub const DISMAPI_E_DISMAPI_NOT_INITIALIZED: u32 = 3221487617; | |
pub const DISMAPI_E_SHUTDOWN_IN_PROGRESS: u32 = 3221487618; | |
pub const DISMAPI_E_OPEN_SESSION_HANDLES: u32 = 3221487619; | |
pub const DISMAPI_E_INVALID_DISM_SESSION: u32 = 3221487620; | |
pub const DISMAPI_E_INVALID_IMAGE_INDEX: u32 = 3221487621; | |
pub const DISMAPI_E_INVALID_IMAGE_NAME: u32 = 3221487622; | |
pub const DISMAPI_E_UNABLE_TO_UNMOUNT_IMAGE_PATH: u32 = 3221487623; | |
pub const DISMAPI_E_LOGGING_DISABLED: u32 = 3221487625; | |
pub const DISMAPI_E_OPEN_HANDLES_UNABLE_TO_UNMOUNT_IMAGE_PATH: u32 = 3221487626; | |
pub const DISMAPI_E_OPEN_HANDLES_UNABLE_TO_MOUNT_IMAGE_PATH: u32 = 3221487627; | |
pub const DISMAPI_E_OPEN_HANDLES_UNABLE_TO_REMOUNT_IMAGE_PATH: u32 = 3221487628; | |
pub const DISMAPI_E_PARENT_FEATURE_DISABLED: u32 = 3221487629; | |
pub const DISMAPI_E_MUST_SPECIFY_ONLINE_IMAGE: u32 = 3221487630; | |
pub const DISMAPI_E_INVALID_PRODUCT_KEY: u32 = 3221487631; | |
pub const DISMAPI_E_UNKNOWN_FEATURE: u32 = 2148468748; | |
pub const DISMAPI_E_BUSY: u32 = 2148468994; | |
pub type UINT = ::std::os::raw::c_uint; | |
pub type PVOID = *mut ::std::os::raw::c_void; | |
pub type LPCWSTR = *const ::std::os::raw::c_char; | |
pub type PCWSTR = *const ::std::os::raw::c_char; | |
pub type WORD = ::std::os::raw::c_ushort; | |
pub type DWORD = ::std::os::raw::c_ulong; | |
pub type HANDLE = *mut ::std::os::raw::c_void; | |
pub type BOOL = ::std::os::raw::c_int; | |
pub type UINT64 = ::std::os::raw::c_ulonglong; | |
pub type HRESULT = ::std::os::raw::c_long; | |
#[repr(C)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _SYSTEMTIME { | |
pub wYear: WORD, | |
pub wMonth: WORD, | |
pub wDayOfWeek: WORD, | |
pub wDay: WORD, | |
pub wHour: WORD, | |
pub wMinute: WORD, | |
pub wSecond: WORD, | |
pub wMilliseconds: WORD, | |
} | |
#[test] | |
fn bindgen_test_layout__SYSTEMTIME() { | |
assert_eq!( | |
::std::mem::size_of::<_SYSTEMTIME>(), | |
16usize, | |
concat!("Size of: ", stringify!(_SYSTEMTIME)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_SYSTEMTIME>(), | |
2usize, | |
concat!("Alignment of ", stringify!(_SYSTEMTIME)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wYear as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wYear) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wMonth as *const _ as usize }, | |
2usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wMonth) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wDayOfWeek as *const _ as usize }, | |
4usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wDayOfWeek) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wDay as *const _ as usize }, | |
6usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wDay) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wHour as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wHour) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wMinute as *const _ as usize }, | |
10usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wMinute) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wSecond as *const _ as usize }, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wSecond) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_SYSTEMTIME>())).wMilliseconds as *const _ as usize }, | |
14usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_SYSTEMTIME), | |
"::", | |
stringify!(wMilliseconds) | |
) | |
); | |
} | |
pub type SYSTEMTIME = _SYSTEMTIME; | |
#[doc = ""] | |
pub type DismSession = UINT; | |
#[doc = ""] | |
pub type DISM_PROGRESS_CALLBACK = | |
::std::option::Option<unsafe extern "C" fn(Current: UINT, Total: UINT, UserData: PVOID)>; | |
pub const _DismLogLevel_DismLogErrors: _DismLogLevel = 0; | |
pub const _DismLogLevel_DismLogErrorsWarnings: _DismLogLevel = 1; | |
pub const _DismLogLevel_DismLogErrorsWarningsInfo: _DismLogLevel = 2; | |
#[doc = ""] | |
pub type _DismLogLevel = i32; | |
pub use self::_DismLogLevel as DismLogLevel; | |
pub const _DismImageIdentifier_DismImageIndex: _DismImageIdentifier = 0; | |
pub const _DismImageIdentifier_DismImageName: _DismImageIdentifier = 1; | |
pub type _DismImageIdentifier = i32; | |
pub use self::_DismImageIdentifier as DismImageIdentifier; | |
pub const _DismMountMode_DismReadWrite: _DismMountMode = 0; | |
pub const _DismMountMode_DismReadOnly: _DismMountMode = 1; | |
pub type _DismMountMode = i32; | |
pub use self::_DismMountMode as DismMountMode; | |
pub const _DismImageType_DismImageTypeUnsupported: _DismImageType = -1; | |
pub const _DismImageType_DismImageTypeWim: _DismImageType = 0; | |
pub const _DismImageType_DismImageTypeVhd: _DismImageType = 1; | |
pub type _DismImageType = i32; | |
pub use self::_DismImageType as DismImageType; | |
pub const _DismImageBootable_DismImageBootableYes: _DismImageBootable = 0; | |
pub const _DismImageBootable_DismImageBootableNo: _DismImageBootable = 1; | |
pub const _DismImageBootable_DismImageBootableUnknown: _DismImageBootable = 2; | |
pub type _DismImageBootable = i32; | |
pub use self::_DismImageBootable as DismImageBootable; | |
pub const _DismMountStatus_DismMountStatusOk: _DismMountStatus = 0; | |
pub const _DismMountStatus_DismMountStatusNeedsRemount: _DismMountStatus = 1; | |
pub const _DismMountStatus_DismMountStatusInvalid: _DismMountStatus = 2; | |
pub type _DismMountStatus = i32; | |
pub use self::_DismMountStatus as DismMountStatus; | |
pub const _DismImageHealthState_DismImageHealthy: _DismImageHealthState = 0; | |
pub const _DismImageHealthState_DismImageRepairable: _DismImageHealthState = 1; | |
pub const _DismImageHealthState_DismImageNonRepairable: _DismImageHealthState = 2; | |
pub type _DismImageHealthState = i32; | |
pub use self::_DismImageHealthState as DismImageHealthState; | |
pub const _DismPackageIdentifier_DismPackageNone: _DismPackageIdentifier = 0; | |
pub const _DismPackageIdentifier_DismPackageName: _DismPackageIdentifier = 1; | |
pub const _DismPackageIdentifier_DismPackagePath: _DismPackageIdentifier = 2; | |
pub type _DismPackageIdentifier = i32; | |
pub use self::_DismPackageIdentifier as DismPackageIdentifier; | |
pub const _DismPackageFeatureState_DismStateNotPresent: _DismPackageFeatureState = 0; | |
pub const _DismPackageFeatureState_DismStateUninstallPending: _DismPackageFeatureState = 1; | |
pub const _DismPackageFeatureState_DismStateStaged: _DismPackageFeatureState = 2; | |
pub const _DismPackageFeatureState_DismStateResolved: _DismPackageFeatureState = 3; | |
pub const _DismPackageFeatureState_DismStateRemoved: _DismPackageFeatureState = 3; | |
pub const _DismPackageFeatureState_DismStateInstalled: _DismPackageFeatureState = 4; | |
pub const _DismPackageFeatureState_DismStateInstallPending: _DismPackageFeatureState = 5; | |
pub const _DismPackageFeatureState_DismStateSuperseded: _DismPackageFeatureState = 6; | |
pub const _DismPackageFeatureState_DismStatePartiallyInstalled: _DismPackageFeatureState = 7; | |
pub type _DismPackageFeatureState = i32; | |
pub use self::_DismPackageFeatureState as DismPackageFeatureState; | |
pub const _DismReleaseType_DismReleaseTypeCriticalUpdate: _DismReleaseType = 0; | |
pub const _DismReleaseType_DismReleaseTypeDriver: _DismReleaseType = 1; | |
pub const _DismReleaseType_DismReleaseTypeFeaturePack: _DismReleaseType = 2; | |
pub const _DismReleaseType_DismReleaseTypeHotfix: _DismReleaseType = 3; | |
pub const _DismReleaseType_DismReleaseTypeSecurityUpdate: _DismReleaseType = 4; | |
pub const _DismReleaseType_DismReleaseTypeSoftwareUpdate: _DismReleaseType = 5; | |
pub const _DismReleaseType_DismReleaseTypeUpdate: _DismReleaseType = 6; | |
pub const _DismReleaseType_DismReleaseTypeUpdateRollup: _DismReleaseType = 7; | |
pub const _DismReleaseType_DismReleaseTypeLanguagePack: _DismReleaseType = 8; | |
pub const _DismReleaseType_DismReleaseTypeFoundation: _DismReleaseType = 9; | |
pub const _DismReleaseType_DismReleaseTypeServicePack: _DismReleaseType = 10; | |
pub const _DismReleaseType_DismReleaseTypeProduct: _DismReleaseType = 11; | |
pub const _DismReleaseType_DismReleaseTypeLocalPack: _DismReleaseType = 12; | |
pub const _DismReleaseType_DismReleaseTypeOther: _DismReleaseType = 13; | |
pub const _DismReleaseType_DismReleaseTypeOnDemandPack: _DismReleaseType = 14; | |
pub type _DismReleaseType = i32; | |
pub use self::_DismReleaseType as DismReleaseType; | |
pub const _DismRestartType_DismRestartNo: _DismRestartType = 0; | |
pub const _DismRestartType_DismRestartPossible: _DismRestartType = 1; | |
pub const _DismRestartType_DismRestartRequired: _DismRestartType = 2; | |
pub type _DismRestartType = i32; | |
pub use self::_DismRestartType as DismRestartType; | |
pub const _DismDriverSignature_DismDriverSignatureUnknown: _DismDriverSignature = 0; | |
pub const _DismDriverSignature_DismDriverSignatureUnsigned: _DismDriverSignature = 1; | |
pub const _DismDriverSignature_DismDriverSignatureSigned: _DismDriverSignature = 2; | |
pub type _DismDriverSignature = i32; | |
pub use self::_DismDriverSignature as DismDriverSignature; | |
pub const _DismFullyOfflineInstallableType_DismFullyOfflineInstallable: | |
_DismFullyOfflineInstallableType = 0; | |
pub const _DismFullyOfflineInstallableType_DismFullyOfflineNotInstallable: | |
_DismFullyOfflineInstallableType = 1; | |
pub const _DismFullyOfflineInstallableType_DismFullyOfflineInstallableUndetermined: | |
_DismFullyOfflineInstallableType = 2; | |
pub type _DismFullyOfflineInstallableType = i32; | |
pub use self::_DismFullyOfflineInstallableType as DismFullyOfflineInstallableType; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismPackage { | |
pub PackageName: PCWSTR, | |
pub PackageState: DismPackageFeatureState, | |
pub ReleaseType: DismReleaseType, | |
pub InstallTime: SYSTEMTIME, | |
} | |
#[test] | |
fn bindgen_test_layout__DismPackage() { | |
assert_eq!( | |
::std::mem::size_of::<_DismPackage>(), | |
32usize, | |
concat!("Size of: ", stringify!(_DismPackage)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismPackage>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismPackage)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackage>())).PackageName as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackage), | |
"::", | |
stringify!(PackageName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackage>())).PackageState as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackage), | |
"::", | |
stringify!(PackageState) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackage>())).ReleaseType as *const _ as usize }, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackage), | |
"::", | |
stringify!(ReleaseType) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackage>())).InstallTime as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackage), | |
"::", | |
stringify!(InstallTime) | |
) | |
); | |
} | |
pub type DismPackage = _DismPackage; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismCustomProperty { | |
pub Name: PCWSTR, | |
pub Value: PCWSTR, | |
pub Path: PCWSTR, | |
} | |
#[test] | |
fn bindgen_test_layout__DismCustomProperty() { | |
assert_eq!( | |
::std::mem::size_of::<_DismCustomProperty>(), | |
24usize, | |
concat!("Size of: ", stringify!(_DismCustomProperty)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismCustomProperty>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismCustomProperty)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCustomProperty>())).Name as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCustomProperty), | |
"::", | |
stringify!(Name) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCustomProperty>())).Value as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCustomProperty), | |
"::", | |
stringify!(Value) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCustomProperty>())).Path as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCustomProperty), | |
"::", | |
stringify!(Path) | |
) | |
); | |
} | |
pub type DismCustomProperty = _DismCustomProperty; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismFeature { | |
pub FeatureName: PCWSTR, | |
pub State: DismPackageFeatureState, | |
} | |
#[test] | |
fn bindgen_test_layout__DismFeature() { | |
assert_eq!( | |
::std::mem::size_of::<_DismFeature>(), | |
12usize, | |
concat!("Size of: ", stringify!(_DismFeature)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismFeature>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismFeature)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeature>())).FeatureName as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeature), | |
"::", | |
stringify!(FeatureName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeature>())).State as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeature), | |
"::", | |
stringify!(State) | |
) | |
); | |
} | |
pub type DismFeature = _DismFeature; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismCapability { | |
pub Name: PCWSTR, | |
pub State: DismPackageFeatureState, | |
} | |
#[test] | |
fn bindgen_test_layout__DismCapability() { | |
assert_eq!( | |
::std::mem::size_of::<_DismCapability>(), | |
12usize, | |
concat!("Size of: ", stringify!(_DismCapability)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismCapability>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismCapability)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapability>())).Name as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapability), | |
"::", | |
stringify!(Name) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapability>())).State as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapability), | |
"::", | |
stringify!(State) | |
) | |
); | |
} | |
pub type DismCapability = _DismCapability; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismPackageInfo { | |
pub PackageName: PCWSTR, | |
pub PackageState: DismPackageFeatureState, | |
pub ReleaseType: DismReleaseType, | |
pub InstallTime: SYSTEMTIME, | |
pub Applicable: BOOL, | |
pub Copyright: PCWSTR, | |
pub Company: PCWSTR, | |
pub CreationTime: SYSTEMTIME, | |
pub DisplayName: PCWSTR, | |
pub Description: PCWSTR, | |
pub InstallClient: PCWSTR, | |
pub InstallPackageName: PCWSTR, | |
pub LastUpdateTime: SYSTEMTIME, | |
pub ProductName: PCWSTR, | |
pub ProductVersion: PCWSTR, | |
pub RestartRequired: DismRestartType, | |
pub FullyOffline: DismFullyOfflineInstallableType, | |
pub SupportInformation: PCWSTR, | |
pub CustomProperty: *mut DismCustomProperty, | |
pub CustomPropertyCount: UINT, | |
pub Feature: *mut DismFeature, | |
pub FeatureCount: UINT, | |
} | |
#[test] | |
fn bindgen_test_layout__DismPackageInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismPackageInfo>(), | |
172usize, | |
concat!("Size of: ", stringify!(_DismPackageInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismPackageInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismPackageInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).PackageName as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(PackageName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).PackageState as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(PackageState) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).ReleaseType as *const _ as usize }, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(ReleaseType) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).InstallTime as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(InstallTime) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).Applicable as *const _ as usize }, | |
32usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(Applicable) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).Copyright as *const _ as usize }, | |
36usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(Copyright) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).Company as *const _ as usize }, | |
44usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(Company) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).CreationTime as *const _ as usize }, | |
52usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(CreationTime) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).DisplayName as *const _ as usize }, | |
68usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(DisplayName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).Description as *const _ as usize }, | |
76usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(Description) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).InstallClient as *const _ as usize }, | |
84usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(InstallClient) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismPackageInfo>())).InstallPackageName as *const _ as usize | |
}, | |
92usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(InstallPackageName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).LastUpdateTime as *const _ as usize }, | |
100usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(LastUpdateTime) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).ProductName as *const _ as usize }, | |
116usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(ProductName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).ProductVersion as *const _ as usize }, | |
124usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(ProductVersion) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismPackageInfo>())).RestartRequired as *const _ as usize | |
}, | |
132usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(RestartRequired) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).FullyOffline as *const _ as usize }, | |
136usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(FullyOffline) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismPackageInfo>())).SupportInformation as *const _ as usize | |
}, | |
140usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(SupportInformation) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).CustomProperty as *const _ as usize }, | |
148usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(CustomProperty) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismPackageInfo>())).CustomPropertyCount as *const _ as usize | |
}, | |
156usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(CustomPropertyCount) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).Feature as *const _ as usize }, | |
160usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(Feature) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfo>())).FeatureCount as *const _ as usize }, | |
168usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfo), | |
"::", | |
stringify!(FeatureCount) | |
) | |
); | |
} | |
pub type DismPackageInfo = _DismPackageInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismPackageInfoEx { | |
pub CapabilityId: PCWSTR, | |
pub __bindgen_padding_0: [u8; 172usize], | |
} | |
#[test] | |
fn bindgen_test_layout__DismPackageInfoEx() { | |
assert_eq!( | |
::std::mem::size_of::<_DismPackageInfoEx>(), | |
180usize, | |
concat!("Size of: ", stringify!(_DismPackageInfoEx)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismPackageInfoEx>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismPackageInfoEx)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismPackageInfoEx>())).CapabilityId as *const _ as usize }, | |
172usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismPackageInfoEx), | |
"::", | |
stringify!(CapabilityId) | |
) | |
); | |
} | |
pub type DismPackageInfoEx = _DismPackageInfoEx; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismFeatureInfo { | |
pub FeatureName: PCWSTR, | |
pub FeatureState: DismPackageFeatureState, | |
pub DisplayName: PCWSTR, | |
pub Description: PCWSTR, | |
pub RestartRequired: DismRestartType, | |
pub CustomProperty: *mut DismCustomProperty, | |
pub CustomPropertyCount: UINT, | |
} | |
#[test] | |
fn bindgen_test_layout__DismFeatureInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismFeatureInfo>(), | |
44usize, | |
concat!("Size of: ", stringify!(_DismFeatureInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismFeatureInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismFeatureInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeatureInfo>())).FeatureName as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(FeatureName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeatureInfo>())).FeatureState as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(FeatureState) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeatureInfo>())).DisplayName as *const _ as usize }, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(DisplayName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeatureInfo>())).Description as *const _ as usize }, | |
20usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(Description) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismFeatureInfo>())).RestartRequired as *const _ as usize | |
}, | |
28usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(RestartRequired) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismFeatureInfo>())).CustomProperty as *const _ as usize }, | |
32usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(CustomProperty) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismFeatureInfo>())).CustomPropertyCount as *const _ as usize | |
}, | |
40usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismFeatureInfo), | |
"::", | |
stringify!(CustomPropertyCount) | |
) | |
); | |
} | |
pub type DismFeatureInfo = _DismFeatureInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismCapabilityInfo { | |
pub Name: PCWSTR, | |
pub State: DismPackageFeatureState, | |
pub DisplayName: PCWSTR, | |
pub Description: PCWSTR, | |
pub DownloadSize: DWORD, | |
pub InstallSize: DWORD, | |
} | |
#[test] | |
fn bindgen_test_layout__DismCapabilityInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismCapabilityInfo>(), | |
36usize, | |
concat!("Size of: ", stringify!(_DismCapabilityInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismCapabilityInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismCapabilityInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapabilityInfo>())).Name as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(Name) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapabilityInfo>())).State as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(State) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapabilityInfo>())).DisplayName as *const _ as usize }, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(DisplayName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapabilityInfo>())).Description as *const _ as usize }, | |
20usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(Description) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismCapabilityInfo>())).DownloadSize as *const _ as usize | |
}, | |
28usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(DownloadSize) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismCapabilityInfo>())).InstallSize as *const _ as usize }, | |
32usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismCapabilityInfo), | |
"::", | |
stringify!(InstallSize) | |
) | |
); | |
} | |
pub type DismCapabilityInfo = _DismCapabilityInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismString { | |
pub Value: PCWSTR, | |
} | |
#[test] | |
fn bindgen_test_layout__DismString() { | |
assert_eq!( | |
::std::mem::size_of::<_DismString>(), | |
8usize, | |
concat!("Size of: ", stringify!(_DismString)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismString>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismString)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismString>())).Value as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismString), | |
"::", | |
stringify!(Value) | |
) | |
); | |
} | |
pub type DismString = _DismString; | |
pub type DismLanguage = DismString; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismWimCustomizedInfo { | |
pub Size: UINT, | |
pub DirectoryCount: UINT, | |
pub FileCount: UINT, | |
pub CreatedTime: SYSTEMTIME, | |
pub ModifiedTime: SYSTEMTIME, | |
} | |
#[test] | |
fn bindgen_test_layout__DismWimCustomizedInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismWimCustomizedInfo>(), | |
44usize, | |
concat!("Size of: ", stringify!(_DismWimCustomizedInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismWimCustomizedInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismWimCustomizedInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismWimCustomizedInfo>())).Size as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismWimCustomizedInfo), | |
"::", | |
stringify!(Size) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismWimCustomizedInfo>())).DirectoryCount as *const _ as usize | |
}, | |
4usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismWimCustomizedInfo), | |
"::", | |
stringify!(DirectoryCount) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismWimCustomizedInfo>())).FileCount as *const _ as usize | |
}, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismWimCustomizedInfo), | |
"::", | |
stringify!(FileCount) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismWimCustomizedInfo>())).CreatedTime as *const _ as usize | |
}, | |
12usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismWimCustomizedInfo), | |
"::", | |
stringify!(CreatedTime) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismWimCustomizedInfo>())).ModifiedTime as *const _ as usize | |
}, | |
28usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismWimCustomizedInfo), | |
"::", | |
stringify!(ModifiedTime) | |
) | |
); | |
} | |
pub type DismWimCustomizedInfo = _DismWimCustomizedInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismImageInfo { | |
pub ImageType: DismImageType, | |
pub ImageIndex: UINT, | |
pub ImageName: PCWSTR, | |
pub ImageDescription: PCWSTR, | |
pub ImageSize: UINT64, | |
pub Architecture: UINT, | |
pub ProductName: PCWSTR, | |
pub EditionId: PCWSTR, | |
pub InstallationType: PCWSTR, | |
pub Hal: PCWSTR, | |
pub ProductType: PCWSTR, | |
pub ProductSuite: PCWSTR, | |
pub MajorVersion: UINT, | |
pub MinorVersion: UINT, | |
pub Build: UINT, | |
pub SpBuild: UINT, | |
pub SpLevel: UINT, | |
pub Bootable: DismImageBootable, | |
pub SystemRoot: PCWSTR, | |
pub Language: *mut DismLanguage, | |
pub LanguageCount: UINT, | |
pub DefaultLanguageIndex: UINT, | |
pub CustomizedInfo: *mut ::std::os::raw::c_void, | |
} | |
#[test] | |
fn bindgen_test_layout__DismImageInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismImageInfo>(), | |
140usize, | |
concat!("Size of: ", stringify!(_DismImageInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismImageInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismImageInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ImageType as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ImageType) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ImageIndex as *const _ as usize }, | |
4usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ImageIndex) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ImageName as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ImageName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ImageDescription as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ImageDescription) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ImageSize as *const _ as usize }, | |
24usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ImageSize) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).Architecture as *const _ as usize }, | |
32usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(Architecture) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ProductName as *const _ as usize }, | |
36usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ProductName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).EditionId as *const _ as usize }, | |
44usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(EditionId) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).InstallationType as *const _ as usize }, | |
52usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(InstallationType) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).Hal as *const _ as usize }, | |
60usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(Hal) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ProductType as *const _ as usize }, | |
68usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ProductType) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).ProductSuite as *const _ as usize }, | |
76usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(ProductSuite) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).MajorVersion as *const _ as usize }, | |
84usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(MajorVersion) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).MinorVersion as *const _ as usize }, | |
88usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(MinorVersion) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).Build as *const _ as usize }, | |
92usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(Build) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).SpBuild as *const _ as usize }, | |
96usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(SpBuild) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).SpLevel as *const _ as usize }, | |
100usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(SpLevel) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).Bootable as *const _ as usize }, | |
104usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(Bootable) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).SystemRoot as *const _ as usize }, | |
108usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(SystemRoot) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).Language as *const _ as usize }, | |
116usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(Language) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).LanguageCount as *const _ as usize }, | |
124usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(LanguageCount) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismImageInfo>())).DefaultLanguageIndex as *const _ as usize | |
}, | |
128usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(DefaultLanguageIndex) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismImageInfo>())).CustomizedInfo as *const _ as usize }, | |
132usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismImageInfo), | |
"::", | |
stringify!(CustomizedInfo) | |
) | |
); | |
} | |
pub type DismImageInfo = _DismImageInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismMountedImageInfo { | |
pub MountPath: PCWSTR, | |
pub ImageFilePath: PCWSTR, | |
pub ImageIndex: UINT, | |
pub MountMode: DismMountMode, | |
pub MountStatus: DismMountStatus, | |
} | |
#[test] | |
fn bindgen_test_layout__DismMountedImageInfo() { | |
assert_eq!( | |
::std::mem::size_of::<_DismMountedImageInfo>(), | |
28usize, | |
concat!("Size of: ", stringify!(_DismMountedImageInfo)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismMountedImageInfo>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismMountedImageInfo)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismMountedImageInfo>())).MountPath as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismMountedImageInfo), | |
"::", | |
stringify!(MountPath) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismMountedImageInfo>())).ImageFilePath as *const _ as usize | |
}, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismMountedImageInfo), | |
"::", | |
stringify!(ImageFilePath) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismMountedImageInfo>())).ImageIndex as *const _ as usize | |
}, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismMountedImageInfo), | |
"::", | |
stringify!(ImageIndex) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismMountedImageInfo>())).MountMode as *const _ as usize }, | |
20usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismMountedImageInfo), | |
"::", | |
stringify!(MountMode) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismMountedImageInfo>())).MountStatus as *const _ as usize | |
}, | |
24usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismMountedImageInfo), | |
"::", | |
stringify!(MountStatus) | |
) | |
); | |
} | |
pub type DismMountedImageInfo = _DismMountedImageInfo; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismDriverPackage { | |
pub PublishedName: PCWSTR, | |
pub OriginalFileName: PCWSTR, | |
pub InBox: BOOL, | |
pub CatalogFile: PCWSTR, | |
pub ClassName: PCWSTR, | |
pub ClassGuid: PCWSTR, | |
pub ClassDescription: PCWSTR, | |
pub BootCritical: BOOL, | |
pub DriverSignature: DismDriverSignature, | |
pub ProviderName: PCWSTR, | |
pub Date: SYSTEMTIME, | |
pub MajorVersion: UINT, | |
pub MinorVersion: UINT, | |
pub Build: UINT, | |
pub Revision: UINT, | |
} | |
#[test] | |
fn bindgen_test_layout__DismDriverPackage() { | |
assert_eq!( | |
::std::mem::size_of::<_DismDriverPackage>(), | |
100usize, | |
concat!("Size of: ", stringify!(_DismDriverPackage)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismDriverPackage>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismDriverPackage)) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismDriverPackage>())).PublishedName as *const _ as usize | |
}, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(PublishedName) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismDriverPackage>())).OriginalFileName as *const _ as usize | |
}, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(OriginalFileName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).InBox as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(InBox) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).CatalogFile as *const _ as usize }, | |
20usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(CatalogFile) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).ClassName as *const _ as usize }, | |
28usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(ClassName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).ClassGuid as *const _ as usize }, | |
36usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(ClassGuid) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismDriverPackage>())).ClassDescription as *const _ as usize | |
}, | |
44usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(ClassDescription) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).BootCritical as *const _ as usize }, | |
52usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(BootCritical) | |
) | |
); | |
assert_eq!( | |
unsafe { | |
&(*(::std::ptr::null::<_DismDriverPackage>())).DriverSignature as *const _ as usize | |
}, | |
56usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(DriverSignature) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).ProviderName as *const _ as usize }, | |
60usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(ProviderName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).Date as *const _ as usize }, | |
68usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(Date) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).MajorVersion as *const _ as usize }, | |
84usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(MajorVersion) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).MinorVersion as *const _ as usize }, | |
88usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(MinorVersion) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).Build as *const _ as usize }, | |
92usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(Build) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriverPackage>())).Revision as *const _ as usize }, | |
96usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriverPackage), | |
"::", | |
stringify!(Revision) | |
) | |
); | |
} | |
pub type DismDriverPackage = _DismDriverPackage; | |
#[repr(C, packed)] | |
#[derive(Debug, Copy, Clone)] | |
pub struct _DismDriver { | |
pub ManufacturerName: PCWSTR, | |
pub HardwareDescription: PCWSTR, | |
pub HardwareId: PCWSTR, | |
pub Architecture: UINT, | |
pub ServiceName: PCWSTR, | |
pub CompatibleIds: PCWSTR, | |
pub ExcludeIds: PCWSTR, | |
} | |
#[test] | |
fn bindgen_test_layout__DismDriver() { | |
assert_eq!( | |
::std::mem::size_of::<_DismDriver>(), | |
52usize, | |
concat!("Size of: ", stringify!(_DismDriver)) | |
); | |
assert_eq!( | |
::std::mem::align_of::<_DismDriver>(), | |
1usize, | |
concat!("Alignment of ", stringify!(_DismDriver)) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).ManufacturerName as *const _ as usize }, | |
0usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(ManufacturerName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).HardwareDescription as *const _ as usize }, | |
8usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(HardwareDescription) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).HardwareId as *const _ as usize }, | |
16usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(HardwareId) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).Architecture as *const _ as usize }, | |
24usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(Architecture) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).ServiceName as *const _ as usize }, | |
28usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(ServiceName) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).CompatibleIds as *const _ as usize }, | |
36usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(CompatibleIds) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(::std::ptr::null::<_DismDriver>())).ExcludeIds as *const _ as usize }, | |
44usize, | |
concat!( | |
"Offset of field: ", | |
stringify!(_DismDriver), | |
"::", | |
stringify!(ExcludeIds) | |
) | |
); | |
} | |
pub type DismDriver = _DismDriver; | |
extern "C" { | |
#[doc = ""] | |
pub fn DismInitialize( | |
LogLevel: DismLogLevel, | |
LogFilePath: PCWSTR, | |
ScratchDirectory: PCWSTR, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismShutdown() -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismMountImage( | |
ImageFilePath: PCWSTR, | |
MountPath: PCWSTR, | |
ImageIndex: UINT, | |
ImageName: PCWSTR, | |
ImageIdentifier: DismImageIdentifier, | |
Flags: DWORD, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismUnmountImage( | |
MountPath: PCWSTR, | |
Flags: DWORD, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismOpenSession( | |
ImagePath: PCWSTR, | |
WindowsDirectory: PCWSTR, | |
SystemDrive: PCWSTR, | |
Session: *mut DismSession, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismCloseSession(Session: DismSession) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetLastErrorMessage(ErrorMessage: *mut *mut DismString) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismRemountImage(MountPath: PCWSTR) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismCommitImage( | |
Session: DismSession, | |
Flags: DWORD, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetImageInfo( | |
ImageFilePath: PCWSTR, | |
ImageInfo: *mut *mut DismImageInfo, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetMountedImageInfo( | |
MountedImageInfo: *mut *mut DismMountedImageInfo, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismCleanupMountpoints() -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismCheckImageHealth( | |
Session: DismSession, | |
ScanImage: BOOL, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
ImageHealth: *mut DismImageHealthState, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismRestoreImageHealth( | |
Session: DismSession, | |
SourcePaths: *mut PCWSTR, | |
SourcePathCount: UINT, | |
LimitAccess: BOOL, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismDelete(DismStructure: *mut ::std::os::raw::c_void) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismAddPackage( | |
Session: DismSession, | |
PackagePath: PCWSTR, | |
IgnoreCheck: BOOL, | |
PreventPending: BOOL, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismRemovePackage( | |
Session: DismSession, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismEnableFeature( | |
Session: DismSession, | |
FeatureName: PCWSTR, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
LimitAccess: BOOL, | |
SourcePaths: *mut PCWSTR, | |
SourcePathCount: UINT, | |
EnableAll: BOOL, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismDisableFeature( | |
Session: DismSession, | |
FeatureName: PCWSTR, | |
PackageName: PCWSTR, | |
RemovePayload: BOOL, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetPackages( | |
Session: DismSession, | |
Package: *mut *mut DismPackage, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetPackageInfo( | |
Session: DismSession, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
PackageInfo: *mut *mut DismPackageInfo, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetPackageInfoEx( | |
Session: DismSession, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
PackageInfoEx: *mut *mut DismPackageInfoEx, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetFeatures( | |
Session: DismSession, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
Feature: *mut *mut DismFeature, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetFeatureInfo( | |
Session: DismSession, | |
FeatureName: PCWSTR, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
FeatureInfo: *mut *mut DismFeatureInfo, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetFeatureParent( | |
Session: DismSession, | |
FeatureName: PCWSTR, | |
Identifier: PCWSTR, | |
PackageIdentifier: DismPackageIdentifier, | |
Feature: *mut *mut DismFeature, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismApplyUnattend( | |
Session: DismSession, | |
UnattendFile: PCWSTR, | |
SingleSession: BOOL, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismAddDriver(Session: DismSession, DriverPath: PCWSTR, ForceUnsigned: BOOL) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismRemoveDriver(Session: DismSession, DriverPath: PCWSTR) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetDrivers( | |
Session: DismSession, | |
AllDrivers: BOOL, | |
DriverPackage: *mut *mut DismDriverPackage, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetDriverInfo( | |
Session: DismSession, | |
DriverPath: PCWSTR, | |
Driver: *mut *mut DismDriver, | |
Count: *mut UINT, | |
DriverPackage: *mut *mut DismDriverPackage, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetCapabilities( | |
Session: DismSession, | |
Capability: *mut *mut DismCapability, | |
Count: *mut UINT, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismGetCapabilityInfo( | |
Session: DismSession, | |
Name: PCWSTR, | |
Info: *mut *mut DismCapabilityInfo, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismAddCapability( | |
Session: DismSession, | |
Name: PCWSTR, | |
LimitAccess: BOOL, | |
SourcePaths: *mut PCWSTR, | |
SourcePathCount: UINT, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} | |
extern "C" { | |
pub fn DismRemoveCapability( | |
Session: DismSession, | |
Name: PCWSTR, | |
CancelEvent: HANDLE, | |
Progress: DISM_PROGRESS_CALLBACK, | |
UserData: PVOID, | |
) -> HRESULT; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment