To Link to an Existing Header File

Agilent VISA.NET

To Link to an Existing Header File

You have two choices for adding the appropriate header file to your project.  Depending on how you add the file to your project, you will either link to (reference) the file from wherever it is located on your hard drive, or copy the visa32.bas or visa32.cs file to your project directory.  You may choose to link to the file if you plan on modifying it with changes that you want to be used by multiple projects, or if you just don't want extra copies of the file on your system.  You may choose to copy the file for a project-specific version if you plan on customizing it for that particular project.

To Link to an Existing Header File

  1. Right-click the project you wish to modify (not the solution) in the Solution Explorer window of the Microsoft Visual Studio environment.
  2. Click Add and then click Add Existing Item...
  3. Navigate to the file you wish to link to in your project (visa32.cs for C# or visa32.vb for Visual Basic .NET), select it, but do not click the Open button.
  4. Click the down arrow to the right of the Open button, and choose Link File.
  5. You should now see the file underneath your project in the Solution Explorer.  It will have a little arrow icon in its lower left corner, indicating that it is a link.

To Make a Project-Specific Copy of the Header File

  1. Right-click the project you wish to modify (not the solution) in the Solution Explorer window of the Microsoft Visual Studio environment.
  2. Click Add and then click Add Existing Item...
  3. Navigate to the file you wish to copy to your project (visa32.cs for C# or visa32.vb for Visual Basic .NET), select it, and click the Open button.
  4. You should now see the file in the Solution Explorer underneath your project.  It will have no arrow icon, and you will see a new copy of the file in your project's source file directory.

Next: Using the Header File in Your Project