Support For Primary Interop Assemblies for Automation Objects

Automation objects exposed by HCL Z and I Emulator for Windows can be used by applications written in any language that targets the .NET framework. Managed .NET applications can program Z and I Emulator for Windows by using the Primary Interop Assemblies (PIA) that wrap the automation objects. Interop Assemblies are the mechanism with which managed (.NET) applications use COM-compliant objects. Interop Assemblies contain binding and metadata information, which enables the .NET framework (CLR) to load or marshall COM objects and wrap them for .NET applications. The PIA contains the official description of the COM types as defined by the publisher of those COM types. The PIA is always digitally signed by the publisher of the original COM type.

There are two ways a .NET application can reference an assembly.
  • If it is a simple application or the only application that uses the assembly, Microsoft recommends that the assembly be copied in the same directory as the application.
  • If multiple applications are referencing the assembly, you can install them in the Global Assembly Cache (GAC) and have all the solutions reference the assembly in the GAC.

The model for programming the types exposed by Interop Assemblies is very similar to COM. The methods, properties, and events exposed by the COM object can be accessed by any .NET language, using the syntax of the language. A sample application (ECLSamps.net) written in C# is provided in the \samples directory in the Z and I Emulator for Windows installation image. The sample demonstrates the simple usage of various Interop Assembly types.

For Visual Basic 6.0, projects that use Z and I Emulator for Windows automation objects and have been migrated to Visual Basic .NET using the conversion assistant wizard, you only need to replace the references that the conversion assistant wizard implicitly generates with the corresponding Z and I Emulator for Windows Interop references (from the \Interops directory) and recompile. The way to replace the references is to delete all the references generated by the conversion assistant and use Visual Studio .NET to add the .NET interop references. If you have registered the assemblies in the GAC and want to use them, add the references and set the Copy Local property for the Z and I Emulator for Windows Interop references to False.

The PIAs for the Z and I Emulator for Windows emulator automation objects are installed in the \Interops directory in the Z and I Emulator for Windows installation image. If the Z and I Emulator for Windows product installer detects that the .NET framework is present, it gives you the additional option to register the types in the GAC. While installing the assemblies in the GAC, the PIAs will also be placed in the registry, under the registry key of the corresponding type library.

Table 1 lists the PIAs supplied for the Z and I Emulator for Windows automation objects

Table 1. Primary Interop Assemblies for Z and I Emulator for Windows Automation Objects
Automation Object Interop Assembly Dependency
autECLConnList Interop.AutConnListTypeLibrary.dll
autECLConnMgr Interop.AutConnMgrTypeLibrary.dll
autECLConnList Interop.AutPSTypeLibrary.dll
autECLOIA Interop.AutOIATypeLibrary.dll
autECLPS Interop.AutPSTypeLibrary.dll
autECLScreenDesc Interop.AutScreenDescTypeLibrary.dll
autECLScreenReco Interop.AutScreenRecoTypeLibrary.dll
autECLSession Interop.AutSessTypeLibrary.dll
autECLPageSettings Interop.AutSettingsTypeLibrary.dll
autECLPrinterSettings Interop.AutSettingsTypeLibrary.dll
autECLWinMetrics Interop.AutWinMetricsTypeLibrary.dll
autECLXfer Interop.AutXferTypeLibrary.dll
autSystem Interop.AutSystemTypeLibrary.dll