MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Guid[Next]: HtmlDirTable
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->HookInto

The "HookInto" Command

MAKEMSI has many "hooks" which allow you to insert processing at certain locations. With code written in "layers" it may be that each of these layers might wish to use the same "hook" and therefore interfere with each other if you were not careful.

This macro allows you to hook into the processing without accidently removing any hooking that may have previously have been defined.

Note that this macro is implemented by the "HookInto.MMH" header file and since you typically want to set up hooks before MAKEMSI begins you will have to specifically include the supporting header. You may safely include the header any number of times, the example below demonstrates how this is done with the PPWIZARD "#include" command.

This command takes these parameters:

Note that the macros you supply are not expanded until the hook is used.

EXAMPLE

The following code shows code being "inserted" into the "MAKEMSI_HOOK_ASAP_AFTER_LOG_DIRECTORIES_DEFINED" hook:

#(
    ;--- Code we wish to execute early in build (but after logging locations known) ---
    #define SuspendCpuIntensiveTasks

    ;--- Need to perform latter when the logging directory is known! --------
    #evaluate ^^ ^<$Rexx4SuspendCpuIntensiveTasks>^
#)
#include "HookInto.MMH"             ;;We haven't already included the MAKEMSI headers...
<$HookInto "MAKEMSI_HOOK_ASAP_AFTER_LOG_DIRECTORIES_DEFINED" Before="SuspendCpuIntensiveTasks">


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Guid[Next]: HtmlDirTable


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.