Archived:NI-488.2 .NET Wrapper Language Interface (LangInt)

Updated Oct 7, 2019

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In


  • GPIB Software
  • NI-488.2



Issue Details

The NI-488.2 API for .NET has changed completely from the NI-488.2 I am used to. Is there a way to use the old NI-488.2 functions in Visual Studio .NET?


National Instruments NI-488.2 includes a native .NET API for use with Visual Studio .NET 2003 and higher. While this API integrates well with .NET, and is recommended for new application development, it does not use the same function calls that are present in the standard NI-488.2 function reference. The NI-488.2 .NET Wrapper can be used in order to call the NI-488.2 C Reference Functions from within the .NET environment.

For any compiler that supports .NET, perform the following steps to use the GPIB .NET language interface wrapper:
  1. Include a reference to the assembly LangInt.dll in your project.
  2. Use the Language interface as shown in the example below. The functions for the Language Interface reside in the NationalInstruments.NI4882 namespace. The object LangInt contains the GPIB functions, and the object GpibConstants contains the GPIB Constants.

    The following is an example of how the Language interface might be used:

    int status;
    LangInt li = new LangInt();
    GpibConstants c = new GpibConstants();

    int ud = li.ibfind("GPIB0");
    status = li.ibcmd(ud,"\x40\x23");

    if (status & c.ERR)!=0){
    //Do Error Handling.


Not Helpful