Installer Component Reference
Miraplacid Text Driver Installer Component
Miraplacid Text Driver 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 MTDSsetup (Miraplacid.MTDSetup {8BB15E2B-71EC-4c7d-BA6B-3C913DC3E1A7}). It contains two interfaces: IMTDSetup {CD78360C-D3BA-4b0b-BC53-F008ECBF4F0F}, the main interface, and connection point interface _IMTDSetupEvents {EA50BBB8-9FF4-4731-A670-28BCBA417BCC} for installation events from Installer component to external software.
Example of setup utility is located at examples.net\MTD_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 mtd.dll" to register mtd.dll server.
Miraplacid Text Driver Installer Component Reference
IMTDSetup interface
Property | Type | Description |
Installed | Number | (Read Only) 1 if Text Driver SE installed, 0 if not installed. |
Method | Parameters | Description |
Install | String location | Installs Text Driver SE to specified location. Some events will be generated during the process. |
InstallDriver | None | Installs only driver component ot Text Driver SE. Some events will be generated during the process. |
Uninstall | None | Uninstalls Text Driver SE. Some events will be generated during the process. |
AddPrinter | String | Installs a printer named by String to Text Driver drivers collection. |
DeletePrinter | String | Removes a printer named by String from Text Driver drivers collection. |
EnumeratePrinters | returns String | Returns printers belongs to Miraplacid Text Driver SE driver collection. Resulting string is a comma separated values string. |
_IMTDSetupEvents 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 |
MTDInstall | const wchar *location | Installs Text Driver SE to specified location. There is no way to obtain progress and error information. |
MTDInstallDriver | void | Installs only driver component ot Text Driver SE. There is no way to obtain progress and error information. |
MTDUninstall | void | Uninstalls Text Driver SE. There is no way to obtain progress and error information. |
MTDAddPrinter | const wchar * | Installs a printer to Text Driver drivers collection. |
MTDDeletePrinter | const wchar * | Removes a printer from Text Driver drivers collection. |
MTDEnumeratePrinters | 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. |