All of the Automation API is available for use by .NET applications, such as VBScript and C# applications. The API is described in the following topics:
MxVDev COM Automation API
MxTransIt COM Automation API
MxVDiff COM Automation API
To use the MxVDev or MxVDiff COM automation interfaces, a .NET application must link with the following assembly:
MicroMax.MxVDev.Automation.dll
This DLL is installed in the bin subfolder of the .
The assembly contains a static class MicroMax.MxVDev.Automation.Activator which allows the application to activate either MxVGUI (MxVDev) or MxVDiff.
A sample Visual Studio solution is installed in the Samples\Automation\CSharp folder.
Objects used for Automation are registered when you select Set as Current Version. The registration is performed by the MxVCOMReg program. If your Windows system is configured with , you will be prompted to elevate upon execution. If you are a restricted user on a non-UAC configured system, you will need to run the program manually with the correct arguments as a less restricted user.
The MxVCOMReg program is located in the bin folder, for example:
C:\Program Files (x86)\MicroMax\MxSuite 3.36.35.27124\Bin\MxVCOMReg.exe
Arguments:
•/b - Batch mode. The program will not stop executing for any output or error. Useful for batch scripting. •/Register - Register this version of the MxSuite in COM •/Unregister - Unregister this version of the MxSuite in COM •No arguments - Displays a usage summary MxVCOMReg must be run from a batch file or from the console, as it won't do anything without arguments. It must be executed from the default installation's bin directory, or have the working directory set to the default installation.
|
Normally objects used for Automation are registered when you select Set as Current Version. However, this may not work if you don't have Administrator privileges. You can use this procedure to correct the problem:
1.Using Windows Explorer, locate "COM Register.bat" in the bin subfolder of the . For example: C:\Program Files\MicroMax\MxSuite 3.36.17.26140\Bin\COM Register.bat
2.Right-click on the file, and select Run as Administrator. |
|
There are two functions available to the COM Automation programmer for handling errors and other notifications from MxVDev (MxVGUI.exe) and MxTransIt COM interfaces. These notifications are similar to those displayed in the Notifications box during non-automated testing.
GetNotifications()
This function returns an array of strings containing the notifications. The returned information can be displayed, logged, or acted on as the programmer sees fit.
ClearNotifications()
To be sure you are retrieving new notifications, use this function to clear the notifications log before making each COM function call.
|
Related Topics:
MxVDev COM Automation API
MxTransIt COM Automation API
MxVDiff COM Automation API
Sample Projects