Manifest Maker Examples

Help Home How-To

Quick start guide How to guides Advanced topics User interface Side-by-Side License information
Web Home Free evaluation Download the latest version

Installation

During the installation of Manifest Maker you have an option to install examples:

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.

Folders with Examples

ActCtx

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.

Project2

Programs and DDLs premade for the second project in the "Quick Start Guide" at: http://www.manifestmaker.com/sxs/help/quick.htm.

sxsAPIcalls

Examples for programmers illustrating the use of Activation Context API:

findGuid
Find activation context sections for a number of GUIDs
findHelpers
Find interface information in the activation context
findInfo
Enumerate items in the activation context
findName
Find activation context items by name

sxsExamples

sampleDLL

COM DLL used in examples. Run Visual Studio as Administrator to build this solution.

ClrClassLibrary

.Net DLL with embedded manifest used in examples.

ClrClassTest

.Net program using ClrClass library; no win32 SxS involved.

ComClassTest

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.

LoadDLL

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.

LoadTLB

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:

ProgidSample

Illustration for "Duplicate Progids Explained" topic at: http://www.manifestmaker.com/sxs/help/progids.htm.

program

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.



Read more...