Specifications

3-20 Creating an Extension
3-20
Debug the Extension
To debug the extension, you can set breakpoints on just about
any line in your class. Initially, you should probably set a
breakpoint on the Initialize method. Then, set HYSYS.exe as the
external program in the Project Properties Debug page.
You can debug your extension in Microsoft Visual Studio 2003 or
2005 by setting breakpoints in the code and by attaching to
running copy of HYSYS from the Attach to Process dialog from
the Tool menu. When attaching the extension to a running
HYSYS case, ensure that you select the managed code debug
option and not native code debug option. You can also start
HYSYS from Microsoft Visual Studio by specifying the path of the
HYSYS executable file in the Start external program field on the
Debug tab of the Project Settings property view.
You can load your extension by starting HYSYS and creating an
instance of the extension. HYSYS creates a container, and this
container then calls the Initialize method of that extension. You
can also use the System.Diagnostics.Debug.Print method in
.NET to print information to the Output Debug view while the
extension runs.
Note: Microsoft Visual Studio .NET 2003 cannot debug a
managed process if .NET 2.0 is being used (HYSYS uses .NET
2.0 by default). You can override this behaviour and force .NET
1.1 to be used so that Visual Studio .NET 2003 can debug the
extension by adding a file called hysys.exe.config to same
directory as hysys.exe that states:
<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
</startup>
</configuration>
Distribute the Extension
Once you are confident that your extension is behaving properly,
you can create an ActiveX DLL file. The end result of this step is
an extension that you can distribute without exposing any