Building a .NET QSX Module With C#

Creating a QSX in C# .NET

  1. To begin, create a new C# Class Library project in Visual Studio .NET. Make sure you select the .Net Framework template.

  2. Next, view the project properties and click the 'Assembly Information' button.

  3. From the Assembly Information dialog, check the 'Make assembly COM-Visible' check box and click the OK button to close the dialog.

  4. From the Project Properties window, select the 'Build' tab, then check the 'Register for COM interop' check box.

  5. From the Project Properties window, select the 'Signing' tab. On this tab, you will create a strong name key file to sign the assembly.

  6. Check 'Sign the assembly' and select 'New' from the combo box.  If you already have a strong name key file, you can select 'Browse'.  If you select 'New', you will be prompted for a name for the file and a password to apply to it.  The file will be saved in your project folder so you can only enter the name and extension here (extension should be PFX) – do not enter a path for the file.  After entering the required information, click the OK button to close the dialog.

  7. Next, right-click the project in the 'Solution Explorer' window and select 'Add Reference' from the context menu.  Select the 'Browse' tab on this dialog.  Browse to the location of the Primary Interop Assembly provided by Prevalent Software, Inc.  Highlight 'Interop.QXExt.dll' from the list and click the 'OK' button to save your changes and close the dialog.

  8. In the Class code window, modify the class declaration to inherit the QXExt.IQsx2 interface to create a process QSX. If you want to create an input QSX, inherit QXExt.IQInput2.

  9. Now, right-click on the ‘IQsx2’ or 'IQInput2' text in the interface heading.  Select ‘Implement Interface’->’Implement Interface Explicitly’ from the context menu.  Stubs for each property and method in the interface will be added to your class.

  10. Now, you can write the code for your QSX by switching back to the class code window and providing code for these functions.