In C#,a direct GPIB driver function is not called but the method of a class library is called.
The function of a GPIB driver is called from the method of a class library.
Since the method in a class library is defined by the form excluding prefix from the function from the first Please call according to it.
Ex.)In the case of a GpIni function
Ret = gpib.Ini ();
It is not dependent on the development language to be used,and the contents of a function argument and a return value become common.Please refer to [function reference]for details.
Please see following folders.
\Program Files\CONTEC\API-PAC(W32)\GPIB\Samples\VCSNET
Visual Studio.NET --starting --[New]-[Project]is chosen [from [File]]
A [Visual C#project]is chosen from [Project
Types]of a [New Project]dialog box.
[Windows Application]is chosen from [Template].
The project name created to [Name]is inputted.
The directory which creates the new subdirectory for a project is inputted
into [Location]if needed.
A click of the [OK]button creates a project.
Using the function of a GPIB driver,a class
library CgpibCs.cs file is needed by Visual C#.NET.
[Project]-CgpibCs.cs is added from [Add Existing Item]
A name space is added in order to use the method in a class library.Please add the following parties to the head of C#source code (***.cs file).
using CgpibCs;
The instance of a class is created in order
to use a GPIB class library.
The following lines are added to the head of a form class in C#source code
(***.cs file).
public class Form1 :System.Windows.Forms.Form
{
Cgpib gpib = new Cgpib(); // Add
VisualC++ Visual C#.NET
BYTE * -> string or StringBuilder
DWORD -> uint
DWORD * -> ref uint or uint[]