Installer Component Reference

Miraplacid Publisher Installer Component


Miraplacid Publisher SDK Edition can be installed from special Installer Component.
This is self-extracting DLL file which can be used from external setup utility. This file is not present in the package; it could be generated with special utility, Setup Maker. Installer component exposes two kind of interfaces: DLL exported funstions (API) and COM interface. COM interface allows extenal program to have detailed information about installation process.
COM parameters are: coclass MPSsetup (Miraplacid.MPSetup {12727FEB-6A92-4F41-928F-752A30531987}). It contains two interfaces: IMPSetup {CFA1603C-D60A-4896-B46F-FD4BF02921F8}, the main interface, and connection point interface _IMPSetupEvents {A5ECAD06-CCB6-426D-9905-93EA347EE989} for installation events from Installer component to external software.

Examples of setup utility are located at examples.vb\setupui and examples.net\MP_SE_Setup folders at this package.

Important note: If you will use installer component from your .Net setup program, please, do not forget to build it as a 32-bit executable, if your installation application will register dll server itself. Or, it may call system application "regsvr32 mpublisher.dll" to register mtd.dll server.

Miraplacid Publisher Installer Component Reference


IMPSetup interface

Property Type Description
Installed Number (Read Only) 1 if Publisher SE installed, 0 if not installed.
Method Parameters Description
Install String location Installs Publisher SE to specified location. Some events will be generated during the process.
Uninstall None Uninstalls Publisher SE. Some events will be generated during the process.
AddPrinter String Installs additional printer named by String to Publisher drivers collection.
DeletePrinter String Removes additional printer named by String from Publisher drivers collection.
EnumeratePrinters returns String Returns printers belongs to appropriate driver collection. Resulting string is a comma separated values string.

_IMPSetupEvents interface

Event Parameters Description
OnProgress Number This event informs external software about installation/uninstallation progress. Value is in range 0 - 100.
OnWarning Number code, String message Raises when non-critical event is occured. External software may ignore this event and continue.
OnError Number code, String message Raises when critical error is happened. Further processing is impossible.
If this occured during installation, rollback will be performed - all installed components will be removed. During rollback, OnProgress will be called with decreasing value.
Code is internal Miraplacid value; it is provided for informational purposes.
OnQuestion String question, returns Number Raises when some necessary resource is locked by user application. Event handler could try to unlock the resource (for example, pop up a dialog box to user with the message to let him shutdown that process).
If handler returns 0, process will be cancelled. If it returns 1, installer will try to use the resource again.

Functional interface (API)

Function Parameters Description
MPInstall const wchar *location Installs Publisher SE to specified location. There is no way to obtain progress and error information.
MPUninstall void Uninstalls Publisher SE. There is no way to obtain progress and error information.
MPAddPrinter const wchar * Installs additional printer to Publisher drivers collection.
MPDeletePrinter const wchar * Removes additional printer from Publisher drivers collection.
MPDeletePrinter const wchar * Removes additional printer from Publisher drivers collection.
MPEnumeratePrinters wchar *buf, unsigned long buflen Enumerates printers as shown above and puts resulting string to buffer buf. If more memory needed to fit enumeration, function returns E_OUTOFMEMORY.

See also: