During the installation of Manifest Maker you have an option to install examples:
The 'Examples' folder is inside your Manifest maker installation folder. Default location is "C:\Program Files\Maze Solutions\Manifest Maker\Examples". Below is the summary of all available examples by folder. All examples are built and tested with the latest version of Visual Studio.
This example illustrates the use of Activation Context API. Additionally ActCtx_cpp project allows experimentetion with the relative locations of manifest and program. For example program is in "C:\Program Files\Example\program.exe" and manifest with assembly are in "C:\ProgramData\AssemblyLibrary\Assembly01". Read source comments for more information.
Programs and DDLs premade for the second project in the "Quick Start Guide" at: http://www.manifestmaker.com/sxs/help/quick.htm.
Examples for programmers illustrating the use of Activation Context API:
- Find activation context sections for a number of GUIDs
- Find interface information in the activation context
- Enumerate items in the activation context
- Find activation context items by name
COM DLL used in examples. Run Visual Studio as Administrator to build this solution.
.Net DLL with embedded manifest used in examples.
.Net program using ClrClass library; no win32 SxS involved.
Unmanaged program using win32 SxS to access ClrClassLibrary. This project has a pre-created manifest and uses Visual Studio project's Manifest Tool to embed the program manifest. See Project Properties, Manifest Tool, Input and Output, Additional Manifest Files.
Load a DLL using LoadLibraryEx Windows API. Illustrates load behavior: Build the project and run "LoadDLL sampleDLL". The DLL is loaded from the 'sample' subfolder because of program manifest. Next run "LoadDLL .\sampleDLL" - this time the DLL is loaded from the current directory because a path is specified in the call to LoadLibraryEx. Now delete the program manifest (LoadDLL.exe.manifest) and run "LoadDLL sampleDLL" again. This time the DLL is loaded fom the program folder because there is no manifest and standard Windows load sequence applies.
Note that once Windows sees the EXE with no manifest, it will remember this and will not use the manifest until the EXE timestamp is changed. Just rebuild the project to get back to the original configuration.
Load a type library using LoadTypeLibEx Windows API. As above the result depends on the presence of program manifest. There is no simple way to query the path the type library was loaded from so follows these steps:
LoadTLB sampleDLL.dll, the call succeeds.
LoadTLB .\sampleDLL.dll, the call also succeeds.
- Delete sampleDLL.dll from the current folder.
LoadTLB sampleDLL.dll, type library is loaded from sample subfolder.
LoadTLB .\sampleDLL.dll, the call fails, the file does not exist.
- Delete sampleDLL.dll from the 'sample' subfolder.
LoadTLB sampleDLL.dll, the call fails.
LoadTLB .\sampleDLL.dll, the call fails.
Illustration for "Duplicate Progids Explained" topic at: http://www.manifestmaker.com/sxs/help/progids.htm.
MFC GUI program illustrating using win32 side-by-side. Build the solution and run the program. There are four parts in the UI. The first shows the result of LoadLibrary, the second CoCreateInstance using a ProgID and the third CoCreateInstance using a class GUID. The fourth part of the window displays paths for this program: the current working directory, the program directory and the assembly root/probing folder. By default the probing folder is empty and side-by-side uses the manifest folder as the search root. You can change it here to experiment with settings you may need for your configuration. "Test Default!" menu action runs the test using default manifest. "Test Manifest!" action promptr for a manifest path and runs these same tests but using an explicit manifest and CreateActCtx, ActivateActCtx windows API.
VS2017, VS2019, VS2022
Example Visual Studio integration projects. Detailed description is in Manifest Maker tutorial. Go to http://www.manifestmaker.com/sxs/help/howto.htm and look for section "Using Manifest Maker with Visual Studio".
Visual Studio example are included in a separate section. See below for links.
- Manifest Maker command line options...
- Visual Studio 2022 integration
- Visual Studio 2019 integration
- Visual Studio 2017 integration
- Read more about using the activation context API...
- Enabling an Assembly in an Application Without Extensions
- Enabling an Assembly in an Application Hosting a DLL, Extension, or Control Panel