LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
gdargaud

Ability to pass NULL to many library functions

Status: Under Consideration

 

Hi @gdargaud,

 

Thank you for your post. The behavior you are referencing is something we have taken into consideration, especially with the implementation of any new libraries that the CVI team develops. Because CVI is a client of many of the libraries from our internal driver teams and third party instrument driver/library developers, it will be difficult to assure that every function you use in CVI supports this functionality though we will do our best to make this functionality as universal as possible in the near future. Thanks again!

There are many library functions that return several parameters. Many of which you may not care about. Some functions allow you to pass NULL to ignore some returned parameters, but many do not.

For instance:

LinFit (X, Y, NbP, NULL, NULL, &Intercept, &Err);

if you are only interested in the Intercept and error values, will crash on run with a "Null pointer argument to library function" fatal error.

The way it's currently written , you have to (correctly) declare plenty of dummy arguments for your calls.

1 Comment
TheNIDragon
NI Employee (retired)
Status changed to: Under Consideration

 

Hi @gdargaud,

 

Thank you for your post. The behavior you are referencing is something we have taken into consideration, especially with the implementation of any new libraries that the CVI team develops. Because CVI is a client of many of the libraries from our internal driver teams and third party instrument driver/library developers, it will be difficult to assure that every function you use in CVI supports this functionality though we will do our best to make this functionality as universal as possible in the near future. Thanks again!

Collin D.
Software Product Manager