| title | PackageVersion class |
|---|---|
| description | Represents a version of the Windows App SDK framework package (C++). |
| ms.topic | article |
| ms.date | 03/22/2022 |
| keywords | windows 10, windows 11, Windows App SDK, desktop development, app sdk, bootstrapper, bootstrapper api |
| ms.localizationpriority | low |
Represents a version of the Windows App SDK framework package.
class PackageVersion : public PACKAGE_VERSION;Minimum supported SDK: Windows App SDK version 1.1
Namespace: Microsoft::Windows::ApplicationModel
Header: MddBootstrap.h
| Constructor | Description |
|---|---|
| PackageVersion constructor | Initializes a new instance of the PackageVersion class. |
| Function | Description |
|---|---|
| PackageVersion::ToString function | Retrieves the version as a std::wstring. |
| PackageVersion::ToVersion function | Retrieves the version as a uint64_t. |
Initializes a new instance of the PackageVersion class.
PackageVersion();
PackageVersion(uint16_t major, uint16_t minor = 0, uint16_t build = 0, uint16_t revision = 0);
PackageVersion(uint64_t version);major
A uint16_t value representing the major position of a major.minor.build.revision sequence.
minor
An optional uint16_t value representing the minor position of a major.minor.build.revision sequence. Defaults to 0.
build
An optional uint16_t value representing the build position of a major.minor.build.revision sequence. Defaults to 0.
revision
An optional uint16_t value representing the revision position of a major.minor.build.revision sequence. Defaults to 0.
version
A major.minor.build.revision sequence encoded as a (little-endian) uint64_t (so that the first 16 bits contain the revision, and so on).
Retrieves the version as a std::wstring.
std::wstring ToString() const;The major.minor.build.revision sequence encoded as a string (std::wstring) in the format "12345.12345.12345.12345" + null-terminator.
Retrieves the version as a uint64_t.
uint64_t ToVersion() const;The major.minor.build.revision sequence encoded as a (little-endian) uint64_t (so that the first 16 bits contain the revision, and so on).