Changes in Error Codes as of NI-DNET Version 1.4 Primary Software: Driver Software>>NI-DNETPrimary Software Version: 1.4 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: In NI-DNET 1.4, the error codes have changed from previous versions. When you have a program that evaluates the error code from the error cluster, the program will no longer be able to react appropriately with the newer driver version. It is possible to reprogram the error handling routines by replacing the old error code values with the new ones, but this is not realistic for larger applications. Solution: As of version 1.4 of NI-DNET, the encoding of error codes returned from all functions was changed. The new error encoding provides the following benefits:
Although the new encoding provides many benefits, you may need to make changes to your existing NI-DNET application. If you have already deployed executable applications to your customers, and you are concerned that possible upgrades of NI-DNET in the field will break the error handling in your application, NI-DNET 1.4 provides a way to change the error code format back to the old format: You will find the file nicanopt.ini in the Windows directory (usually C:\Windows or C:\WinNT). In that file is a section called [REVERSESTATUS_OPTION] where REVERSESTATUS is set to OFF. Changing it to ON will change the format of the error code to the legacy format. Make sure that you close all active NI-DNET applications and start them again to see the changed error code format.This special feature is not guaranteed to be supported in future releases of NI-DNET, so we strongly recommend that when possible, you upgrade your application code to use the new error scheme. The following instructions detail the steps required to change NI-DNET error handling in your application: LabVIEW
C/C++
Table 1: Convert Legacy C/C++ Names to New Name The original error encoding of NI-DNET (prior to 1.4) used three different bit fields. This use of bit fields was often confusing to interpret. Each error code now consists of a single, simple numeric value (no bit fields). The following constants were previously used to access bit fields. These constants are no longer required. Expressions that use these constants should be replaced with a single error constant from the table below. NC_MK_SEVERITY NC_MK_QUALIFIER NC_MK_CODE NC_STATSEV NC_STATQUAL NC_STATCODE NC_SEV_SUCCESS NC_SEV_WARNING NC_SEV_ERROR The following table is alphabetized according to the name of the legacy code field.
Table 2: Convert Legacy Value To New Value The following table is sorted according to the value of the legacy code field (low 16 bits).
Related Links: Attachments:
Report Date: 06/03/2004 Last Updated: 06/28/2004 Document ID: 3A2E8THR |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
