- Aug 9, 2022
- 23
- 3
- 3
- Customer Identifier
- E114627
Background
A so-called application manifest (or just manifest in short) is an XML file containing optional meta data for an application. In particular, an application manifest can be used for defining dependencies to certain binaries, which must be present in order for the application to load successfully.A frequent use-case for this is enabling visual styles in order to get the new styled look through the platform's default theme. This in turn is achieved by declaring a dependency to a certain version of the Windows Common Controls DLL via the application manifest.
A manifest can be defined in one of the ways:
- As a separate file named <application name>.exe.manifest placed alongside the executable
- By compiling the manifest into the application's resource
Compiling an application manifest into the resource
An application manifest must be defined in a user-defined resource with a type name (id) of 24. The manifest must be defined as the first resource in this user-defined resource.The following .arc file includes an application manifest defined in the file "application.manifest". This .arc file must simply be added to the respective .exe target in the Xbase++ Workbench. The Workbench then takes care about compiling the resource file and linking it into the executable.
Xbase++:
#define MANIFEST_RESID 1
#define MANIFEST 24
USERDEF MANIFEST
MANIFEST_RESID = FILE "application.manifest"
Last edited: